السلام عليكم اخوتي الاعزاء لدي مشكلة برمجية في تطبيق اندرويد اقوم بالعمل عليه منذ فترة
وهي ان التطبيق عند تشغيله على المحاكي تظهر رسالة( توقف التطبيق " اعادة تشغيل التطبيق ").
وهذا الامر يتكرر مع الهاتف مع جميع اصدارات الاندرويد وعند فحص المشكلة في اندرويد ستوديو باستخدام android monitor ظهر هذا الكود بالاحمر وهذا هو سبب المشكلة ولكن لااعرف الحل صراحة .
هذا هو الكود
code
07-30 16:49:04.222 2564-3485/android.process.media E/DatabaseUtils: Writing exception to parcel
java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=3504, uid=10071 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:608)
at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:483)
at android.content.ContentProvider$Transport.query(ContentProvider.java:212)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
at android.os.Binder.execTransact(Binder.java:565)
07-30 16:49:04.223 3504-3504/com... D/AndroidRuntime: Shutting down VM
--------- beginning of crash
07-30 16:49:04.224 3504-3504/com.egalaska.mypix E/AndroidRuntime: FATAL EXCEPTION: main Process: com.egalaska.mypix, PID: 3504 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.egalaska.mypix/com.project.yura.photoeditor.EditImageActivity}: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=3504, uid=10071 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission() at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=3504, uid=10071 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission() at android.os.Parcel.readException(Parcel.java:1684) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135) at android.content.ContentProviderProxy.query(ContentProviderNative.java:421) at android.content.ContentResolver.query(ContentResolver.java:532) at android.content.ContentResolver.query(ContentResolver.java:474) at com.project.yura.photoeditor.Model.Helper.getDataColumn(Helper.java:111) at com.project.yura.photoeditor.Model.Helper.getPathFromUri(Helper.java:81) at com.project.yura.photoeditor.EditImageActivity.onCreate(EditImageActivity.java:64) at android.app.Activity.performCreate(Activity.java:6679) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
code
التعليقات