Android Material and appcompat Manifest merger failed in react-native or ExpoKit

前端 未结 13 1351
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-15 16:07

I updated \'android.support:appcompat-v7\' to 28.0.0.

But it brought an error from the build.

Attribute application@appComponentFactory          


        
13条回答
  •  被撕碎了的回忆
    2020-12-15 16:26

    I found a solution through my search by referring to @MehulSolanki answer.

    I add

    tools:replace="android:appComponentFactory"
    android:appComponentFactory="whateverString"
    

    in my on AndroidManifest.xml

    and update com.android.tools.build:gradl:

    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
      }
    

    And add this in your gradle.properties file

    android.useAndroidX=true
    android.enableJetifier=true
    

    ERROR: [TAG] Failed to resolve variable '${animal.sniffer.version}'

    ERROR: [TAG] Failed to resolve variable '${junit.version}'

    In case of above error

    1. File -> Invalidate Caches / restart
    2. Build -> Clean project

    error: package android.support.annotation does not exist error: cannot find symbol class Nullable

    In case of above error

    Add implementation 'androidx.annotation:annotation:1.1.0'

    change import android.support.annotation.Nullable; => androidx.annotation.Nullable;

    change import android.support.annotation.NonNull; => androidx.annotation.NonNull;

    Compile version and target version should be 28.

提交回复
热议问题