Hello Michal, Thanks for the reply. We are getting an appt failure with the error message:
Error:No resource found that matches the given name (at 'label' with value '@string/test_string'). The application's androidTest AndroidManifest.xml uses a string resource from project B, but I am not sure if that information is of any help or not. This is a snippet from our application's androidTest AndroidManifest.xml: ... <activity android:name=".Activity1" android:label="@string/test_string" android:theme="@android:style/Theme.NoDisplay"> </activity> ... Any help would be appreciated, thank you very much. On Monday, April 3, 2017 at 12:37:56 PM UTC-4, Michal Bendowski wrote: > > I'm sorry for not getting back to you sooner. I was unable to reproduce > it: when I use the test APK R class (com.myapp.test.R), I can still > reference resources from an androidTestCompile dependency. When you say > "tests do not compile", you mean javac failure or aapt failure? > > Michal > > On Tuesday, March 7, 2017 at 4:03:04 PM UTC, jfaz...@fd-software.com > wrote: >> >> We have a test application that references a library project using >> androidTestCompile. The applications build.gradle looks like this: >> >> dependencies{ >> androidTestCompile project(":B") >> } >> >> When running the connectedAndroidTest task using the android gradle >> plugin 2.2.0 the resources were included in the android test apk. I >> decompiled the apk using apktool to verify this. But after updating to >> 2.3.0 those resources are no longer added to the apk and the tests do not >> compile because we are using a resource that exists in project B. As a >> workaround I included this in the build.gradle: >> >> android{ >> sourceSets{ >> androidTest{ >> res.srcDirs += new File(rootProject.projectDir, >> "<path-to-project-B>/src/main/res") >> } >> } >> } >> >> Which seems to add the resources to the test apk properly. Is this >> expected behavior and is this the correct workaround or is this a bug that >> needs to be fixed in 2.3.0? Any help would be appreciated, thanks. >> >> Android gradle plugin version: 2.3.0 >> Gradle version: 3.4.1 >> > -- 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 adt-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.