Hello, I found a bug which occurs when building an app with a custom android-library-project. My app uses a Fragment from a library-project. This works fine as long as the build.gradle does not modify the applicationId from the library-project, but if the applicationId differs from the packagename the app crashs with a NoClassDefFoundError:
E/AndroidRuntime(2019): FATAL EXCEPTION: main E/AndroidRuntime(2019): Process: com.example.notfoundtester, PID: 2019 E/AndroidRuntime(2019): java.lang.NoClassDefFoundError: com.example.mymodule.mylib.R$layout ... (Full stacktrace can be found in the bitbucket-project) This project: https://bitbucket.org/jhabe/android-gradle-noclassdeffounderror demonstrates the behaviour. If you remove the applicationId-Entry in the build.gradle(from mylib) or change simply change it to the packageName, the app won't crash. Furthermore there is another developer with the same problem on StackOverflow: java.lang.NoClassDefFoundError: com.acme.R$layout referencing android library <http://stackoverflow.com/questions/25194024/java-lang-noclassdeffounderror-com-acme-rlayout-referencing-android-library>, who has created an example-project too: https://github.com/kldavis4/android-NoClassDefFoundError-example. Neither gradle clean, nor removing the R.txt solved the problem. Version-Informations: ------------------------------------------------------------Gradle 1.12------------------------------------------------------------ > Build time: 2014-04-29 09:24:31 UTC Build number: none Revision: > a831fa866d46cbee94e61a09af15f9dd95987421 > Groovy: 1.8.6 Ant: Apache Ant(TM) version 1.9.3 compiled on > December 23 2013 Ivy: 2.2.0 JVM: 1.7.0_65 (Oracle > Corporation 24.65-b04) OS: Linux 3.13.0-34-generic amd64 > GradleAndroid-Plugin: 0.12.2 > > Anything else i can do to provide more information? -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
