W Accessing hidden field Ldalvik/system/BaseDexClassLoader;->pathList:Ldalvik/system/DexPathList; (greylist, reflection, allowed)
StrictMode D StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Ldalvik/system/BaseDexClassLoader;->pathList:Ldalvik/system/DexPathList;
at android.os.StrictMode.lambda$static$1(StrictMode.java:407)
at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
at java.lang.Class.getDeclaredField(Native Method)
at net.twisterrob.java.utils.ReflectionTools.findDeclaredField(ReflectionTools.java:113)
at net.twisterrob.java.utils.ReflectionTools.get(ReflectionTools.java:59)
at net.twisterrob.android.test.junit.internal.DexPathListReflection.scanClassloaderForClasspath(DexPathListReflection.java:109)
at net.twisterrob.android.test.junit.internal.DexPathListReflection.dexClasspath(DexPathListReflection.java:78)
at net.twisterrob.android.test.junit.AndroidJUnitRunner.setDefaults(AndroidJUnitRunner.java:137)
at net.twisterrob.android.test.junit.AndroidJUnitRunner.onCreate(AndroidJUnitRunner.java:50)
at net.twisterrob.inventory.android.InventoryJUnitRunner.onCreate(InventoryJUnitRunner.java:10)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6452)
at android.app.ActivityThread.access$1300(ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
e.g. API 29:
one "solution" might be: