<uses-sdk android:minSdkVersion="7" />
<application
android:description="@string/app_description"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@android:style/Theme.Light" >
<activity
android:name="com.xyz.Main.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
And the Lint-tool tells me that my activity isn't registered in the manifest and if I try to run it, LogCat kindly tells me:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.name/com.xyz.Main.MainActivity}: java.lang.ClassNotFoundException: com.xyz.Main.MainActivity
This is driving me nuts, I've re-installed Eclipse as well as updated the SDK and stuff to API-level 17 and now I seem to be unable to execute my very own app. I've got absolutely no idea what the hell's wrong here, apparently the activity is perfectly well registered within the manifest.xml.
Thanks in advance.
I've got the solution. Today I felt motivated enough get my hands on this project again and tried to port the project to a Linux-distribution (which led me to the conclusion that Linux is a pain in the ass for Android developent) as well as to integrate it "line by line" to a new Android project.
I used to implement String- & Integer-interfaces with certain constants and values (e.g. 0x00 for "visible"). Unfortunately, Android seems to have trouble with interfaces and activity-classes. Removing the interface and making static references onto the constants made the emulator get rid of the problem.
public class MyActivity extends Activity implements Options // [...]
Btn.setVisibility(VISIBLE); // bad idea
public class MyActivity extends Activity // [...]
Btn.setVisibility(Options.VISIBLE); // good idea
Hopefully this is gonna help at least someone searching for this issue.