Couldn't find meta-data for provider with authority

后端 未结 10 1249
粉色の甜心
粉色の甜心 2020-12-05 10:12

I have integrated Snapchat\'s Creative Kit in my Android app. After processing, I receive an image from the server in the form of Byte Array which I am saving to the disk an

10条回答
  •  爱一瞬间的悲伤
    2020-12-05 10:49

    In My Case;

    Manifest File:

    
        
    
    

    Code:

    import androidx.multidex.BuildConfig // NOT DO THIS!!!
    
    val uri = FileProvider.getUriForFile(this,
                BuildConfig.APPLICATION_ID+ ".provider", _tempFile)
    

    Exception:

    java.lang.IllegalArgumentException: Couldn't find meta-data for provider with authority androidx.multidex.provider
    

    Do not use androidx.multidex.BuildConfig, Because this values are not the values of our application:

    //
    // Source code recreated from a .class file by IntelliJ IDEA
    // (powered by Fernflower decompiler)
    //
    
    package androidx.multidex;
    
    public final class BuildConfig {
        public static final boolean DEBUG = false;
        public static final String APPLICATION_ID = "androidx.multidex";
        public static final String BUILD_TYPE = "release";
        public static final String FLAVOR = "";
        public static final int VERSION_CODE = -1;
        public static final String VERSION_NAME = "";
    
        public BuildConfig() {
        }
    }
    

提交回复
热议问题