我正在尝试在eclipse juno上运行一个android项目并在samsung选项卡10.1上测试它。 项目的.apk文件是在我的comp上创建的,但它没有在选项卡上正确加载。 有人可以帮我解决这个问题吗?
编辑:Android版本是4.1.2,这与选项卡相同。从选项卡获得的错误是“不幸的是AppName已停止。”。这个项目在另一台机器上工作正常。我刚刚在日食中导入了代码库。
日志如下。
06-22 12:46:44.260: E/AndroidRuntime(25528): FATAL EXCEPTION: main
06-22 12:46:44.260: E/AndroidRuntime(25528): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.belgium.initial/com.belgium.initial.initial}: java.lang.ClassNotFoundException: com.belgium.initial.initial
06-22 12:46:44.260: E/AndroidRuntime(25528): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2021)
06-22 12:46:44.260: E/AndroidRuntime(25528): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2122)
06-22 12:46:44.260: E/AndroidRuntime(25528): at android.app.ActivityThread.access$600(ActivityThread.java:140)
06-22 12:46:44.260: E/AndroidRuntime(25528): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1228)
06-22 12:46:44.260: E/AndroidRuntime(25528): at android.os.Handler.dispatchMessage(Handler.java:99)
06-22 12:46:44.260: E/AndroidRuntime(25528): at android.os.Looper.loop(Looper.java:137)
06-22 12:46:44.260: E/AndroidRuntime(25528): at android.app.ActivityThread.main(ActivityThread.java:4895)
06-22 12:46:44.260: E/AndroidRuntime(25528): at java.lang.reflect.Method.invokeNative(Native Method)
06-22 12:46:44.260: E/AndroidRuntime(25528): at java.lang.reflect.Method.invoke(Method.java:511)
06-22 12:46:44.260: E/AndroidRuntime(25528): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
06-22 12:46:44.260: E/AndroidRuntime(25528): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
06-22 12:46:44.260: E/AndroidRuntime(25528): at dalvik.system.NativeStart.main(Native Method)
06-22 12:46:44.260: E/AndroidRuntime(25528): Caused by: java.lang.ClassNotFoundException: com.belgium.initial.initial
06-22 12:46:44.260: E/AndroidRuntime(25528): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
06-22 12:46:44.260: E/AndroidRuntime(25528): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
06-22 12:46:44.260: E/AndroidRuntime(25528): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
06-22 12:46:44.260: E/AndroidRuntime(25528): at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
06-22 12:46:44.260: E/AndroidRuntime(25528): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2012)
06-22 12:46:44.260: E/AndroidRuntime(25528): ... 11 more
Android Manifest如下:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
package="com.belgium.initial" android:versionName="1.1" android:versionCode="5" android:hardwareAccelerated="true">
<supports-screens
android:xlargeScreens="true"
/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application android:icon="@drawable/icon" android:label="Presbelg"
android:hardwareAccelerated="true"
android:debuggable="true"
>
<activity android:name=".initial" android:label="Presbelg"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
</manifest>
答案 0 :(得分:0)
<activity
android:name=".your_activity_name"
</activity>