首页 > 解决方案 > 在 Ubuntu 中构建 APK 反应本机应用程序的问题

问题描述

在此处输入图像描述

配置项目:react-native-vector-icons 警告:配置“编译”已过时,已替换为“实施”和“API”。它将在 2018 年底被删除。有关更多信息,请参阅:http ://d.android.com/r/tools/update-dependency-configurations.html

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

/home/aras/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/37bde114cf44a5a3196253573d3981be/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.

/home/aras/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/37bde114cf44a5a3196253573d3981be/res/values-v26/values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.

/home/aras/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/37bde114cf44a5a3196253573d3981be/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontStyle not found.

/home/aras/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/37bde114cf44a5a3196253573d3981be/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/font not found.

/home/aras/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/37bde114cf44a5a3196253573d3981be/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-user-agent:verifyReleaseResources'.

com.android.ide.common.process.ProcessException:无法执行 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 2s
75 actionable tasks: 2 executed, 73 up-to-date

标签: javaandroidreact-nativegradleapk

解决方案


检查所有 npm build.gradle 中支持库版本不匹配的 gradle 依赖项。


推荐阅读