Reputation: 13
I have a new app built with Cocos2dx and Eclipse. After cleaning and building in Eclipse the Android application force-closes with the following manifest and LogCat.
11-25 14:38:15.483: E/AndroidRuntime(2792): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.RWF.Wheels5Fun2/com.RWF.Wheels5Fun2.Wheels5Fun2}: java.lang.ClassNotFoundException: com.RWF.Wheels5Fun2.Wheels5Fun2
Here's the manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.RWF.Wheels5Fun2"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="14"/>
<uses-feature android:glEsVersion="0x00020000" />
<application android:label="@string/app_name"
android:icon="@drawable/spinpressed">
<activity android:name=".Wheels5Fun2"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<supports-screens android:largeScreens="true"
android:smallScreens="true"
android:anyDensity="true"
android:normalScreens="true"/>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
Upvotes: 1
Views: 62
Reputation: 35783
your error message says "you forgot to define Activity in Manifest file"
Please! update you manifest file with correct Package and Activity name.
YOUR_ACTIVITY_NAME <-- change the name here, and run again.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.RWF.Wheels5Fun2"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="14"/>
<uses-feature android:glEsVersion="0x00020000" />
<application android:label="@string/app_name"
android:icon="@drawable/spinpressed">
<activity android:name="com.RWF.YOUR_ACTIVITY_NAME"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<supports-screens android:largeScreens="true"
android:smallScreens="true"
android:anyDensity="true"
android:normalScreens="true"/>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
Upvotes: 1