google / libaddressinput

Google’s postal address library, powering Android and Chromium
Apache License 2.0
576 stars 104 forks source link

Android tests are failing (No resource found that matches the given name) #179

Open PLNech opened 5 years ago

PLNech commented 5 years ago

Running androidTest on master (c3aa458) result in the following:

WARNING: Dependency org.json:json:20090211 is ignored for debug as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage with jarjar to change the class packages
WARNING: Dependency org.json:json:20090211 is ignored for release as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage with jarjar to change the class packages
WARNING: Dependency org.json:json:20090211 is ignored for debugUnitTest as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage with jarjar to change the class packages
WARNING: Dependency org.json:json:20090211 is ignored for releaseUnitTest as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage with jarjar to change the class packages
WARNING: Dependency org.json:json:20090211 is ignored for debugAndroidTest as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage with jarjar to change the class packages
:android:compileLint
:android:copyDebugLint UP-TO-DATE
:android:preBuild UP-TO-DATE
:android:preDebugBuild UP-TO-DATE
:android:checkDebugManifest
:android:preDebugAndroidTestBuild UP-TO-DATE
:android:preReleaseBuild UP-TO-DATE
:common:compileJava UP-TO-DATE
:common:processResources UP-TO-DATE
:common:classes UP-TO-DATE
:common:jar UP-TO-DATE
:android:prepareComAndroidSupportSupportV42400Library UP-TO-DATE
:android:prepareComGoogleAndroidGmsPlayServicesBase1000Library UP-TO-DATE
:android:prepareComGoogleAndroidGmsPlayServicesBasement1000Library UP-TO-DATE
:android:prepareComGoogleAndroidGmsPlayServicesLocation1000Library UP-TO-DATE
:android:prepareComGoogleAndroidGmsPlayServicesMaps920Library UP-TO-DATE
:android:prepareComGoogleAndroidGmsPlayServicesPlaces920Library UP-TO-DATE
:android:prepareComGoogleAndroidGmsPlayServicesTasks1000Library UP-TO-DATE
:android:prepareDebugDependencies
:android:compileDebugAidl UP-TO-DATE
:android:compileDebugRenderscript UP-TO-DATE
:android:generateDebugBuildConfig UP-TO-DATE
:android:generateDebugAssets UP-TO-DATE
:android:mergeDebugAssets UP-TO-DATE
:android:generateDebugResValues UP-TO-DATE
:android:generateDebugResources UP-TO-DATE
:android:mergeDebugResources UP-TO-DATE
:android:processDebugManifest UP-TO-DATE
:android:processDebugResources
 Position 25:38-66 : No resource found that matches the given name (at 'drawable' with value '@color/ripple_material_light').
 Position 20:20-48 : No resource found that matches the given name (at 'color' with value '@color/ripple_material_light').

:android:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':android:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/pln/Android/Sdk/build-tools/21.1.2/aapt'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
julianharty commented 3 years ago

I've discovered these colors can be added by creating a small colors.xml file. The values are described in a Stack Overflow answer https://stackoverflow.com/a/52253682/340175

Here's the contents of the file I added to android/src/main/res/values/colors.xml (there seems little hope of a PR being acted on in this repo so more practical to add the info here :).

<resources>
    <color name="ripple_material_dark">#33ffffff</color>
    <color name="ripple_material_light">#1f000000</color>
</resources>

BTW: As the Android code and gradle builds are both ancient here there are other build issues.