我的应用在开发模式下运行良好,但无法生成发行版APK。我不知道这是否与org.eclipse.ui.workbench/REUSE_OPEN_EDITORS_BOOLEAN=true
org.eclipse.ui.workbench/REUSE_OPEN_EDITORS=1
或buildTools版本有关,或者其他原因……也许您可以帮助我!
这是我的assebleRelease输出:
appcompat-v7
接下来是我的依赖项:
.
.
.
> Task :react-native-languages:compileReleaseJavaWithJavac
Note: /Users/xpto/Desktop/react-native/Movtour/node_modules/react-native-languages/android/src/main/java/com/reactcommunity/rnlanguages/RNLanguagesModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
> Task :react-native-maps:compileReleaseJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
/Users/xpto/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/935d0f5835968768ce4a171dfc580369/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
/Users/xpto/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/935d0f5835968768ce4a171dfc580369/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.
/Users/xpto/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/935d0f5835968768ce4a171dfc580369/res/values-v26/values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
/Users/xpto/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/935d0f5835968768ce4a171dfc580369/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontStyle not found.
/Users/xpto/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/935d0f5835968768ce4a171dfc580369/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/font not found.
/Users/xpto/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/935d0f5835968768ce4a171dfc580369/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-bluetooth-status: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 1m 22s
254 actionable tasks: 240 executed, 14 up-to-date
和我的buildscript扩展名:
dependencies {
compile project(':react-native-beacons-manager')
compile project(':react-native-gesture-handler')
compile project(':react-native-languages')
compile project(':react-native-fs')
compile project(':react-native-push-notification')
compile project(':react-native-exit-app')
compile project(':react-native-bluetooth-status')
compile project(':react-native-device-info')
compile project(':react-native-vector-icons')
compile project(':react-native-linear-gradient')
compile (project(':react-native-maps')){
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
compile 'com.google.android.gms:play-services-base:15.0.1'
compile 'com.google.android.gms:play-services-maps:15.0.1'
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
}
希望您能解决我的问题!谢谢!
答案 0 :(得分:0)
我最终通过遵循以下评论解决了我的问题: https://github.com/oblador/react-native-keychain/issues/153#issuecomment-425296990
我不知道如何,但是如果有人想解释原因,我会很感激。