gpt4 book ai didi

android - 任务 ':app:processDebugResources' 执行失败。 > 安卓资源链接失败

转载 作者:太空宇宙 更新时间:2023-11-03 10:33:09 25 4
gpt4 key购买 nike

我正在运行 react-native run-android 并且在构建期间这是我得到的错误。我正在使用最新版本的 android studio。我从 react-native init 开始的一个新的示例项目在我通过 android 运行它时工作,所以它告诉我我正确安装了 android studio,但我想知道为什么我无法通过与现有项目。

Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
Output: /Users/arronlinton/LocalStorage/JAST/JAST/android/app/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml:69: error: resource mipmap/ic_notif (aka com.jast:mipmap/ic_notif) not found.
error: failed processing manifest.

构建.gradle

buildscript {
ext {
buildToolsVersion = "28.0.2"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 27
supportLibVersion = "28.0.0"
}

应用程序/build.gradle

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
applicationId "com.jast"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}

dependencies {
compile project(':react-native-vector-icons')
compile project(':react-native-maps')
compile project(':react-native-mail')
compile project(':react-native-linear-gradient')
compile project(':react-native-image-picker')
compile project(':react-native-firebase')
compile project(':react-native-fetch-blob')
compile project(':react-native-fcm')
compile project(':react-native-aws')
implementation project(':react-native-vector-icons')
implementation project(':react-native-maps')
implementation project(':react-native-mail')
implementation project(':react-native-linear-gradient')
implementation project(':react-native-image-picker')
implementation project(':react-native-firebase')
implementation project(':react-native-fetch-blob')
implementation project(':react-native-fcm')
implementation project(':react-native-aws')
implementation project(':react-native-vector-icons')
implementation project(':react-native-maps')
implementation project(':react-native-mail')
implementation project(':react-native-linear-gradient')
implementation project(':react-native-image-picker')
implementation project(':react-native-firebase')
implementation project(':react-native-fetch-blob')
implementation project(':react-native-fcm')
implementation project(':react-native-aws')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules

implementation "com.google.android.gms:play-services-base:16.0.1"
implementation "com.google.firebase:firebase-core:16.0.6"
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'
}

最佳答案

根据您的错误,它告诉您您正在 AndroidManifest.xml 中使用以下资源 mipmap/ic_notif 但它无法在您的 res 中找到它 文件夹。

您应该检查您用于资源的名称和引用。特别是您可能用于通知的那个。

还要检查 AndroidManifest.xml 中的关闭标记是否正确,因为错过放置的 > 可能会导致错误。

关于android - 任务 ':app:processDebugResources' 执行失败。 > 安卓资源链接失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54501531/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com