Jump to content
Poweramp
titanic_fanatic

Unable to find explicit activity class

Recommended Posts

Hey guys,

So my skin has been on the market for a couple of weeks now and is doing well... I did get a crash report from my developer console yesterday though, and am not sure that it relates to my skin


java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:3598)
at android.view.View.performClick(View.java:4091)
at android.view.View$PerformClick.run(View.java:17036)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4912)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3593)
... 11 more
Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.maxmpz.audioplayer/com.maxmpz.audioplayer.SettingsActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1541)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1416)
at android.app.Activity.startActivityForResult(Activity.java:3389)
at android.app.Activity.startActivityForResult(Activity.java:3350)
at android.app.Activity.startActivity(Activity.java:3562)
at android.app.Activity.startActivity(Activity.java:3528)
at com.nwwebdesign.Poweramp.skins.InfoActivity.onButton1Click(InfoActivity.java:51)
... 14 more

Unfortunately the market report does not tell me the version of android being used when this error occurred. It seems that the activity class com.maxmpz.audioplayer.SettingsActivity could not be found. Is this maybe due to a user not using the latest version? Are the classes different from version to version? What should be done to rectify this error?

Share this post


Link to post
Share on other sites

The exception originates from your skin activity (com.nwwebdesign.Poweramp.skins.InfoActivity.onButton1Click). This can happen if Poweramp is not installed at all, or installed on sd card, which is unmounted at the moment. Probably, modifying onButton1Click to something like:

public
void
onButton1Click(View v) {
// Optional
Intent intent =
new
Intent(Intent.
ACTION_MAIN
).setClassName("com.maxmpz.audioplayer", "com.maxmpz.audioplayer.SettingsActivity");
intent.addFlags(Intent.
FLAG_ACTIVITY_CLEAR_TOP
| Intent.
FLAG_ACTIVITY_SINGLE_TOP
| Intent.
FLAG_ACTIVITY_REORDER_TO_FRONT
| Intent.
FLAG_ACTIVITY_NEW_TASK
);
intent.putExtra(
EXTRA_OPEN
,
THEME
);
try
{
startActivity(intent);
finish();
}
catch
(Exception ex) {
Toast.
makeText
(
this
, "Poweramp app can't be found", Toast.
LENGTH_LONG
).show();
Log.
e
(
TAG
, "", ex);
}
}

Will work better. We'll also publish updated classic skin sources soon (for Poweramp 2.0.8-build-523 it's possible to set theme from skin activity directly).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...