Recently I sometimes got this exception when MainActivity called onResume().
java.lang.RuntimeException: Unable to resume activity {com.qau4d.c35s3.androidapp/co
There is insufficient information in your question to determine the cause of the java.lang.IllegalArgumentException
, Unfortunately the android ActivityThread
doesn't log the stacktrace of that exception, and the exception message appears to be empty.
However, it looks like there is a way forward. The exception is handled by the following code in the ActivityThread::performResumeActivity
method:
} catch (Exception e) {
if (!mInstrumentation.onException(r.activity, e)) {
throw new RuntimeException(
"Unable to resume activity "
+ r.intent.getComponent().toShortString()
+ ": " + e.toString(), e);
}
}
If you register an Instrumentation
class for your activity, it should be possible to use an onException
method to log the stacktrace for the causal exception. Another possibility is to use Thread.setUncaughtExceptionHandler
to set a handler for the thread in which the IllegalArgumentException
is thrown.
These won't solve the problem (!) but it will get you a step closer to a solution.