Java.lang.IllegalStateException: AssetManager completed

Yesterday I slept with my application, and today, when I tried to launch it, it will not start at all. As soon as I try to open it, java.lang.IllegalStateException will fail. I have listed several commits in my code to exclude that it was something that I was doing recently and still. It makes no sense, how can the application stop working overnight? I searched for an error on the Internet and it does not have much useful information. Is this a really weird mistake?

Here's the full stack trace:

E / AndroidRuntime: FATAL EXCEPTION: main java.lang.IllegalStateException: AssetManager completed! at android.os.Parcel.readException (Parcel.java:1439) at android.os.Parcel.readException (Parcel.java:1385) in android.app.ActivityManagerProxy.startActivity (ActivityManagerNative.java:1947) at android.app. Instrumentation.execStartActivity (Instrumentation.java:1419) at android.app.Activity.startActivityForResult (Activity.java:3390) at android.app.Activity.startActivity (Activity.java:3583) in com.android.launcher2.Launcher.startActivity (Launcher.java:2442) on com.android.launcher2.Launcher.startActivitySafely (Launcher.java:2469) in com.android.launcher2.A ppsCustomizePagedView.onClick (AppsCustomizePagedView.javaPoint84) at android.view.View.performClick (View.java:4240) on android.view.View $ PerformClick.run (View.java:17721) on android.os.Handler.handleCallback (Handler.java:730) on android.os.Handler.dispatchMessage (Handler.java:92) on android.os.Looper.loop (Looper.java:137) at android.app.ActivityThread.main (ActivityThread.java: 5136) in java.lang.reflect.Method.invokeNative (native method) in java.lang.reflect.Method.invoke (Method.javaβˆ—25) at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:737) at com.android.internal.os.ZygoteInit.main (ZygoteInit.javahaps53) in dalvik.system.NativeStart.main (own method)

Since I said that this does not look like what I did, I am not sure which code to send. But, given that the application runs here the beginning of the code for the two main classes, which should start over:

applications

 public class App extends Application { private static App instance; private static final String TAG = "Starter"; @Override public void onCreate() { super.onCreate(); instance = this; // Enable Local Datastore. Parse.enableLocalDatastore(this); //TODO: Register subclasses // ParseObject.registerSubclass(Challenge.class); //Parse server Log.d(TAG, "Initializing Parse"); Parse.initialize(new Parse.Configuration.Builder(this) .applicationId(getString(R.string.parse_app_id)) .clientKey(getString(R.string.parse_client_key)) .server(getString(R.string.server_address)).build() ); //Facebook if (AccessToken.getCurrentAccessToken() == null) ParseFacebookUtils.initialize(this); ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); // Optionally enable public read access. defaultACL.setPublicReadAccess(true); defaultACL.setPublicWriteAccess(true); ParseACL.setDefaultACL(defaultACL, true); Log.d(TAG, "Parse ready"); } public static App getInstance(){ return instance; } } 

Splashactivity

 public class SplashActivity extends AppCompatActivity { private static final String TAG = "Splash"; private boolean firstTime = true; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Hide title bar requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_splash); firstTime = getSharedPreferences(Constants.GENERAL_SHARED_PREFS, MODE_PRIVATE) .getBoolean(Constants.FIRSTTIME, true); if (isLoggedIn()) if (firstTime) startActivity(new Intent(SplashActivity.this, FirstTimeActivity.class)); else startActivity(new Intent(SplashActivity.this, MenuActivity.class)); else { Log.d(TAG, "Calling Home"); startActivity(new Intent(SplashActivity.this, WelcomeActivity.class)); finish(); } } @Override protected void onResume() { super.onResume(); } @Override protected void onPause() { super.onPause(); } @Override protected void onDestroy() { super.onDestroy(); } public boolean isLoggedIn() { AccessToken accessToken = AccessToken.getCurrentAccessToken(); String parseSession = ParseUser.getCurrentUser().getSessionToken(); return parseSession != null; } } 
+7
java android illegalstateexception
source share
2 answers

Your trace stack will link to this class in AOSP.

I think this failure has nothing to do with your application , but as an error in the Launcher class. Try installing from USB debugging and see if this works.

But there are still some details that are blurry. These lines (from the bottom of the stacktrace to the top) of the line that cause problems in the com.android.launcher2 package:

https://android.googlesource.com/platform/packages/apps/Launcher2/+/android-4.2.2_r1/src/com/android/launcher2/AppsCustomizePagedView.java#584

https://android.googlesource.com/platform/packages/apps/Launcher2/+/master/src/com/android/launcher2/Launcher.java#2469

https://android.googlesource.com/platform/packages/apps/Launcher2/+/master/src/com/android/launcher2/Launcher.java#2442

From this error, I assume that you are using Nexus or Pixel (or any device with the same source code , which means android.).

From what I can say about this error, this is not an error related to your application . This seems to be the problem with the launcher you are using. Try installing from USB debugging or changing the launcher and see if it works. Try rebooting your device.

Also, from what I see in your code, there are unacceptable classes

+5
source share

This error can also be caused when Instant Run loses connection with the Android emulator, as a result of which new application changes are not saved in the emulator.

Running the application will solve the problem again.

0
source share

All Articles