-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
IllegalArgumentException with composite build due to different plugin classpath #12515
Comments
I am getting the same error and it so frustrating. |
same problem :( |
same problem :( |
Any updates here? Got the same issue, the composite build is unusable. Gradle 6.6.1 My properties: kotlin.incremental.usePreciseJavaTracking=true kapt.use.worker.api=true android.useAndroidX=true The parent is a multi-module projects. Most of the modules are Android ones, but some of them are targeting JVM. |
i fix own composite build, here my case info - https://issuetracker.google.com/issues/144668323#comment8 |
In my case, the duplicated project name is # settings.gradle
if (gradle.parent == null) {
include ':app'
} |
It's any plan for this bug? |
I try to upgrate gradle 7.3.1 and Android Gradle Plugin 7.0.3 |
I try to upgrate gradle 7.3.1 and Android Gradle Plugin 7.0.3 , this need JDK 11 so I try the gradle 6.7.1 and Android Gradle Plugin 4.2.0,It also work |
I have an android project and I use composite builds to connect it to another android library dependency. This used to work, but broke sometime in the past few months.
Gradle: 6.2.2
Android-gradle-plugin: 3.6.1
OS: Mac OSX 10.15.3
The exception seems to flip back and forth from IllegalArgumentException and ClassCastException, but the stacktrace is the same. Execution fails in the
:mychildproject:packageDebugResources
, 'mychildproject' is the dependency pulled in via composite build.The problem is that the ProfileMBean class and the reflected Method is loaded by the classloader ClassLoaderScopeIdentifier.Id{root:/Users/me/MyChildProject/src/platform-projects/android/buildSrc:root-project(export)}, but the second argument to the ProfileMBean.registerSpan() function has a different classpath ClassLoaderScopeIdentifier.Id{root:/Users/me/MyParentProject/buildSrc:deprecated:deprecated-only(export)}.
Note that we do have a buildSrc in MyParentProject, but not in MyChildProject. In Blocks.recordSpan() I noticed that this entire codepath is avoided if the profileMBean is null which should be the case if profiling is disabled. Any way to force that to happen to workaround this problem? I don't have profiling enabled as far as I know.
I'm unsure if the bug is in gradle or AGP, I found a bug report for AGP at https://partnerissuetracker.corp.google.com/issues/144668323.
Exception stack trace:
The text was updated successfully, but these errors were encountered: