我正在编写一个应用程序来测试一个库。它编译得很好,但是当我在虚拟设备(2.3.3)上运行它时,我得到了这个错误:
*java.lang.RuntimeException: 无法实例化活动 ComponentInfo{nicolas.luque/nicolas.luque.MyARActivity}: java.lang.ClassNotFoundException: nicolas.luque.MyARActivity in loader dalvik.system.PathClassLoader[/data/app/nicolas. luque-2.apk]
引起:java.lang.ClassNotFoundException: nicolas.luque.MyARActivity in loader dalvik.system.PathClassLoader[/data/app/nicolas.luque-2.apk]*
这是活动代码:
import es.ucm.look.ar.LookAR;
import es.ucm.look.data.EntityData;
import es.ucm.look.data.LookData;
import android.os.Bundle;
public class MyARActivity extends LookAR
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EntityData data = new EntityData();
data.setLocation(10, 0, 0);
LookData.getInstance().getDataHandler().addEntity(data);
LookData.getInstance().updateData();
}
public MyARActivity()
{
super(true, true, true, true, 100.0f, true);
}
}
这是清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="nicolas.luque"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.CAMERA"/>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".MyARActivity"
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>
</manifest>
我不知道我做错了什么,似乎我的活动丢失了。任何人都可以帮助我吗??
谢谢