react-native-webview-android icon indicating copy to clipboard operation
react-native-webview-android copied to clipboard

Execution failed for task ':react-native-webview-android:verifyReleaseResources'.

Open ly6158 opened this issue 6 years ago • 4 comments

Configure project :react-native-webview-android 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 (25.0.0) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.4. Android SDK Build Tools 27.0.3 will be used. To suppress this warning, remove "buildToolsVersion '25.0.0'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

Task :app:bundleReleaseJsAndAssets warning: the transform cache was reset. Loading dependency graph, done. bundle: Writing bundle output to: /Users/liuyang/workspace/APP/泉山区企业大数据平台_周旭/webView_qsqdsj/android/app/build/generated/assets/react/release/index.android.bundle bundle: Done writing bundle output bundle: Copying 1 asset files bundle: Done copying assets

error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found. error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found. /Users/liuyang/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/407b97d568927eeb5a20fd318fadfdbf/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.

/Users/liuyang/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/407b97d568927eeb5a20fd318fadfdbf/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.

/Users/liuyang/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/407b97d568927eeb5a20fd318fadfdbf/res/values-v26/values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.

/Users/liuyang/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/407b97d568927eeb5a20fd318fadfdbf/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontStyle not found.

/Users/liuyang/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/407b97d568927eeb5a20fd318fadfdbf/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/font not found.

/Users/liuyang/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/407b97d568927eeb5a20fd318fadfdbf/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontWeight not found.

error: failed linking references.

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':react-native-webview-android:verifyReleaseResources'.

com.android.ide.common.process.ProcessException: Failed to execute aapt

  • 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

BUILD FAILED in 31s 40 actionable tasks: 37 executed, 3 up-to-date

ly6158 avatar Nov 27 '18 11:11 ly6158

Try to bump the target version e.g:

buildscript {
    ext {
        buildToolsVersion = "27.0.3"
        minSdkVersion = 17
        compileSdkVersion = 27
        targetSdkVersion = 27
        supportLibVersion = "27.1.1"
    }
}

vitorreis avatar Dec 10 '18 17:12 vitorreis

@ly6158 I would recommend you moving away from this package and adopting https://github.com/react-native-community/react-native-webview instead, they just merged the file upload feature there and it's a superior implementation that opens the camera for a taking a picture and sending it to the webview, and also it seems to be the long term supported package in the react-native community.

vitorreis avatar Dec 12 '18 15:12 vitorreis

Hi @vitorreis, you are right about that ;)

Today I will recommend https://github.com/react-native-community/react-native-webview to everyone since it's the oficial future new version of core Webview.

lucasferreira avatar Dec 12 '18 17:12 lucasferreira

@lucasferreira thanks for the package, it was pretty helpful all this time.

vitorreis avatar Dec 12 '18 17:12 vitorreis