To report an error when a test call is provided externally contentprovider:
Java.lang.SecurityException:Permission denial:opening provider Com.example.onehw.BookProvider from processrecord{ b2f1b230 8449:com.example.adtest/u0a53} (pid=8449, uid=10053) that's not exported from UID 10052
At Android.os.Parcel.readException (parcel.java:1465)
At Android.os.Parcel.readException (parcel.java:1419)
At Android.app.ActivityManagerProxy.getContentProvider (activitymanagernative.java:2848)
At Android.app.ActivityThread.acquireProvider (activitythread.java:4415)
At Android.app.contextimpl$applicationcontentresolver.acquireprovider (contextimpl.java:2192)
At Android.content.ContentResolver.acquireProvider (contentresolver.java:1378)
At Android.content.ContentResolver.insert (contentresolver.java:1184)
At Com.example.adtest.ProverderTest.testInsert (proverdertest.java:16)
At Java.lang.reflect.Method.invokeNative (Native Method)
At Android.test.AndroidTestRunner.runTest (androidtestrunner.java:191)
At Android.test.AndroidTestRunner.runTest (androidtestrunner.java:176)
At Android.test.InstrumentationTestRunner.onStart (instrumentationtestrunner.java:554)
At Android.app.instrumentation$instrumentationthread.run (instrumentation.java:1701)
Is the issue of permissions, in the Androidmanifest.xml plus red part of the solution
<provider android:name= "Bookprovider" android:authorities= "Com.example.provides.bookprovider"android: Exported= "true" />
Java.lang.SecurityException:Permission denial:opening Provider