I'm running react-native run-android
and during the build this is the error I get. I'm using the latest version of android studio. A fresh example project I started with react-native init
works when I run it via android so that tells me I installed android studio correctly, but I'm coming up short on why I can't get through with an existing project.
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.
build.gradle
buildscript {
ext {
buildToolsVersion = "28.0.2"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 27
supportLibVersion = "28.0.0"
}
app/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'
}
From your error it is telling you that you are using the following resource
mipmap/ic_notif
in yourAndroidManifest.xml
but it cannot find it in yourres
folder.You should check that names and references that you are using for your resources. Specifically the one that you are probably using for notifications.
Also check that your close tags are correct in your
AndroidManifest.xml
as a missed placed>
can cause errors.