jamesisaac / react-native-background-task

Periodic background tasks for React Native apps, cross-platform (iOS and Android), which run even when the app is closed.
MIT License
1.11k stars 110 forks source link

Release Build : Android resource linking failed #70

Open kuldeepkhobrekar opened 5 years ago

kuldeepkhobrekar commented 5 years ago

Execution failed for task ':react-native-background-task:verifyReleaseResources'.

1 exception was raised by workers: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found. error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values-v26\values-v26.xml:7: error: resource android:attr/colorError not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values-v26\values-v26.xml:11: error: resource android:attr/colorError not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values-v26\values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values\values.xml:2711: error: resource android:attr/fontStyle not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values\values.xml:2712: error: resource android:attr/font not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values\values.xml:2713: error: resource android:attr/fontWeight not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values\values.xml:2714: error: resource android:attr/fontVariationSettings not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values\values.xml:2715: error: resource android:attr/ttcIndex not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values\values.xml:2796: error: resource android:attr/startX not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values\values.xml:2799: error: resource android:attr/startY not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values\values.xml:2802: error: resource android:attr/endX not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values\values.xml:2805: error: resource android:attr/endY not found. I:\kuldeep\react-native\ETA_v6_bgfetch\node_modules\react-native-background-task\android\build\intermediates\res\merged\release\values\values.xml:2813: error: resource android:attr/offset not found. error: failed linking references.

kuldeepkhobrekar commented 5 years ago

My Build.gradle buildscript { ext { buildToolsVersion = "28.0.3" minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 28 supportLibVersion = "28.0.0" googlePlayServicesVersion = "11.0.0" } repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.3.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects { repositories { mavenLocal() google() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } } }

danielsotopino commented 5 years ago

In node_modules/react-native-background-task/android/build.gradle I changed:

compileSdkVersion 23 -> 28

And now it works ok.