Fixed
Status Update
Comments
pe...@gmail.com <pe...@gmail.com> #2
Thank you for your feedback. Team may reach out for more feedback in reproducing or triaging this issue.
pe...@gmail.com <pe...@gmail.com> #3
Could it be a Gradle plugin issue?
pe...@gmail.com <pe...@gmail.com> #4
In 3.2.0-alpha02 we started compiling against android.jar and core-lambda-stubs.jar (coming from build tools). Previously, we were compiling against JDK and android.jar which could lead to some issues.
It might be that android.jar is corrupted or android.jar is missing altogether. Is the command from #1 what you use to download the SDK on the CI? Also, can you please check if $ANDROID_HOME/platforms/android-27/android.jar on the CI contains java/lang classes?
It might be that android.jar is corrupted or android.jar is missing altogether. Is the command from #1 what you use to download the SDK on the CI? Also, can you please check if $ANDROID_HOME/platforms/android-27/android.jar on the CI contains java/lang classes?
xa...@google.com <xa...@google.com>
da...@spotify.com <da...@spotify.com> #5
Yes, the command in #1 is what I used to download the SDK on the CI.
$ANDROID_HOME/platforms/android-27/android.jar is 29514833 bytes with a SHA256SUM of ab3f5a358b25b203e4678a5dc7b0e442f4fd1ccfeb6e29914d46d4c8ead22c9a and it contains a java/lang directory with about 160 files/directories inside of it.
$ANDROID_HOME/platforms/android-27/android.jar is 29514833 bytes with a SHA256SUM of ab3f5a358b25b203e4678a5dc7b0e442f4fd1ccfeb6e29914d46d4c8ead22c9a and it contains a java/lang directory with about 160 files/directories inside of it.
be...@google.com <be...@google.com> #6
Does the build pass on the CI, if you specify add android.enableCoreLambdaStubs=false to gradle.properties file?
jo...@google.com <jo...@google.com> #7
Also, which JDK version are you using on the CI? What is the output of `java -version`?
be...@google.com <be...@google.com> #8
I get the same error with the enableCoreLambdaStubs flag set to false: ":app:compileJunitReleaseJavaWithJavacFatal Error: Unable to find package java.lang in classpath or bootclasspath"
`java -version` gives:
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
`java -version` gives:
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
pe...@gmail.com <pe...@gmail.com> #9
Android SDK SHA and java in the $PATH look good. Are you setting JAVA_HOME to JDK9 in the CI script? Can you please share your build files and CI script?
be...@google.com <be...@google.com>
be...@google.com <be...@google.com> #10
To check which version of JVM is used when building with Gradle, you can add the following to build.gradle:
println "Java version is ${JavaVersion.current()}"
println "Java version is ${JavaVersion.current()}"
Description
Exception in thread "main" java.lang.NoClassDefFoundError: android/app/Application
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.robolectric.annotation.Config.<clinit>(Config.java:38)
at org.robolectric.annotation.Config$Builder.<init>(Config.java:398)
at org.robolectric.RobolectricTestRunner.buildGlobalConfig(RobolectricTestRunner.java:421)
at org.robolectric.RobolectricTestRunner.getConfig(RobolectricTestRunner.java:403)
at org.robolectric.RobolectricTestRunner.getChildren(RobolectricTestRunner.java:216)
at org.junit.runners.ParentRunner.getFilteredChildren(ParentRunner.java:426)
at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:351)
at com.intellij.junit4.JUnit4IdeaTestRunner.getDescription(JUnit4IdeaTestRunner.java:78)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:50)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMainV2.main(AppMainV2.java:131)
Caused by: java.lang.ClassNotFoundException: android.app.Application
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 29 more
Another test fails due to not finding 'Parcelable'. The tests were running fine (tm) yesterday. I also made a change to the build.gradle files, adding a dependency, but reverting that change doesn't help. Also, doing './gradlew --stop' did not have any impact. I will report this now and continue to try to find a way to make the tests run again.
This is also using AGP 3.0.0-beta4.
Build: 3.0 Beta 4, AI-171.4304935, 201708291904,
AI-171.4304935, JRE 1.8.0_152-release-915-b01x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.12.5 unknown, screens 1680x1050, 2560x1440
IMPORTANT: Please read