When I run my app by android studio some times I get this error and app didn't run:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: ir.android_studio.ati_school_student, PID: 2860
java.lang.IllegalStateException: Failed to lookup info for package ir.android_studio.ati_school_student
at android.os.Parcel.createException(Parcel.java:1958)
at android.os.Parcel.readException(Parcel.java:1918)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.call(ContentProviderNative.java:651)
at android.provider.Settings$NameValueCache.getStringForUser(Settings.java:2099)
at android.provider.Settings$Global.getStringForUser(Settings.java:12212)
at android.provider.Settings$Global.getString(Settings.java:12201)
at android.provider.Settings$Global.getInt(Settings.java:12380)
at android.os.GraphicsEnvironment.setupGpuLayers(GraphicsEnvironment.java:95)
at android.os.GraphicsEnvironment.setup(GraphicsEnvironment.java:56)
at android.app.ActivityThread.setupGraphicsSupport(ActivityThread.java:5475)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5756)
at android.app.ActivityThread.access$1100(ActivityThread.java:199)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.providers.settings.SettingsProvider.getCallingApplicationInfoOrThrow(SettingsProvider.java:1741)
at com.android.providers.settings.SettingsProvider.enforceSettingReadable(SettingsProvider.java:1714)
at com.android.providers.settings.SettingsProvider.getGlobalSetting(SettingsProvider.java:964)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:384)
at android.content.ContentProvider$Transport.call(ContentProvider.java:403)
What is this error and how can I resolve it?
Related
My project is with multiple sub-modules.
after upgrading it to android 31, I m getting "AndroidRuntime: FATAL EXCEPTION: main java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/startup/R$string;" error.
I tried with many ways to solve this, but no results yet. Please help me.
adding stacktrace
--------- beginning of crash
2022-12-06 11:31:54.377 4537-4537 AndroidRuntime pid-4537 E FATAL EXCEPTION: main
Process: com.easypay.ican, PID: 4537
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/startup/R$string;
at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:216)
at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:206)
at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:45)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2404)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2374)
at android.app.ActivityThread.installProvider(ActivityThread.java:7422)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6939)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6710)
at android.app.ActivityThread.access$1500(ActivityThread.java:247)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2053)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.startup.R$string" on path: DexPathList[[zip file "/data/app/~~zsypRkw3OTJxLIDeKKQKdQ==/com.easypay.ican-LRtgK_OiOc4mTtKIqazSwA==/base.apk"],nativeLibraryDirectories=[/data/app/~~zsypRkw3OTJxLIDeKKQKdQ==/com.easypay.ican-LRtgK_OiOc4mTtKIqazSwA==/lib/x86_64, /data/app/~~zsypRkw3OTJxLIDeKKQKdQ==/com.easypay.ican-LRtgK_OiOc4mTtKIqazSwA==/base.apk!/lib/x86_64, /system/lib64, /system_ext/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:218)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:216)
at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:206)
at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:45)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2404)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2374)
at android.app.ActivityThread.installProvider(ActivityThread.java:7422)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6939)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6710)
at android.app.ActivityThread.access$1500(ActivityThread.java:247)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2053)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
2022-12-06 11:31:54.381 4537-4537 CustomActivityOnCrash pid-4537 E App has crashed, executing CustomActivityOnCrash's UncaughtExceptionHandler
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/startup/R$string;
I have this problem when I try to press the button to start an activity from library(face emotion recognition).
E/AndroidRuntime: FATAL EXCEPTION: main
Process: vokaturi.sampleapp, PID: 1912
java.lang.SecurityException: UID 10245 does not have permission to content://com.lampa.emotionrecognition.fileprovider/my_images/Pictures/ER_20220418_031223_6417256160146127805.jpg [user 0]
at android.os.Parcel.readException(Parcel.java:2029)
at android.os.Parcel.readException(Parcel.java:1975)
at android.app.IActivityManager$Stub$Proxy.startActivity(IActivityManager.java:4842)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1619)
at android.app.Activity.startActivityForResult(Activity.java:4621)
at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:676)
at android.app.Activity.startActivityForResult(Activity.java:4579)
at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:663)
at com.lampa.emotionrecognition.MainActivity.takePhoto(MainActivity.java:167)
at com.lampa.emotionrecognition.MainActivity.access$000(MainActivity.java:49)
at com.lampa.emotionrecognition.MainActivity$1.onClick(MainActivity.java:92)
at android.view.View.performClick(View.java:6935)
at android.widget.TextView.performClick(TextView.java:12787)
at android.view.View$PerformClick.run(View.java:26214)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
I have added every needed dependency and plugins. My project is also generating third_party_licences files, but my app crashes when activity OssLicensesMenuActivity starts.
Errors here:
E/GmsClient: unable to connect to service: com.google.android.gms.oss.licenses.service.START on com.google.android.gms
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.axabee.seeplaces, PID: 12102
java.lang.NullPointerException: Attempt to invoke virtual method 'long com.google.android.gms.internal.oss_licenses.zzc.zze()' on a null object reference
at com.google.android.gms.internal.oss_licenses.zze.zza(Unknown Source:19)
at com.google.android.gms.oss.licenses.zzf.onComplete(Unknown Source:28)
at com.google.android.gms.tasks.zzj.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
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)
I received such log at Google Play Console:
FATAL EXCEPTION: ControllerMessenger
Process: de.jobnetzwerk.jobnet, PID: 31798
kotlin.KotlinNullPointerException
at de.jobnetzwerk.jobnet.notepad.NoteData.getRemarksList(NoteData.kt:282)
at de.jobnetzwerk.jobnet.notepad.NoteData.access$getRemarksList(NoteData.kt:26)
at de.jobnetzwerk.jobnet.notepad.NoteData$updateRemark$1.onResponse(NoteData.kt:121)
at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:71)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at androidx.test.espresso.base.Interrogator.a(Interrogator.java:19)
at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:169)
at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:161)
at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:141)
at androidx.test.espresso.action.Tap$1.a(Tap.java:6)
at androidx.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:20)
at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:9)
at androidx.test.espresso.ViewInteraction.a(ViewInteraction.java:79)
at androidx.test.espresso.ViewInteraction.a(ViewInteraction.java:97)
at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:3)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
below problematic line (num. 282):
Singleton.apiService().getNoteRecords("Bearer " + context!!.getSharedPreferences("app_data", 0)?.getString("access_token", ""), noteID!!).enqueue(object : Callback<List<RemarkModelNotepad>> {
at this line I start getting data from server API. Which part can create a problem?
UPDATE
My problem in generall is connected with safe-types at kotlin. I think that it will be solved by adding ? or !! but I don't kno where I have to add this.
Not able to run instrumentation test with android orchestrator,
I have followed developer doc and made same changes but it's not working.
Screen shot and logs are attached.
Any help would be appreciated thanks in advance
Logcat:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.ctpl.myinstrumentationtest, PID: 6608
java.lang.RuntimeException: Exception thrown in onCreate() of ComponentInfo{com.example.ctpl.myinstrumentationtest.test/android.support.test.runner.AndroidJUnitRunner}: java.lang.RuntimeException: Cannot connect to android.support.test.orchestrator.OrchestratorService
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5868)
at android.app.ActivityThread.access$1100(ActivityThread.java:199)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: Cannot connect to android.support.test.orchestrator.OrchestratorService
at android.support.test.orchestrator.instrumentationlistener.OrchestratedInstrumentationListener.connect(OrchestratedInstrumentationListener.java:87)
at android.support.test.runner.AndroidJUnitRunner.onCreate(AndroidJUnitRunner.java:303)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5863)
at android.app.ActivityThread.access$1100(ActivityThread.java:199)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
List item
I had the same problem but with androidx orchestrator. I was getting the same exception but the package was different:
Caused by: java.lang.RuntimeException: Cannot connect to androidx.test.orchestrator.OrchestratorService.
I have found the description of possbile root cause in this github thread. There's an iteresting discussion, but it seems that there's no general solution for this yet.
For me the problem was caused by setting the target sdk to 30 and launching the app on an android 30 emulator. So launching tests on emulator with api < 30 resolved this.