Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid rename: unable to find explicit activity class
    primarykey
    data
    text
    <p>I have a live wallpaper based off of some open source code that I heavily modified. As the last item, I right clicked on it in Eclipse to change the package name and all was well with the world. The wallpaper works right. The settings menu works right. But when I try to click an item in the settings menu to launch another activity, I get:</p> <pre><code> 10-10 16:16:56.215: E/AndroidRuntime(13825): FATAL EXCEPTION: main 10-10 16:16:56.215: E/AndroidRuntime(13825): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.nightscapecreations.orionkeysfree/ffvideolivewallpaper.frankandrobot.com.extLinkNC}; have you declared this activity in your AndroidManifest.xml? </code></pre> <p>Here is the manifest file:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.nightscapecreations.anim1" android:versionCode="1" android:versionName="0.9.0" &gt; &lt;uses-sdk android:minSdkVersion="9" android:targetSdkVersion="9" /&gt; &lt;!-- Tell the system this app requires OpenGL ES 2.0. --&gt; &lt;uses-feature android:glEsVersion="0x00020000" android:required="true" /&gt; &lt;uses-feature android:name="android.software.live_wallpaper" /&gt; &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt; &lt;application android:icon="@drawable/icon" android:label="@string/app_name" &gt; &lt;service android:name="ffvideolivewallpaper.frankandrobot.com.VideoLiveWallpaper" android:label="@string/wallpaper" android:permission="android.permission.BIND_WALLPAPER" &gt; &lt;intent-filter&gt; &lt;action android:name="android.service.wallpaper.WallpaperService" /&gt; &lt;/intent-filter&gt; &lt;meta-data android:name="android.service.wallpaper" android:resource="@xml/wallpaper" /&gt; &lt;/service&gt; &lt;activity android:name="ffvideolivewallpaper.frankandrobot.com.VideoLiveWallpaper" android:label="@string/app_name" &gt; &lt;/activity&gt; &lt;activity android:name="ffvideolivewallpaper.frankandrobot.com.VideoWallpaperSettings" android:exported="true" android:label="@string/app_name" &gt; &lt;/activity&gt; &lt;activity android:name="ffvideolivewallpaper.frankandrobot.com.About" android:exported="true" android:label="@string/app_name" &gt; &lt;/activity&gt; &lt;activity android:name="ffvideolivewallpaper.frankandrobot.com.License" android:exported="true" android:label="@string/app_name" &gt; &lt;/activity&gt; &lt;activity android:name="ffvideolivewallpaper.frankandrobot.com.SelectVideo" android:exported="true" android:label="@string/app_name" &gt; &lt;/activity&gt; &lt;activity android:name="ffvideolivewallpaper.frankandrobot.com.extLinkNC" android:exported="true" android:label="@string/app_name" &gt; &lt;/activity&gt; &lt;activity android:name="ffvideolivewallpaper.frankandrobot.com.extLinkZazzle" android:exported="true" android:label="@string/app_name" &gt; &lt;/activity&gt; &lt;activity android:name="ffvideolivewallpaper.frankandrobot.com.extLinkFacebook" android:exported="true" android:label="@string/app_name" &gt; &lt;/activity&gt; &lt;activity android:name="ffvideolivewallpaper.frankandrobot.com.extLinkGooglePlus" android:exported="true" android:label="@string/app_name" &gt; &lt;/activity&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p>Here is the About activity, as an example, which was confirmed working before this change:</p> <pre><code>package ffvideolivewallpaper.frankandrobot.com; import android.app.Activity; import android.os.Bundle; import android.text.method.LinkMovementMethod; import android.widget.TextView; import android.content.Intent; import android.view.View; import com.nightscapecreations.anim1.R; public class About extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.about); TextView t = (TextView) findViewById(R.id.about_box); t.setMovementMethod(LinkMovementMethod.getInstance()); } public void showLicense(View view) { startActivity(new Intent(About.this, License.class)); } } </code></pre> <p>ffvideolivewallpaper.frankandrobot.com was the old package name. Eclipse added the prefix to the android:name for all activities during the package name change. What I don't understand is that if this is incorrect then why does the wallpaper work at all since the service name is qualified the exact same way?</p> <p><br><br><br></p> <p><strong>EDIT</strong></p> <p>Dunamis made an excellent catch. The original name was ffvideolivewallpaper.frankandrobot.com, but it's been through several name changes since then. One such name was com.nightscapecreations.orionkeysfree. It looks like there was still a reference to that old name which I totally missed in the settings xml file. Example:</p> <pre><code>&lt;PreferenceCategory android:title="Links and Information" &gt; &lt;PreferenceScreen android:title="Visit Nightscape Creations" android:summary="See more live wallpapers, get free static wallpapers, and learn about NC by visiting us online." &gt; &lt;intent android:targetClass="ffvideolivewallpaper.frankandrobot.com.extLinkNC" android:targetPackage="com.nightscapecreations.orionkeysfree" /&gt; &lt;/PreferenceScreen&gt; </code></pre> <p>However, this still does not work. I tried every combination of fully qualified name and simple dot notation ".extLinkFacebook" between this file and the manifest file, but without success. Here is the error I'm receiving now with both names fully qualified:</p> <pre><code>10-11 08:19:43.176: E/AndroidRuntime(25204): FATAL EXCEPTION: main 10-11 08:19:43.176: E/AndroidRuntime(25204): android.content.ActivityNotFoundException: Unable to find explicit activity class {ffvideolivewallpaper.frankandrobot.com/ffvideolivewallpaper.frankandrobot.com.extLinkFacebook}; have you declared this activity in your AndroidManifest.xml? </code></pre> <p>Here is the settings file for reference:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;PreferenceCategory android:title="Wallpaper Settings"&gt; &lt;ffvideolivewallpaper.frankandrobot.com.PrefsSlider android:key="fps" android:title="Framerate" android:summary="Set the target framerate. Lower framerates will decrease resource usage. Requires wallpaper restart to take effect." android:layout_width="fill_parent" android:defaultValue="30" android:orientation="vertical" /&gt; &lt;!-- &lt;ListPreference --&gt; &lt;!-- android:enabled="true" --&gt; &lt;!-- android:key="resolution" --&gt; &lt;!-- android:title="Resolution" --&gt; &lt;!-- android:summary="Ultra resolution may decrease framerate. Only recommended for high end devices." --&gt; &lt;!-- android:entries="@array/prefs_resolutionEntries" --&gt; &lt;!-- android:entryValues="@array/prefs_resolutionValues" --&gt; &lt;!-- android:defaultValue="512" /&gt; --&gt; &lt;!-- &lt;ListPreference --&gt; &lt;!-- android:enabled="true" --&gt; &lt;!-- android:key="frameTonality" --&gt; &lt;!-- android:title="Filters" --&gt; &lt;!-- android:summary="Various effects and filters can be applied to the animation" --&gt; &lt;!-- android:entries="@array/prefs_tonalityEntries" --&gt; &lt;!-- android:entryValues="@array/prefs_tonalityValues" --&gt; &lt;!-- android:defaultValue="1" /&gt; --&gt; &lt;/PreferenceCategory&gt; &lt;PreferenceCategory android:title="Links and Information" &gt; &lt;PreferenceScreen android:title="Visit Nightscape Creations" android:summary="See more live wallpapers, get free static wallpapers, and learn about NC by visiting us online." &gt; &lt;intent android:targetClass="ffvideolivewallpaper.frankandrobot.com.extLinkNC" android:targetPackage="ffvideolivewallpaper.frankandrobot.com" /&gt; &lt;/PreferenceScreen&gt; &lt;PreferenceScreen android:title="@string/prefsProductsHeading" android:summary="@string/prefsProductsSummary" &gt; &lt;intent android:targetClass="ffvideolivewallpaper.frankandrobot.com.extLinkZazzle" android:targetPackage="ffvideolivewallpaper.frankandrobot.com" /&gt; &lt;/PreferenceScreen&gt; &lt;PreferenceScreen android:title="Like on Facebook" &gt; &lt;intent android:targetClass="ffvideolivewallpaper.frankandrobot.com.extLinkFacebook" android:targetPackage="ffvideolivewallpaper.frankandrobot.com" /&gt; &lt;/PreferenceScreen&gt; &lt;PreferenceScreen android:title="Like on Google+" &gt; &lt;intent android:targetClass="ffvideolivewallpaper.frankandrobot.com.extLinkGooglePlus" android:targetPackage="ffvideolivewallpaper.frankandrobot.com" /&gt; &lt;/PreferenceScreen&gt; &lt;/PreferenceCategory&gt; &lt;PreferenceCategory android:title="About" &gt; &lt;PreferenceScreen android:title="About" &gt; &lt;intent android:targetClass="ffvideolivewallpaper.frankandrobot.com.About" android:targetPackage="ffvideolivewallpaper.frankandrobot.com" /&gt; &lt;/PreferenceScreen&gt; &lt;/PreferenceCategory&gt; &lt;/PreferenceScreen&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload