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

ImportDepsChecker fails when using aar_import #332

Open
tomrenn opened this issue Jan 27, 2025 · 1 comment
Open

ImportDepsChecker fails when using aar_import #332

tomrenn opened this issue Jan 27, 2025 · 1 comment

Comments

@tomrenn
Copy link

tomrenn commented Jan 27, 2025

I'm migrating Android Studio to use rules_android, but get this obscure failure when trying to update some references requiring aar_import.

ERROR: The dependencies for the following 1 jar(s) are not complete.
      1.bazel-out/k8-fastbuild/bin/prebuilts/tools/common/m2/_aar/androidx-monitor/classes_and_libs_merged.jar
The details are listed below:
Missing member 'execStartActivity' in class androidx.test.internal.runner.hidden.ExposedInstrumentationApi : name=execStartActivity, descriptor=(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Activity;Landroid/content/Intent;I)Landroid/app/Instrumentation$ActivityResult;
Missing member 'execStartActivity' in class androidx.test.internal.runner.hidden.ExposedInstrumentationApi : name=execStartActivity, descriptor=(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Activity;Landroid/content/Intent;ILandroid/os/Bundle;)Landroid/app/Instrumentation$ActivityResult;
Missing member 'execStartActivity' in class androidx.test.internal.runner.hidden.ExposedInstrumentationApi : name=execStartActivity, descriptor=(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Activity;Landroid/content/Intent;ILandroid/os/Bundle;Landroid/os/UserHandle;)Landroid/app/Instrumentation$ActivityResult;
Missing member 'execStartActivity' in class androidx.test.internal.runner.hidden.ExposedInstrumentationApi : name=execStartActivity, descriptor=(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Fragment;Landroid/content/Intent;ILandroid/os/Bundle;)Landroid/app/Instrumentation$ActivityResult;
Missing member 'execStartActivity' in class androidx.test.internal.runner.hidden.ExposedInstrumentationApi : name=execStartActivity, descriptor=(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Ljava/lang/String;Landroid/content/Intent;ILandroid/os/Bundle;)Landroid/app/Instrumentation$ActivityResult;
The class hierarchies of the classes with missing members:
    androidx.test.internal.runner.hidden.ExposedInstrumentationApi
        android.app.Instrumentation (in jdk:bootclasspath_android_only)
            java.lang.Object (in jdk:bootclasspath_android_only)
===Total===
missing=0
incomplete=0
missing_members=5
Target //prebuilts/tools/common/m2:androidx-monitor failed to build

The codebase has a checked-in version of the androidx.test.monitor:1.6.1 artifact, so we have the BUILD file created manually as opposed to using rules_jvm_external to handle maven dependencies.

I'm having difficulty isolating why this fails in our project. Any ideas of what to look for?

@tomrenn
Copy link
Author

tomrenn commented Jan 27, 2025

Hmm. I added rules_jvm_external to the project I'm having a problem with and installed androidx.test.monitor:1.6.1 and it seems to work. I'm not sure what's wrong with my manual aar_import targets since they appear to include the other necessary deps in the maven POM

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

1 participant