0

我无法设置新的 PlayN 项目并在 Android 上运行它。游戏编译,安装,但它不会运行。

我已经使用mvn archetype:generate -DarchetypeGroupId=com.googlecode.playn -DarchetypeArtifactId=playn-archetype -DarchetypeVersion=1.6.

然后,甚至没有触及任何单个文件,我将它安装到 Android Emulator 实例使用mvn -Pandroid install

然后,我尝试运行该应用程序,但在我尝试运行它之后它就挂起。

我已经用两个不同的模拟器图像进行了尝试,一个使用 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 com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cff4a0 that was originally bound here
E/ActivityThread(  661): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cff4a0 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 com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cff4a0 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 android.os.BinderProxy@40e15c40
E/ActivityThread(  661): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cff0a8 that was originally bound here
E/ActivityThread(  661): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cff0a8 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 com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cff0a8 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 android.os.BinderProxy@40e25018

登录 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 com.android.internal.view.IInputMethodClient$Stub$Proxy@40952df0 (uid=10034 pid=417)
W/InputManagerService(   70): Client not active, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4079e5f8
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

我认为我的问题类似于以下问题:

playn内置的android工件已部署但未运行

但是这个问题对我没有帮助。

我正在使用 Linux Ubuntu 12.10 X86_64、最新的 android sdk (21.1) 和最新的 maven (3.0.5)

提前致谢。

4

1 回答 1

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 上尝试过。

于 2013-03-27T02:04:19.353 回答