react-native-flurry-analytics icon indicating copy to clipboard operation
react-native-flurry-analytics copied to clipboard

Release build failing

Open supagu opened this issue 6 years ago • 1 comments

I've just updated to a newer version of react-native (0.60.5) and trying to build a release build of my app. Flurry version: ^3.0.3 Note that a debug build works fine.

in my android dir I run: ./gradlew assembleRelease

I get the following errors:

> Configure project :react-native-flurry-analytics
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.3) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.2.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Configure project :react-native-radial-gradient
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

> Task :react-native-flurry-analytics:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-flurry-analytics: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.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:7: error: resource android:attr/colorError not found.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:11: error: resource android:attr/colorError not found.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values/values.xml:2734: error: resource android:attr/fontStyle not found.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values/values.xml:2735: error: resource android:attr/font not found.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values/values.xml:2736: error: resource android:attr/fontWeight not found.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values/values.xml:2737: error: resource android:attr/fontVariationSettings not found.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values/values.xml:2738: error: resource android:attr/ttcIndex not found.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values/values.xml:2902: error: resource android:attr/startX not found.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values/values.xml:2905: error: resource android:attr/startY not found.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values/values.xml:2908: error: resource android:attr/endX not found.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values/values.xml:2911: error: resource android:attr/endY not found.
  /home/fabian/Projects/vfl-app-v2/VFL/node_modules/react-native-flurry-analytics/android/build/intermediates/res/merged/release/values/values.xml:2919: error: resource android:attr/offset not found.
  error: failed linking references.
  


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

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 4s
255 actionable tasks: 3 executed, 252 up-to-date

I am unsure how to fix this problem.

supagu avatar Nov 13 '19 03:11 supagu

Add inside allprojects in android/build.gradle:

// Fixes flurry linking missing resources
// https://github.com/luggit/react-native-config/issues/299
subprojects {
    afterEvaluate {
        project ->
            if (project.hasProperty("android")) {
                android {
                    compileSdkVersion = 28
                    buildToolsVersion = "28.0.3"
                }
            }
    }
}

supagu avatar Jan 06 '21 05:01 supagu