Android O Preview 1 can't open Setting, "Setting has stop" - android

I use the Nexus 6P, and system is Android O Preview 1.
I have been used the preview system for two month, and it's normal.
Today I want to update system, I find I can't open the system app "Setting". it's will show that 'Setting has stop'.
Then I watch the Logcat in Android Studio, has Error log below:
07-25 17:16:31.515 21875-21875/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.settings, PID: 21875
java.lang.IllegalArgumentException: Receiver not registered: com.android.settings.dashboard.conditional.CellularDataCondition$Receiver#1d9a5b0
at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1152)
at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1422)
at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:639)
at com.android.settings.dashboard.conditional.Condition.onSilenceChanged(Condition.java:115)
at com.android.settings.dashboard.conditional.Condition.setActive(Condition.java:90)
at com.android.settings.dashboard.conditional.CellularDataCondition.refreshState(CellularDataCondition.java:47)
at com.android.settings.dashboard.conditional.ConditionManager.refreshAll(ConditionManager.java:77)
at com.android.settings.dashboard.conditional.ConditionManager$ConditionLoader.onPostExecute(ConditionManager.java:266)
at com.android.settings.dashboard.conditional.ConditionManager$ConditionLoader.onPostExecute(ConditionManager.java:261)
at android.os.AsyncTask.finish(AsyncTask.java:667)
at android.os.AsyncTask.-wrap1(Unknown Source:0)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:684)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6535)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
07-25 17:16:31.519 789-2848/? W/ActivityManager: Force finishing activity com.android.settings/.Settings
I can't update now, and Setting can't open. What should I do?

How about doing factory reset?
Go to fastboot mode and use "fastboot -w"

Related

Google pre-launch stability errors for: com.google.android.apps.mtaas.deviceadmin

I'm trying to submit an update to an existing app to production, but I seem to be failing in the prelaunch for one specific device on on android sdk 26. I can reproduce this on emulation of sdk 26. The testing video seemed to just show the automated testing opening and closing the app and clicking around for about 5 minutes. I didn't seem to see any errors in the app itself.
I'm received several errors and all seem to be related to items related to com.google.android.apps.mtaas .
My app doesn't use any DeviceAdmin features so I'm not sure where these are coming from. Also, after looking at the full logcat file none of these process ID's match with the process ID's of my running app, and some of these seem to occur in the logs before I see much activity from the testing opening/closing my app.
Does anyone have any clue where to begin? I can't seem to recreate it, and without any hint to how they might relate to my code(if they do at all) I can't properly attempt to implement any fix.
I've seen numerous threads about false positives related to the prelaunch reports generating false positivies, but I'm not sure if that's the case here or not.
FATAL EXCEPTION: Instr: com.google.android.apps.mtaas.deviceadmin.HideApps
Process: com.google.android.apps.mtaas.deviceadmin, PID: 14692
java.lang.SecurityException: No active admin ComponentInfo
{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}
at android.os.Parcel.readException(Parcel.java:1958)
at android.os.Parcel.readException(Parcel.java:1904)
at android.app.admin.IDevicePolicyManager$Stub$Proxy.isApplicationHidden(IDevicePolicyManager.java:8952)
at android.app.admin.DevicePolicyManager.isApplicationHidden(DevicePolicyManager.java:7466)
at com.google.android.apps.mtaas.deviceadmin.HideApps.onStart(HideApps.java:63)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2106)
FATAL EXCEPTION: main
Process: com.google.android.apps.mtaas.deviceadmin, PID: 14836
java.lang.RuntimeException: Exception thrown in onCreate() of ComponentInfo
{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.ToggleUserRestriction}
: java.lang.SecurityException: No active admin ComponentInfo
{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6050)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.SecurityException: No active admin ComponentInfo{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}
at android.os.Parcel.readException(Parcel.java:1958)
at android.os.Parcel.readException(Parcel.java:1904)
at android.app.admin.IDevicePolicyManager$Stub$Proxy.setUserRestriction(IDevicePolicyManager.java:8542)
at android.app.admin.DevicePolicyManager.addUserRestriction(DevicePolicyManager.java:7339)
at com.google.android.apps.mtaas.deviceadmin.ToggleUserRestriction.start(ToggleUserRestriction.java:49)
at com.google.android.apps.mtaas.deviceadmin.ToggleUserRestriction.onCreate(ToggleUserRestriction.java:22)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6047)
... 8 more
FATAL EXCEPTION: main
Process: com.google.android.apps.mtaas.deviceadmin, PID: 14959
java.lang.RuntimeException: Exception thrown in onCreate() of ComponentInfo
{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.SetUpdatePolicy}
: java.lang.SecurityException: No active admin ComponentInfo
{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6050)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.SecurityException: No active admin ComponentInfo{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}
at android.os.Parcel.readException(Parcel.java:1958)
at android.os.Parcel.readException(Parcel.java:1904)
at android.app.admin.IDevicePolicyManager$Stub$Proxy.setSystemUpdatePolicy(IDevicePolicyManager.java:9956)
at android.app.admin.DevicePolicyManager.setSystemUpdatePolicy(DevicePolicyManager.java:7970)
at com.google.android.apps.mtaas.deviceadmin.SetUpdatePolicy.start(SetUpdatePolicy.java:51)
at com.google.android.apps.mtaas.deviceadmin.SetUpdatePolicy.onCreate(SetUpdatePolicy.java:34)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6047)
... 8 more
FATAL EXCEPTION: main
Process: com.google.android.apps.mtaas.tools, PID: 23437
java.lang.RuntimeException: Unable to instantiate instrumentation ComponentInfo
{com.google.android.apps.mtaas.tools/androidx.test.runner.AndroidJUnitRunner}
: java.lang.ClassNotFoundException: Didn't find class "androidx.test.runner.AndroidJUnitRunner" on path: DexPathList[[zip file "/data/app/com.google.android.apps.mtaas.tools-kyrqBrU_34KhOurU1Kfvdg==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.apps.mtaas.tools-kyrqBrU_34KhOurU1Kfvdg==/lib/arm64, /system/lib64, /vendor/lib64]]
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5995)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.test.runner.AndroidJUnitRunner" on path: DexPathList[[zip file "/data/app/com.google.android.apps.mtaas.tools-kyrqBrU_34KhOurU1Kfvdg==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.apps.mtaas.tools-kyrqBrU_34KhOurU1Kfvdg==/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5993)
... 8 more

Android - Activity error with ActivityInjector get life cycle exception

My app crashed on launch, then I got this error, this occurs rarely.
[ 11-22 11:27:13.287 26135:26135 E/ActivityInjector ]
get life cycle exception
java.lang.ClassCastException: android.os.BinderProxy cannot be cast to android.app.servertransaction.ClientTransaction
at android.app.ActivityInjector.checkAccessControl(ActivityInjector.java:24)
at android.app.Activity.onResume(Activity.java:2032)
at com.myapp.MyActivity.onResume(Unknown Source:0)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1457)
at android.app.Activity.performResume(Activity.java:8390)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4601)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4643)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ClientTransactionHandler.executeTransaction(ClientTransactionHandler.java:58)
at android.app.ActivityThread.handleRelaunchActivityLocally(ActivityThread.java:5616)
at android.app.ActivityThread.access$3500(ActivityThread.java:264)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2183)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8168)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
I am using a Xiaomi device with Android 11, MIUI 12.5
This seems to be a system error, is there any way to prevent it from happening?
Thx
1- Go to the values/themes/theme.xml file
2-Place a new item :
<item name="android:forceDarkAllowed">false</item>
3-Accept to override in values-v29 as de IDE sugests.
4-Try again. Works? upvote my answer ;)
Happens in Xiaomi devices

Android Studio: Problems with WebView.onCreateInputConnection

I wrote a webview application for some Android 4.2 device with a custom inapp keyboard. In fact, the app runs without any error on devices with Android 4.2.
I know this is a very old android version, this is reason why I got now a new device with Android 7.1.2, but unfortunately, the app doesn't work on this device.
In the following code example I create an InputConnection to the WebView and assume that reference to my custom keyboard.
This is the code who turns into an error:
val ic = mWebView.onCreateInputConnection(EditorInfo())
mMyKeyboard.setInputConnection(ic)
Code of "setInputConnection" of object "MyKeyboard"
fun setInputConnection(ic: InputConnection) {
inputConnection = ic
}
error message:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.aaa.bbb, PID: 5012
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.aaa.bbb/com.example.aaa.bbb.MainActivity}: java.lang.IllegalStateException: ic must not be null
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2666)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6123)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Caused by: java.lang.IllegalStateException: ic must not be null
at com.example.huf.ifsscan.MainActivity.onCreate(MainActivity.kt:59)
at android.app.Activity.performCreate(Activity.java:6723)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727) 
at android.app.ActivityThread.-wrap12(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:154) 
at android.app.ActivityThread.main(ActivityThread.java:6123) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) 
E/libEGL: validate_display:99 error 3008 (EGL_BAD_DISPLAY)
Currently I have no idea why this happens.
The documentation for "onCreateInputConnection" of WebView object show it should be fine.
Android Developers | Webview
There is no different if I compile it under API 19 (Android 4.2) or API 25 (7.1).
Does anyone have any idea what the problems might be?
Thanks in advance
It seems like I found the problem.
In the app for Android 4.2 the above code of getting and assuming the inputConnection was part of the "onCreate" function. It semms like Android 7.1 works there a little bit different, after I moved the specified code part to "onPageFinished" function, it works fine.
I guess there is a reference missing in the onCreate function. But I find it odd that it worked before.

Cause of a OutOfMemoryError with React native Android

I'm developping an app with React native and my last version in release mode crashes after 20-30 seconds with the following generated logcat:
02-19 23:52:10.777 32717-32717/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: my.app, PID: 32717
java.lang.OutOfMemoryError: std::bad_alloc
at com.facebook.react.bridge.WritableNativeArray.pushInt(Native Method)
at com.facebook.react.modules.core.Timing$TimerFrameCallback.doFrame(Timing.java:89)
at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:134)
at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:105)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:909)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:655)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
The app never crashes in dev mode.
How can I know what causes this? Is there a leak somewhere? What steps are to be followed to know more about it?
android/app/src/main/AndroidManifest.xml
<application
android:largeHeap="true"
Adding largeHeap seems fix it
Please refer this git issue

java.lang.RuntimeException only on Nexus 4 smartphone

I released my app to google play and i'm actually with 700 daily active users, i'm trying to fix the crashes that appear but there is one very weird crash
Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.hardware.usb.action.USB_DEVICE_DETACHED flg=0x10 pkg=com.tomatedigital.instagramgiveawaywinner } in org.chromium.media.AudioManagerAndroid$5#a283c54
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:891)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5420)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.usb.UsbDevice.getInterfaceCount()' on a null object reference
at org.chromium.media.AudioManagerAndroid.hasUsbAudioCommInterface(AudioManagerAndroid.java:1224)
at org.chromium.media.AudioManagerAndroid.access$1200(AudioManagerAndroid.java:43)
at org.chromium.media.AudioManagerAndroid$5.onReceive(AudioManagerAndroid.java:1254)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:881)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5420)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
This error appears to happen only on one specific hardware what is:
Device
Brand: LGE
Model: Nexus 4
Orientation: Portrait
RAM free: 1.12 GB
Disk free: 690.85 MB
Operating System
Version: 6.0.1
Orientation: Portrait
Rooted: No
So over 700 daily users and over 2k weekly users but only this specific hardware is generating this error
My app doesn't have any straight usage of chromium or any media stuff, so i believe this error is happening during an ad video from admob
can someone help me to fix it, or at least catch the exception and show a friendly message to the user?

Categories

Resources