2012-06-15 3 views
2

기본 Android 프로젝트를 수행했습니다. 나는 AVD와 모든 일식과 함께 그것을 실행합니다. 실행중인 앱입니다. 모두가 잘 보인다 mvn android:deploy하지만 AVD는 말한다 :하지만 때 Unfortunately App has stoppedmvn android : deploy -> 불행히도 앱이 중지되었습니다.

깨끗한 MVN

[INFO] Scanning for projects... 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building SakebuApp 1.0.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ SakebuApp --- 
[INFO] Deleting C:\Workspace\SakebuApp\target 
[INFO] 
[INFO] --- android-maven-plugin:3.2.0:generate-sources (default-generate-sources) @ SakebuApp --- 
[INFO] ANDROID-904-002: Found aidl files: Count = 0 
[INFO] ANDROID-904-002: Found aidl files: Count = 0 
[INFO] C:\Program Files (x86)\Android\android-sdk\platform-tools\aapt.exe [package, -m, -J, C:\Workspace\SakebuApp\target\generated-sources\r, -M, C:\Workspace\SakebuApp\AndroidManifest.xml, -S, C:\Workspace\SakebuApp\res, --auto-add-overlay, -A, C:\Workspace\SakebuApp\assets, -I, C:\Program Files (x86)\Android\android-sdk\platforms\android-15\android.jar] 
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ SakebuApp --- 
[debug] execute contextualize 
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! 
[INFO] skip non existing resourceDirectory C:\Workspace\SakebuApp\src\main\resources 
[INFO] skip non existing resourceDirectory C:\Workspace\SakebuApp\target\generated-sources\extracted-dependencies\src\main\resources 
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ SakebuApp --- 
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! 
[INFO] Compiling 1 source file to C:\Workspace\SakebuApp\target\classes 
[INFO] 
[INFO] --- android-maven-plugin:3.2.0:proguard (default-proguard) @ SakebuApp --- 
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ SakebuApp --- 
[debug] execute contextualize 
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! 
[INFO] skip non existing resourceDirectory C:\Workspace\SakebuApp\src\test\resources 
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ SakebuApp --- 
[INFO] No sources to compile 
[INFO] 
[INFO] --- maven-surefire-plugin:2.12:test (default-test) @ SakebuApp --- 
[INFO] No tests to run. 
[INFO] Surefire report directory: C:\Workspace\SakebuApp\target\surefire-reports 

------------------------------------------------------- 
T E S T S 
------------------------------------------------------- 

Results : 

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 

[INFO] 
[INFO] --- android-maven-plugin:3.2.0:emma (default-emma) @ SakebuApp --- 
[INFO] 
[INFO] --- android-maven-plugin:3.2.0:dex (default-dex) @ SakebuApp --- 
[INFO] C:\Program Files\Java\jdk1.6.0_22\jre\bin\java [-Xmx1024M, -jar, C:\Program Files (x86)\Android\android-sdk\platform-tools\lib\dx.jar, --dex, --output=C:\Workspace\SakebuApp\target\classes.dex, C:\Workspace\SakebuApp\target\classes] 
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ SakebuApp --- 
[INFO] Building jar: C:\Workspace\SakebuApp\target\SakebuApp.jar 
[INFO] 
[INFO] --- android-maven-plugin:3.2.0:apk (default-apk) @ SakebuApp --- 
[INFO] Copying local assets files to combined assets directory. 
[INFO] C:\Program Files (x86)\Android\android-sdk\platform-tools\aapt.exe [package, -f, -M, C:\Workspace\SakebuApp\AndroidManifest.xml, -S, C:\Workspace\SakebuApp\res, --auto-add-overlay, -A, C:\Workspace\SakebuApp\target\generated-sources\combined-assets\assets, -I, C:\Program Files (x86)\Android\android-sdk\platforms\android-15\android.jar, -F, C:\Workspace\SakebuApp\target\SakebuApp.ap_] 
[INFO] 
[INFO] --- android-maven-plugin:3.2.0:internal-pre-integration-test (default-internal-pre-integration-test) @ SakebuApp --- 
[INFO] No InstrumentationRunner found - skipping tests 
[INFO] 
[INFO] --- android-maven-plugin:3.2.0:internal-integration-test (default-internal-integration-test) @ SakebuApp --- 
[INFO] No InstrumentationRunner found - skipping tests 
[INFO] 
[INFO] --- maven-source-plugin:2.1.2:jar-no-fork (attach-sources) @ SakebuApp --- 
[INFO] Building jar: C:\Workspace\SakebuApp\target\SakebuApp-sources.jar 
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ SakebuApp --- 
[INFO] Installing C:\Workspace\SakebuApp\target\SakebuApp.apk to C:\Users\HP\.m2\repository\com\sakebu\android\SakebuApp\1.0.0-SNAPSHOT\SakebuApp-1.0.0-SNAPSHOT.apk 
[INFO] Installing C:\Workspace\SakebuApp\pom.xml to C:\Users\HP\.m2\repository\com\sakebu\android\SakebuApp\1.0.0-SNAPSHOT\SakebuApp-1.0.0-SNAPSHOT.pom 
[INFO] Installing C:\Workspace\SakebuApp\target\SakebuApp.jar to C:\Users\HP\.m2\repository\com\sakebu\android\SakebuApp\1.0.0-SNAPSHOT\SakebuApp-1.0.0-SNAPSHOT.jar 
[INFO] Installing C:\Workspace\SakebuApp\target\SakebuApp-sources.jar to C:\Users\HP\.m2\repository\com\sakebu\android\SakebuApp\1.0.0-SNAPSHOT\SakebuApp-1.0.0-SNAPSHOT-sources.jar 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD SUCCESS 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 6.910s 
[INFO] Finished at: Fri Jun 15 02:39:34 CEST 2012 
[INFO] Final Memory: 20M/152M 
[INFO] ------------------------------------------------------------------------ 

MVN 안드로이드를 설치 배포

[INFO] Scanning for projects... 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building SakebuApp 1.0.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- android-maven-plugin:3.2.0:deploy (default-cli) @ SakebuApp --- 
[INFO] C:\Program Files (x86)\Android\android-sdk\platform-tools\aapt.exe [dump, xmltree, C:\Workspace\SakebuApp\target\SakebuApp.apk, AndroidManifest.xml] 
N: android=http://schemas.android.com/apk/res/android 
    E: manifest (line=2) 
    A: android:versionCode(0x0101021b)=(type 0x10)0x1 
    A: android:versionName(0x0101021c)="1.0" (Raw: "1.0") 
    A: package="com.sakebu.android" (Raw: "com.sakebu.android") 
    E: uses-sdk (line=7) 
     A: android:minSdkVersion(0x0101020c)=(type 0x10)0xf 
    E: application (line=9) 
     A: android:label(0x01010001)[email protected] 
     A: android:icon(0x01010002)[email protected] 
     E: activity (line=12) 
     A: android:label(0x01010001)[email protected] 
     A: android:name(0x01010003)=".SakebuAppActivity" (Raw: ".SakebuAppActivity") 
     E: intent-filter (line=15) 
      E: action (line=16) 
      A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN") 
      E: category (line=18) 
      A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER") 
[INFO] Waiting for initial device list from the Android Debug Bridge 
[INFO] Found 1 devices connected with the Android Debug Bridge 
[INFO] android.device parameter not set, using all attached devices 
[INFO] Successfully uninstalled com.sakebu.android from emulator-5554_sakebuEM_unknown_sdk 
[INFO] Found 1 devices connected with the Android Debug Bridge 
[INFO] android.device parameter not set, using all attached devices 
[INFO] Successfully installed C:\Workspace\SakebuApp\target\SakebuApp.apk to emulator-5554_sakebuEM_unknown_sdk 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD SUCCESS 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 22.919s 
[INFO] Finished at: Fri Jun 15 02:42:38 CEST 2012 
[INFO] Final Memory: 11M/111M 
[INFO] ------------------------------------------------------------------------ 

의 pom.xml

나는 아이콘 응용 프로그램을 클릭

출력 : Unfortunately App has stopped

출력 달빅 내가 MVN 안드로이드를 실행

06-15 08:53:39.025: D/AndroidRuntime(2173): Shutting down VM 
06-15 08:53:39.025: W/dalvikvm(2173): threadid=1: thread exiting with uncaught exception (group=0x409c01f8) 
06-15 08:53:39.055: E/AndroidRuntime(2173): FATAL EXCEPTION: main 
06-15 08:53:39.055: E/AndroidRuntime(2173): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.sakebu.android/com.sakebu.android.SakebuAppActivity}: java.lang.ClassNotFoundException: com.sakebu.android.SakebuAppActivity 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at android.app.ActivityThread.access$600(ActivityThread.java:123) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at android.os.Handler.dispatchMessage(Handler.java:99) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at android.os.Looper.loop(Looper.java:137) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at android.app.ActivityThread.main(ActivityThread.java:4424) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at java.lang.reflect.Method.invokeNative(Native Method) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at java.lang.reflect.Method.invoke(Method.java:511) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at dalvik.system.NativeStart.main(Native Method) 
06-15 08:53:39.055: E/AndroidRuntime(2173): Caused by: java.lang.ClassNotFoundException: com.sakebu.android.SakebuAppActivity 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at android.app.Instrumentation.newActivity(Instrumentation.java:1023) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871) 
06-15 08:53:39.055: E/AndroidRuntime(2173):  ... 11 more 
06-15 08:53:39.265: I/dalvikvm(2173): threadid=3: reacting to signal 3 
06-15 08:53:39.285: I/dalvikvm(2173): Wrote stack traces to '/data/anr/traces.txt' 
06-15 08:53:39.705: I/dalvikvm(2173): threadid=3: reacting to signal 3 
06-15 08:53:39.775: I/dalvikvm(2173): Wrote stack traces to '/data/anr/traces.txt' 
+0

빌드가 잘되어서 앱이 왜 멈추는 지 알고 싶다면 logcat 출력을 봐야 할 것입니다. stacktrace를 찾으십시오. 예외는 무엇이 잘못되었는지 알려줍니다. – Christine

+0

출력 Dalvik을 게시합니다. 그것은 나에게 프로젝트 주 활동에서 ClassNotFoundExpection을 제공합니다. 하지만 그때 내가 왜 일식에서 직접 ADV를 실행하는 경우에는 이해가 안되요, 예, 어떤 문제도 해결할 수 있습니다. –

답변

0

를 배포가 나는 새로운 받는다는 안드로이드 프로젝트를 만들었습니다. 나는 그 문제가 잘못된 아키타 입형이라고 생각한다. 나는이 프로젝트의 새로운 단계 인 m2Eclipse Integration을 따라 갔지만, android-maven-plugin을 3.2.0 버전으로 업데이트해야한다.

관련 문제