i am getting a noclassdeffound exception, when running my app with the emulator:
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
Intent myIntent = new Intent(ActivityPano.this, ActivityTable.class);
startActivity(myIntent);
}
the ActivityTable is causing the exception.
it is defined in an android-library project, which i have included in the java build path as well as in the android references dialog. there are no errors in eclipse, but when started in the emulator it crashes.
here is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mypackage"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar" android:debuggable="false" android:description="@string/description">
<activity android:name=".ActivityHPanorama"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.mypackage.ActivityTable"></activity>
</application>
<uses-sdk android:minSdkVersion="3"></uses-sdk>
</manifest>
this is the error from the logcat:
04-18 11:32:07.767: ERROR/dalvikvm(483): Could not find class com.mypackage.ActivityTable', referenced from method com.mypackage.ActivityHPanorama.onCreate
what makes me a bit suspicious is this line from the console (not the logcat):
[2011-04-18 14:55:59 - panorama] Could not find panorama.apk!
panorama is the name of the library project.
The problem is that you haven't defined any intent-filters for your "ActivityTable" as well...
This should help..
I think you should use
This would definitely work
If you are depenedencies are correct when you are installing the app you should see following in console logs
But since you were mentioning that Could not find panorama.apk! I tried replicating such behaviour using tic-tac-toe sameple library..
This is what i did,
Added TicTacToe Library to eclipse, Added TicTacToe app also to eclipse.
Right clicked on Library project, went to android tab and removed the IsLibrary check
Right clicked on Main app project, went to android tab removed dependency
The went to java build path of Main app project and added Library project as required project
Compilation went fine, but when installing the app it is checking for library.apk I am guessing if you are doing anything similar tat might be the issue.
have you add this class in your Manifest?
<activity android:name="ActivityTable"></activity>