2013-03-26 99 views
0

我在設置新的PlayN項目並在Android上運行時遇到問題。遊戲編譯,安裝,但不會運行。PlayN 1.6默認的maven項目部署,但不會在Android上運行

我使用mvn archetype:generate -DarchetypeGroupId=com.googlecode.playn -DarchetypeArtifactId=playn-archetype -DarchetypeVersion=1.6創建了一個新項目。

然後,甚至沒有不碰任何單個文件,我把它安裝到使用mvn -Pandroid install

Android模擬器實例,然後,我試圖運行的應用程序,但它只是絞死後,我試着運行它。

我試過了兩個不同的模擬器圖像,一個使用Android 2.3.3 ARM,另一個使用Android 4.2.2 ARM。

了Android的logcat日誌,其中如下因素

日誌中4.2.2 ARM的Android

I/ActivityManager( 289): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=net.sf.gnumaru.jogo.android/.JogoActivity} from pid 413 
W/WindowManager( 289): Failure taking screenshot for (123x164) to layer 21005 
I/Choreographer( 413): Skipped 132 frames! The application may be doing too much work on its main thread. 
E/SurfaceFlinger( 37): ro.sf.lcd_density must be defined as a build property 
D/dalvikvm(1235): Not late-enabling CheckJNI (already on) 
I/ActivityManager( 289): Start proc net.sf.gnumaru.jogo.android for activity net.sf.gnumaru.jogo.android/.JogoActivity: pid=1235 uid=10047 gids={50047, 1028} 
I/dalvikvm(1235): Turning on JNI app bug workarounds for target SDK version 11... 
I/Choreographer( 722): Skipped 40 frames! The application may be doing too much work on its main thread. 
E/Trace (1235): error opening trace file: No such file or directory (2) 
I/Choreographer( 289): Skipped 33 frames! The application may be doing too much work on its main thread. 
I/Choreographer( 289): Skipped 44 frames! The application may be doing too much work on its main thread. 
W/SurfaceFlinger( 37): createScreenshotSurface failed (Function not implemented) 
I/ActivityManager( 289): Config changes=1480 {1.0 310mcc260mnc en_US ldltr sw320dp w426dp h294dp 120dpi smll land finger qwerty/v/v -nav/h s.9} 
I/InputReader( 289): Reconfiguring input devices. changes=0x00000004 
I/InputReader( 289): Device reconfigured: id=0, name='qwerty2', size 240x320, orientation 1, mode 1, display id 0 
I/Choreographer( 289): Skipped 86 frames! The application may be doing too much work on its main thread. 
I/Choreographer( 289): Skipped 74 frames! The application may be doing too much work on its main thread. 
I/Choreographer(1235): Skipped 99 frames! The application may be doing too much work on its main thread. 
E/SurfaceFlinger( 37): ro.sf.lcd_density must be defined as a build property 
I/Choreographer( 289): Skipped 52 frames! The application may be doing too much work on its main thread. 
I/Choreographer( 289): Skipped 63 frames! The application may be doing too much work on its main thread. 
I/Choreographer( 289): Skipped 46 frames! The application may be doing too much work on its main thread. 
E/SurfaceFlinger( 37): ro.sf.lcd_density must be defined as a build property 
D/libEGL (1235): Emulator without GPU support detected. Fallback to software renderer. 
D/libEGL (1235): loaded /system/lib/egl/libGLES_android.so 
I/Choreographer(1235): Skipped 365 frames! The application may be doing too much work on its main thread. 
D/dalvikvm( 722): GC_FOR_ALLOC freed 6832K, 71% free 2947K/10148K, paused 494ms, total 497ms 
I/Choreographer( 289): Skipped 39 frames! The application may be doing too much work on its main thread. 
I/dalvikvm-heap( 722): Grow heap (frag case) to 9.125MB for 6410576-byte allocation 
D/gralloc_goldfish(1235): Emulator without GPU emulation detected. 
W/dalvikvm(1235): threadid=13: thread exiting with uncaught exception (group=0x40a71930) 
E/AndroidRuntime(1235): FATAL EXCEPTION: GLThread 87 
E/AndroidRuntime(1235): java.lang.IllegalArgumentException: No configs match configSpec 
E/AndroidRuntime(1235): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:863) 
E/AndroidRuntime(1235): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1024) 
E/AndroidRuntime(1235): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1401) 
E/AndroidRuntime(1235): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240) 
W/ActivityManager( 289): Force finishing activity net.sf.gnumaru.jogo.android/.JogoActivity 
W/WindowManager( 289): Failure taking screenshot for (109x145) to layer 21020 
D/dalvikvm( 722): GC_FOR_ALLOC freed 1K, 10% free 9206K/10148K, paused 378ms, total 379ms 
D/dalvikvm( 722): GC_CONCURRENT freed <1K, 10% free 9207K/10148K, paused 7ms+5ms, total 116ms 
D/dalvikvm( 289): GC_FOR_ALLOC freed 199K, 17% free 5336K/6356K, paused 183ms, total 190ms 
I/dalvikvm-heap( 289): Grow heap (frag case) to 5.435MB for 89296-byte allocation 
D/dalvikvm( 289): GC_FOR_ALLOC freed 11K, 17% free 5411K/6444K, paused 174ms, total 174ms 
W/SurfaceFlinger( 37): createScreenshotSurface failed (Function not implemented) 
I/ActivityManager( 289): Config changes=1480 {1.0 310mcc260mnc en_US ldltr sw320dp w320dp h401dp 120dpi smll port finger qwerty/v/v -nav/h s.10} 
W/ActivityManager( 289): Activity pause timeout for ActivityRecord{40d77818 u0 net.sf.gnumaru.jogo.android/.JogoActivity} 
I/ActivityManager( 289): Displayed net.sf.gnumaru.jogo.android/.JogoActivity: +2s593ms 
I/Choreographer( 289): Skipped 1027 frames! The application may be doing too much work on its main thread. 
W/IInputConnectionWrapper( 413): showStatusIcon on inactive InputConnection 
I/Choreographer( 289): Skipped 494 frames! The application may be doing too much work on its main thread. 
I/Choreographer(1235): Skipped 1217 frames! The application may be doing too much work on its main thread. 
I/InputReader( 289): Reconfiguring input devices. changes=0x00000004 
I/InputReader( 289): Device reconfigured: id=0, name='qwerty2', size 240x320, orientation 0, mode 1, display id 0 
I/InputReader( 289): Reconfiguring input devices. changes=0x00000004 
I/InputReader( 289): Device reconfigured: id=0, name='qwerty2', size 240x320, orientation 0, mode 1, display id 0 
I/Choreographer( 289): Skipped 360 frames! The application may be doing too much work on its main thread. 
I/Choreographer( 289): Skipped 34 frames! The application may be doing too much work on its main thread. 
I/Choreographer( 289): Skipped 41 frames! The application may be doing too much work on its main thread. 
I/Choreographer( 289): Skipped 442 frames! The application may be doing too much work on its main thread. 
E/SurfaceFlinger( 37): ro.sf.lcd_density must be defined as a build property 
I/Choreographer( 413): Skipped 793 frames! The application may be doing too much work on its main thread. 
I/Choreographer( 413): Skipped 59 frames! The application may be doing too much work on its main thread. 
I/Choreographer( 289): Skipped 38 frames! The application may be doing too much work on its main thread. 
D/dalvikvm( 722): GC_FOR_ALLOC freed 6828K, 71% free 2948K/10148K, paused 171ms, total 193ms 
I/dalvikvm-heap( 722): Grow heap (frag case) to 9.125MB for 6410576-byte allocation 
D/dalvikvm( 722): GC_CONCURRENT freed 1K, 10% free 9207K/10148K, paused 24ms+5ms, total 143ms 
D/dalvikvm( 289): GC_EXPLICIT freed 85K, 16% free 5444K/6444K, paused 7ms+35ms, total 204ms 
I/Choreographer( 722): Skipped 1352 frames! The application may be doing too much work on its main thread. 
I/Choreographer( 289): Skipped 39 frames! The application may be doing too much work on its main thread. 
D/ExchangeService( 661): Received deviceId from Email app: null 
D/ExchangeService( 661): !!! deviceId unknown; stopping self and retrying 
D/ExchangeService( 661): !!! EAS ExchangeService, onCreate 
D/ExchangeService( 661): !!! EAS ExchangeService, onStartCommand, startingUp = false, running = false 
D/ExchangeService( 661): !!! EAS ExchangeService, onStartCommand, startingUp = true, running = false 
W/ActivityManager( 289): Unable to start service Intent { act=com.android.email.ACCOUNT_INTENT } U=0: not found 
D/ExchangeService( 661): !!! Email application not found; stopping self 
W/ActivityManager( 289): Unable to start service Intent { act=com.android.email.ACCOUNT_INTENT } U=0: not found 
E/ActivityThread( 661): Service com.android.exchange.ExchangeService has leaked ServiceConnection [email protected]ff4a0 that was originally bound here 
E/ActivityThread( 661): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection [email protected]ff4a0 that was originally bound here 
E/ActivityThread( 661): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969) 
E/ActivityThread( 661): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863) 
E/ActivityThread( 661): at android.app.ContextImpl.bindService(ContextImpl.java:1418) 
E/ActivityThread( 661): at android.app.ContextImpl.bindService(ContextImpl.java:1407) 
E/ActivityThread( 661): at android.content.ContextWrapper.bindService(ContextWrapper.java:473) 
E/ActivityThread( 661): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157) 
E/ActivityThread( 661): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145) 
E/ActivityThread( 661): at com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116) 
E/ActivityThread( 661): at com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249) 
E/ActivityThread( 661): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856) 
E/ActivityThread( 661): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551) 
E/ActivityThread( 661): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549) 
E/ActivityThread( 661): at android.os.AsyncTask$2.call(AsyncTask.java:287) 
E/ActivityThread( 661): at java.util.concurrent.FutureTask.run(FutureTask.java:234) 
E/ActivityThread( 661): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 
E/ActivityThread( 661): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 
E/ActivityThread( 661): at java.lang.Thread.run(Thread.java:856) 
E/StrictMode( 661): null 
E/StrictMode( 661): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection [email protected]ff4a0 that was originally bound here 
E/StrictMode( 661): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969) 
E/StrictMode( 661): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863) 
E/StrictMode( 661): at android.app.ContextImpl.bindService(ContextImpl.java:1418) 
E/StrictMode( 661): at android.app.ContextImpl.bindService(ContextImpl.java:1407) 
E/StrictMode( 661): at android.content.ContextWrapper.bindService(ContextWrapper.java:473) 
E/StrictMode( 661): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157) 
E/StrictMode( 661): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145) 
E/StrictMode( 661): at com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116) 
E/StrictMode( 661): at com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249) 
E/StrictMode( 661): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856) 
E/StrictMode( 661): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551) 
E/StrictMode( 661): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549) 
E/StrictMode( 661): at android.os.AsyncTask$2.call(AsyncTask.java:287) 
E/StrictMode( 661): at java.util.concurrent.FutureTask.run(FutureTask.java:234) 
E/StrictMode( 661): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 
E/StrictMode( 661): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 
E/StrictMode( 661): at java.lang.Thread.run(Thread.java:856) 
W/ActivityManager( 289): Unbind failed: could not find connection for [email protected] 
E/ActivityThread( 661): Service com.android.exchange.ExchangeService has leaked ServiceConnection [email protected]ff0a8 that was originally bound here 
E/ActivityThread( 661): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection [email protected]ff0a8 that was originally bound here 
E/ActivityThread( 661): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969) 
E/ActivityThread( 661): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863) 
E/ActivityThread( 661): at android.app.ContextImpl.bindService(ContextImpl.java:1418) 
E/ActivityThread( 661): at android.app.ContextImpl.bindService(ContextImpl.java:1407) 
E/ActivityThread( 661): at android.content.ContextWrapper.bindService(ContextWrapper.java:473) 
E/ActivityThread( 661): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157) 
E/ActivityThread( 661): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145) 
E/ActivityThread( 661): at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191) 
E/ActivityThread( 661): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850) 
E/ActivityThread( 661): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551) 
E/ActivityThread( 661): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549) 
E/ActivityThread( 661): at android.os.AsyncTask$2.call(AsyncTask.java:287) 
E/ActivityThread( 661): at java.util.concurrent.FutureTask.run(FutureTask.java:234) 
E/ActivityThread( 661): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 
E/ActivityThread( 661): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 
E/ActivityThread( 661): at java.lang.Thread.run(Thread.java:856) 
E/StrictMode( 661): null 
E/StrictMode( 661): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection [email protected]ff0a8 that was originally bound here 
E/StrictMode( 661): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969) 
E/StrictMode( 661): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863) 
E/StrictMode( 661): at android.app.ContextImpl.bindService(ContextImpl.java:1418) 
E/StrictMode( 661): at android.app.ContextImpl.bindService(ContextImpl.java:1407) 
E/StrictMode( 661): at android.content.ContextWrapper.bindService(ContextWrapper.java:473) 
E/StrictMode( 661): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157) 
E/StrictMode( 661): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145) 
E/StrictMode( 661): at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191) 
E/StrictMode( 661): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850) 
E/StrictMode( 661): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551) 
E/StrictMode( 661): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549) 
E/StrictMode( 661): at android.os.AsyncTask$2.call(AsyncTask.java:287) 
E/StrictMode( 661): at java.util.concurrent.FutureTask.run(FutureTask.java:234) 
E/StrictMode( 661): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 
E/StrictMode( 661): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 
E/StrictMode( 661): at java.lang.Thread.run(Thread.java:856) 
D/dalvikvm( 661): GC_CONCURRENT freed 409K, 18% free 2512K/3060K, paused 5ms+26ms, total 76ms 
W/ActivityManager( 289): Unbind failed: could not find connection for [email protected] 

日誌中2.3.3 ARM ANDROID

I/ActivityManager( 70): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=net.sf.gnumaru.jogo.android/.JogoActivity } from pid 227 
I/ActivityManager( 70): Start proc net.sf.gnumaru.jogo.android for activity net.sf.gnumaru.jogo.android/.JogoActivity: pid=417 uid=10034 gids={} 
I/ARMAssembler( 70): generated scanline__00000177:03515104_00001002_00000000 [ 87 ipp] (110 ins) at [0x43bab6f0:0x43bab8a8] in 1571380 ns 
D/dalvikvm( 417): Trying to load lib /data/data/net.sf.gnumaru.jogo.android/lib/libplayn-android-nativelib.so 0x40514c78 
D/dalvikvm( 417): Added shared lib /data/data/net.sf.gnumaru.jogo.android/lib/libplayn-android-nativelib.so 0x40514c78 
D/dalvikvm( 417): No JNI_OnLoad found in /data/data/net.sf.gnumaru.jogo.android/lib/libplayn-android-nativelib.so 0x40514c78, skipping init 
I/WindowManager( 70): Setting rotation to 1, animFlags=1 
I/ActivityManager( 70): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=1/1 orien=2 layout=17 uiMode=17 seq=6} 
I/ActivityManager( 70): Displayed net.sf.gnumaru.jogo.android/.JogoActivity: +1s834ms 
D/libEGL ( 417): egl.cfg not found, using default config 
D/libEGL ( 417): loaded /system/lib/egl/libGLES_android.so 
W/dalvikvm( 417): threadid=11: thread exiting with uncaught exception (group=0x40015560) 
E/AndroidRuntime( 417): FATAL EXCEPTION: GLThread 12 
E/AndroidRuntime( 417): java.lang.IllegalArgumentException: No configs match configSpec 
E/AndroidRuntime( 417): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:763) 
E/AndroidRuntime( 417): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:919) 
E/AndroidRuntime( 417): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1264) 
E/AndroidRuntime( 417): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118) 
W/ActivityManager( 70): Force finishing activity net.sf.gnumaru.jogo.android/.JogoActivity 
W/InputManagerService( 70): Starting input on non-focused client [email protected] (uid=10034 pid=417) 
W/InputManagerService( 70): Client not active, ignoring focus gain of: [email protected] 
W/ActivityManager( 70): Activity pause timeout for HistoryRecord{4066ab48 net.sf.gnumaru.jogo.android/.JogoActivity} 
D/dalvikvm( 70): GC_EXPLICIT freed 208K, 61% free 4205K/10567K, external 809K/1222K, paused 307ms 
I/WindowManager( 70): Setting rotation to 0, animFlags=1 
I/ActivityManager( 70): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=1/1 orien=1 layout=17 uiMode=17 seq=7} 
I/ContactsDatabaseHelper( 224): Switching to locale en_US 
D/dalvikvm( 224): GC_CONCURRENT freed 430K, 53% free 2794K/5895K, external 410K/517K, paused 10ms+9ms 
D/dalvikvm( 70): GC_EXPLICIT freed 26K, 61% free 4199K/10567K, external 807K/1222K, paused 209ms 
I/ContactsDatabaseHelper( 224): Locale change completed in 2358ms 

我我的吼聲問題是相似的下面的那個:

android artifact built in playn deploied but not running

但這個問題沒有幫助我。

我使用的是Linux操作系統Ubuntu 12.10 X86_64,最新的Android SDK(21.1)和最新的Maven(3.0.5)

在此先感謝。

回答

2

我解決了我的問題。

Android模擬器沒有(或沒有)支持OpenGL ES 2.0,並且PlayN強制您使用它。

我試過在真實手機上部署和運行應用程序,並且它正常工作。奇怪的是,android模擬器的最新版本(請參閱下面的鏈接)應該通過翻譯而不是指令模擬來支持OpenGL ES 2.0:模擬器GL ES入口被轉換爲正常的OpenGL指令,並由主機系統GPU直接處理,在模擬器正在運行。

http://www.learnopengles.com/android-emulator-now-supports-native-opengl-es2-0/

但是,我沒能得到它在Ubuntu 12.10 X86_64的工作,而我還沒有嘗試過在MS Windows呢。