Google-signin: Missing Resources on :react-native-google-signin:verifyReleaseResources

Created on 8 Jul 2018  路  11Comments  路  Source: react-native-google-signin/google-signin

Preface

I'd like to start of with the fact that installDebug works, just anything that runs :react-native-google-signin:verifyReleaseResources crashes, including assembleRelease. This is a breaking issue and should, hopefully, be resolved sooner than later.

Steps to Reproduce

Reproduction is simple.

That's it, no other packages were added. I feel it unnecessary to supply a project repo since the steps for reproduction are very straightforward and quick.

This error occurs both with react-native-google-signin version 0.12.0 and 1.0.0-rc1.

Expected Behavior

Should assemble release APKs.

Actual Behavior

No APKs are generated.
Errors out on :react-native-google-signin:verifyReleaseResources and shows the following:

error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
/home/linux-user-name/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/6c33cf9acdc6a63b973051edc2d05f55/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
/home/linux-user-name/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/6c33cf9acdc6a63b973051edc2d05f55/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.
/home/linux-user-name/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/6c33cf9acdc6a63b973051edc2d05f55/res/values-v26/values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.

* What went wrong:
Execution failed for task ':react-native-google-signin:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

Environment

  • react-native 0.56.0
  • react-native-google-signin 0.12.0 or 1.0.0-rc1
  • react 16.4.1
  • cocoapods and GoogleSignIn pod version (if applicable) N/A
  • gradle 4.4
  • android plugin 3.1.2
  • play-services-auth 15.0.1

If any more information is needed feel free to let me know and I'll do my best to get it to you.

馃敠 Help Wanted 馃挜 Build Issue 馃Android needs repro / repro steps

Most helpful comment

I resolved it by updating the node_modules/react-native-google-signin/android/build.gradle

compileSdkVersion 26
buildToolsVersion "26.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
}

All 11 comments

I am also facing exactly the same issue.

Same here

if any of you guys could create a reproducible example, I'm sure someone could help.

I am also facing exactly the same issue.

the same issue,

Actual Behavior

when I run react-native run-android it's work fine but if I run ./gradlew assembleRelease I will get the error

react-native 0.56.0
react-native-google-signin 0.12.0 or 1.0.0-rc1
react 16.4.1
gradle 4.4
android plugin 3.1.2
play-services-auth 15.0.1

In Project/android/build.gradle, I replaced
this -> classpath 'com.google.gms:google-services:3.2.1'
with -> classpath 'com.google.gms:google-services:4.0.0' and ran ./gradlew assembleRelease
then above issue :react-native-google-signin:verifyReleaseResources is gone.
But now I've got following issue:
error: failed parsing overlays.
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processReleaseResources'.
    > Failed to process resources, see aapt output above for details.

I resolved it by updating the node_modules/react-native-google-signin/android/build.gradle

compileSdkVersion 26
buildToolsVersion "26.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
}

Yep to fix it edit node_modules/react-native-google-signin/android/build.gradle to match compileSdkversion and buildToolsVersion to the one used in your android/app/build.gradle file

Does no one else find it a problem that we have to edit the source code just for it to work? It should be patched in by development since it's a breaking issue.

I resolved it by updating the node_modules/react-native-google-signin/android/build.gradle

compileSdkVersion 26
buildToolsVersion "26.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
}

@jcsena and @mehulmpt thanks

Was this page helpful?
0 / 5 - 0 ratings