Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/lifecycle/runtime/R$id; #413

Open
MuthuHere opened this issue Jul 21, 2023 · 1 comment

Comments

@MuthuHere
Copy link

I am creating a module to aar, when i create i am successfully can create aar. But when i run the instrumentation test all the sudden i am getting following error

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/lifecycle/runtime/R$id; at androidx.lifecycle.ViewTreeLifecycleOwner.set(ViewTreeLifecycleOwner.java:49) Tests on Pixel_XL_API_30(AVD) - 11 failed: Instrumentation run failed due to 'Process crashed.'

Build Environment

  • Operating System: MacOs Intel chip
  • Gradle Version: 11.0.15
  • Fat-aar Version: 1.3.8
@Mixermachine
Copy link

I also encountered this problem.
For now I moved my tests into an additional app module that implements my aar module as a dependency.

In the app module build.gradle add the following:

implementation(project(':myAarModule'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants