Pushwoosh / pushwoosh-react-native-plugin

Other
58 stars 44 forks source link

Android build error #86

Closed ianwelsh closed 5 years ago

ianwelsh commented 5 years ago

I was getting the following gradle error when trying to build for Android:

> Task :pushwoosh-react-native-plugin:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':pushwoosh-react-native-plugin:verifyReleaseResources'.
> 1 exception was raised by workers:
  com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  /Users/ian/repos/wralnews/node_modules/pushwoosh-react-native-plugin/src/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
  /Users/ian/repos/wralnews/node_modules/pushwoosh-react-native-plugin/src/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
  /Users/ian/repos/wralnews/node_modules/pushwoosh-react-native-plugin/src/android/build/intermediates/res/merged/release/values/values.xml:4170: error: resource android:attr/fontVariationSettings not found.
  /Users/ian/repos/wralnews/node_modules/pushwoosh-react-native-plugin/src/android/build/intermediates/res/merged/release/values/values.xml:4171: error: resource android:attr/ttcIndex not found.
  error: failed linking references.

I was able to resolve it by changing your build.gradle file from:

compileSdkVersion 27
buildToolsVersion "27.0.2"
defaultConfig {
    minSdkVersion 16
    targetSdkVersion 27

to

compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
    minSdkVersion 16
    targetSdkVersion 28

Could you make this change so that I don't have to maintain a fork? I believe Google is requiring targeting SDK 28 starting November 1 anyway.

wfhm commented 5 years ago

Hi @ianwelsh,

Sure, our native SDK was just updated to target 28 SDK version, and the plugins are on its way as well.

wfhm commented 5 years ago

@ianwelsh,

This was fixed with the 5.19.3 release.

danielimmke commented 4 years ago

Sorry, this doesn't seem fixed to me. The numbers are still 27 in master: https://github.com/Pushwoosh/pushwoosh-react-native-plugin/blob/master/src/android/build.gradle