java.lang.SecurityException: Invalid value for visibility: 2

下载时报这样的错

2020-02-28 16:08:25.475 19757-19980/com.reach.dispatcher E/AndroidRuntime: FATAL EXCEPTION: Thread-50
    Process: com.reach.dispatcher, PID: 19757
    java.lang.SecurityException: Invalid value for visibility: 2
        at android.os.Parcel.readException(Parcel.java:1954)
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
        at android.content.ContentProviderProxy.insert(ContentProviderNative.java:476)
        at android.content.ContentResolver.insert(ContentResolver.java:1557)
        at android.app.DownloadManager.enqueue(DownloadManager.java:1042)
        at com.reach.dispatcher.update.DownLoadRunnable.startDownload(DownLoadRunnable.java:41)
        at com.reach.dispatcher.update.DownLoadRunnable.run(DownLoadRunnable.java:34)
        at java.lang.Thread.run(Thread.java:784)
2020-02-28 16:08:25.476 19757-19980/com.reach.dispatcher E/CrashReport: Java Crash Happen cause by Thread-50(2042)

 

 

java.lang.SecurityException: Invalid value for visibility: 2_第1张图片

 

解决办法很简单:在AndroidManifest.xml加入这句:

你可能感兴趣的:(Android)