We are running into an issue where the BuildConfig.class for a library project (package name com.example.core) isn’t being included in the APK used for connectedInstrumentTest. Our setup is that we have an Android library project that uses some constants specified using buildConfigFieldin its build.gradle. In normal usage by dependent Android projects, the class in generated correctly and included in the APK. When we run connectedInstrumentTest, our tests fail with java.lang.NoClassDefFoundError: com.example.core.BuildConfig; upon investigation we can see that the dexer is being called with /projectRoot/build/classes/test/debug, which includes com/example/core/test/BuildConfig.class but no com/example/core/BuildConfig.class.
In the past (Gradle 1.9, Gradle plugin 0.7), the non-modified package would be used for the BuildConfig. Since people might want BuildConfig for the instrument test code as well, the build system probably needs to include generated versions for both the original package of the library project and the .test package name. *Avram Lyon* Android wrangler | Scopely, Inc. Refer The Smartest Person You Know And Pocket $5,000! * Learn more: scopely.com/referrals <http://www.scopely.com/referrals/?page=4>* -- 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/groups/opt_out.
