我想在eclipse juno上運行一個android項目並在三星標籤10.1上測試它。 該項目的.apk文件正在我的comp上創建,但它沒有在選項卡上正確加載。 有人可以幫我解決這個問題嗎?.apk文件沒有在eclipse上創建
編輯:Android版本是4.1.2這與標籤相同。從選項卡得到的錯誤是「不幸的是,AppName已停止。」同樣的項目在另一臺機器上工作正常。我剛剛在eclipse中導入了代碼庫。
日誌如下。
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清單如下:
<?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>
你要導出APK?或者如果你的意思是你只想要未簽名的apk,則每次在項目bin文件夾中運行應用程序時都會創建apk。 – Milan
我改變了我的問題。 .apk文件正在創建正確,但沒有得到正確加載在選項卡 – user2511113
是否給logcat一些錯誤? – KOTIOS