androidstudio工程文件怎么打开(android.support的FileProvider不存在的解决方法)

一、错误描述

最近把一个旧的项目从Eclipse迁移到Android Studio的时候,做适配26,遇到如下错误:

E/AndroidRuntime: FATAL EXCEPTION: main

Process: com.XXl.XXl, PID: 10251

java.lang.RuntimeException: Unable to get provider android.support.v4.content.FileProvider: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider" on path: DexPathList[[zip file "/data/app/com.XXl.XXl-pBXoeCsw74hjKSQpT2YeKA==/base.apk"],nativeLibraryDirectories=[/data/app/com.XXl.XXl-pBXoeCsw74hjKSQpT2YeKA==/lib/x86, /system/lib, /vendor/lib]]

at android.app.ActivityThread.installProvider(ActivityThread.java:6242)

at android.app.ActivityThread.installContentProviders(ActivityThread.java:5805)

at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5722)

at android.app.ActivityThread.-wrap1(Unknown Source:0)

at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)

at android.os.Handler.dispatchMessage(Handler.java:106)

at android.os.Looper.loop(Looper.java:164)

at android.app.ActivityThread.main(ActivityThread.java:6494)

at java.lang.reflect.Method.invoke(Native Method)

at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider" on path: DexPathList[[zip file "/data/app/com.XXl.XXl-pBXoeCsw74hjKSQpT2YeKA==/base.apk"],nativeLibraryDirectories=[/data/app/com.XXl.XXl-pBXoeCsw74hjKSQpT2YeKA==/lib/x86, /system/lib, /vendor/lib]]

at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)

at java.lang.ClassLoader.loadClass(ClassLoader.java:379)

at java.lang.ClassLoader.loadClass(ClassLoader.java:312)

at android.app.ActivityThread.installProvider(ActivityThread.java:622

二、原因分析

一、菜单

androidstudio工程文件怎么打开(android.support的FileProvider不存在的解决方法)(1)

二、选择依赖

androidstudio工程文件怎么打开(android.support的FileProvider不存在的解决方法)(2)

三、点击添加库

androidstudio工程文件怎么打开(android.support的FileProvider不存在的解决方法)(3)

四,选择support包

,

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页