LibGDX Application does not start

Hi Gergely

Thank you so much for your great tutorial!

Thanks to this tutorial, my project was successfully build as MOE project and iOS simulator showed up.

Configuration on demand is an incubating feature.
:ios-moe:copyNatives
:core:compileJava UP-TO-DATE
:core:processResources UP-TO-DATE
:core:classes UP-TO-DATE
:core:jar UP-TO-DATE
:ios-moe:compileJava UP-TO-DATE
:ios-moe:processResources UP-TO-DATE
:ios-moe:classes UP-TO-DATE
:ios-moe:moeMainProGuard UP-TO-DATE
:ios-moe:moeMainRetrolambda UP-TO-DATE
:ios-moe:moeMainDex UP-TO-DATE
:ios-moe:moeMainDebugX86Dex2Oat UP-TO-DATE
:ios-moe:moeMainResourcePackager UP-TO-DATE
:ios-moe:moeMainStartupProvider UP-TO-DATE
:ios-moe:moeMainUITransformer SKIPPED
:ios-moe:moeMainDebugI386IphonesimulatorXcodeProvider
:ios-moe:moeMainDebugX86_64Dex2Oat UP-TO-DATE
:ios-moe:moeMainDebugX86_64IphonesimulatorXcodeProvider
:ios-moe:moeXcodeProjectGenerator SKIPPED
:ios-moe:moeMainDebugIphonesimulatorXcodeBuild
:ios-moe:moeLaunch

BUILD SUCCESSFUL

Total time: 36.12 secs

However, after that, the logo of libGDX showed up and my app has stopped. In the case with Android run configuration, it starts normally and I can play the game.

I didn’ t make any changes in ‘ios-moe’ folders created in installing MOE.

I’m appreciated if you would give me any advise for avoiding this situation (Do I need to make any changes in IOSMoeLauncher.java or any gradle files or something else to do?). Thank you so much for your help.

Dear keybow007,

I moved your question to its own topic.

No, you should not have to change anything in the generated project.

From the screenshot that you sent, it looks like you were starting the app in debug mode. In the log part we can see that the JDWP agent was waiting for the debugger to connect, but that did not happen for some reason. When running on the simulator, an app has about 30sec to get to the end of the applicationDidFinishLaunching*() methods in the UIApplicationDelegate that was passed to the UIApplicationMain(). Since your app got stuck at waiting for the JDWP connection, it never got there and the iOS Simulator killed the app.

In order to help us reproduce this issue, could you please answer the following:

  • Did you start the ios-moe run configuration that is shown on the screenshot with the little bug icon at the top? If not, how?
  • Could you provide us with your HW and SW configuration (CPU, amount of RAM, SSD or HDD, which version of macOS, Android Studio, Multi-OS Engine Android Studio Plugin and Xcode)?
  • Could you please try launching your app in “Run” mode with the green play button instead of debug? Does it start then?

Best Regards,
Gergely

Dear Gergely

Thank you so much for quick reply! My answers of your questions as follows.

•	Did you start the ios-moe run configuration that is shown on the screenshot with the little bug icon at the top? If not, how?
=> Yes, I did.

•	Could you provide us with your HW and SW configuration (CPU, amount of RAM, SSD or HDD, which version of macOS, Android Studio, Multi-OS Engine Android Studio Plugin and Xcode)?
=> CPU : 2.6GHz Dual Core Intel Core i5 / RAM : 8GB / 1TB HDD / OS : El Captain / Android Studio 2.1.3 / MOE 1.1.0 / Xcode 7.3.1

•	Could you please try launching your app in "Run" mode with the green play button instead of debug? Does it start then?
=> Unfortunately, it didn’t work.  “Run” mode brought me “UnsatisfiedLinkError”. Please see below.

/Users/telulullc/AndroidStudioProjects/Memorenger_ios_moe/gradlew moeLaunch -Pmoe.launcher.options=no-build,config:Debug -Pmoe.launcher.simulators=AB727577-CCAC-45C2-B030-CC3991CBCEC3
Configuration on demand is an incubating feature.
:ios-moe:moeLaunchart I 6778 432430 /Volumes/SSD/gh-moe-master/aosp/art/runtime/parsed_options.cc:449] setting boot class path to /Users/telulullc/Library/Developer/CoreSimulator/Devices/AB727577-CCAC-45C2-B030-CC3991CBCEC3/data/Containers/Bundle/Application/DE479873-7DF6-4D6E-B2BF-465DD1ECB4F5/ios-moe.app/application.jar:/Users/telulullc/Library/Developer/CoreSimulator/Devices/AB727577-CCAC-45C2-B030-CC3991CBCEC3/data/Containers/Bundle/Application/DE479873-7DF6-4D6E-B2BF-465DD1ECB4F5/ios-moe.app
art W 6778 432430 /Volumes/SSD/gh-moe-master/aosp/art/runtime/native/java_lang_Runtime.cc:65] android_update_LD_LIBRARY_PATH not found; .so dependencies will not work!
art W 6778 432430 /Volumes/SSD/gh-moe-master/aosp/art/runtime/native/java_lang_Runtime.cc:65] android_update_LD_LIBRARY_PATH not found; .so dependencies will not work!
art E 6778 432430 /Volumes/SSD/gh-moe-master/aosp/art/runtime/java_vm_ext.cc:255] No implementation found for void com.badlogic.gdx.backends.iosrobovm.IOSGLES20.init() (tried Java_com_badlogic_gdx_backends_iosrobovm_IOSGLES20_init and Java_com_badlogic_gdx_backends_iosrobovm_IOSGLES20_init__)
java.lang.UnsatisfiedLinkError: No implementation found for void com.badlogic.gdx.backends.iosrobovm.IOSGLES20.init() (tried Java_com_badlogic_gdx_backends_iosrobovm_IOSGLES20_init and Java_com_badlogic_gdx_backends_iosrobovm_IOSGLES20_init__)
at com.badlogic.gdx.backends.iosrobovm.IOSGLES20.init(Native Method)
at com.badlogic.gdx.backends.iosrobovm.IOSGLES20.(IOSGLES20.java:28)
at com.badlogic.gdx.backends.iosmoe.IOSGraphics.init(IOSGraphics.java:118)
at com.badlogic.gdx.backends.iosmoe.IOSApplication.didFinishLaunching(IOSApplication.java:162)
at com.badlogic.gdx.backends.iosmoe.IOSApplication$Delegate.applicationDidFinishLaunchingWithOptions(IOSApplication.java:75)
at ios.uikit.c.UIKit.UIApplicationMain(Native Method)
at net.minpro.memoranger_ios_moe.IOSMoeLauncher.main(IOSMoeLauncher.java:25)
art I 6780 432580 /Volumes/SSD/gh-moe-master/aosp/art/runtime/parsed_options.cc:449] setting boot class path to /Users/telulullc/Library/Developer/CoreSimulator/Devices/AB727577-CCAC-45C2-B030-CC3991CBCEC3/data/Containers/Bundle/Application/DE479873-7DF6-4D6E-B2BF-465DD1ECB4F5/ios-moe.app/application.jar:/Users/telulullc/Library/Developer/CoreSimulator/Devices/AB727577-CCAC-45C2-B030-CC3991CBCEC3/data/Containers/Bundle/Application/DE479873-7DF6-4D6E-B2BF-465DD1ECB4F5/ios-moe.app
art W 6780 432580 /Volumes/SSD/gh-moe-master/aosp/art/runtime/native/java_lang_Runtime.cc:65] android_update_LD_LIBRARY_PATH not found; .so dependencies will not work!
art W 6780 432580 /Volumes/SSD/gh-moe-master/aosp/art/runtime/native/java_lang_Runtime.cc:65] android_update_LD_LIBRARY_PATH not found; .so dependencies will not work!

IOSApplication 3 iOS version: 9.3
IOSApplication 3 scale: 2.0
IOSApplication 3 Status bar is visible (height = 20.0)
IOSApplication 3 Total computed bounds are w=640.0 h=920.0

BUILD SUCCESSFUL

Total time: 1 mins 13.491 secs

Thank you so much for your help.

Thanks.
keybow

Hi,

this is very weird. It looks like the app can’t find the native side of libgdx. Could you send us the project in a zip, so we can take a look?

Best Regards,
Gergely

Hi Gergely

Thanks for your reply.

Attached is the link of the project file as per your request.
(The file size is too big to be uploaded as attached file.)
the hyperlink of the project file

Please click “ダウンロード” on the top left so you can download the file.

Thank you so much for your help.

Regards
keybow

Hi,

Please remove the comment from the line 78 in the build.gradle file. The result should look like this:

dependencies {
    compile project(":core")
    compile "com.badlogicgames.gdx:gdx-backend-moe:$gdxVersion"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
    natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-ios"
}

Best Regards,
István

Hi István

Thanks for your reply.

Unfortunately, removing the comment as you suggested resulted in the error saying “Error:(70, 0) MOE SDK is probably damaged, please remove it manually from /Users/telulullc/.moe/moe-sdk-1.1.0”.

May I remove MOE SDK like the message said or is there anything else I can do?
If I can remove MOE SDK, could you tell me what to do after that (reinstall MOE plugin, recreate libGDX project from the beginning and so on)?

Thank you so much for your help?

Regards
keybow

Hi,

If you remove the moe-1.1.0 directory, as suggested, the SDK will be downloaded and re-installed automatically when the Gradle build is executed again. You should not need to do anything else by hand.

Best Regards,
Gergely

Hi

Thanks for your quick reply.

Removing MOE directly as suggested did work well but launching with “Run” configuration did not work bringing the following error.

/Users/telulullc/AndroidStudioProjects/Memorenger_ios_moe/gradlew moeLaunch -Pmoe.launcher.options=no-build,config:Debug -Pmoe.launcher.simulators=AB727577-CCAC-45C2-B030-CC3991CBCEC3
Configuration on demand is an incubating feature.
:ios-moe:moeLaunchart I 978 43349 /Volumes/SSD/gh-moe-master/aosp/art/runtime/parsed_options.cc:449] setting boot class path to /Users/telulullc/Library/Developer/CoreSimulator/Devices/AB727577-CCAC-45C2-B030-CC3991CBCEC3/data/Containers/Bundle/Application/AF3550CC-2F7E-462E-8FB3-1098147E3DD9/ios-moe.app/application.jar:/Users/telulullc/Library/Developer/CoreSimulator/Devices/AB727577-CCAC-45C2-B030-CC3991CBCEC3/data/Containers/Bundle/Application/AF3550CC-2F7E-462E-8FB3-1098147E3DD9/ios-moe.app
art W 978 43349 /Volumes/SSD/gh-moe-master/aosp/art/runtime/native/java_lang_Runtime.cc:65] android_update_LD_LIBRARY_PATH not found; .so dependencies will not work!
art W 978 43349 /Volumes/SSD/gh-moe-master/aosp/art/runtime/native/java_lang_Runtime.cc:65] android_update_LD_LIBRARY_PATH not found; .so dependencies will not work!
2016-09-10 07:01:10.347 ios-moe[978:43638] 07:01:10.347 WARNING: 40: ERROR: couldn’t get default input device, ID = 0, err = 0!
2016-09-10 07:01:10.392 ios-moe[978:43638] 07:01:10.392 WARNING: 803: The default input device 0x0 ‘(null)’ has no input channels.
2016-09-10 07:01:11.610 ios-moe[978:43349] OAL Error: -[OALAudioTrack preloadUrl:seekTime:]: <OALAudioTrack: 0x7aed1500: (null)>: Could not load URL file:///Users/telulullc/Library/Developer/CoreSimulator/Devices/AB727577-CCAC-45C2-B030-CC3991CBCEC3/data/Containers/Bundle/Application/AF3550CC-2F7E-462E-8FB3-1098147E3DD9/ios-moe.app/assets/sound/musicGameStart09.mp3: The operation couldn’t be completed. (OSStatus error 1685348671.)
com.badlogic.gdx.utils.GdxRuntimeException: Error opening music file at /Users/telulullc/Library/Developer/CoreSimulator/Devices/AB727577-CCAC-45C2-B030-CC3991CBCEC3/data/Containers/Bundle/Application/AF3550CC-2F7E-462E-8FB3-1098147E3DD9/ios-moe.app/assets/sound/musicGameStart09.mp3
at com.badlogic.gdx.backends.iosmoe.IOSAudio.newMusic(IOSAudio.java:67)
at net.minpro.memoranger_ios_moe.Assets.load(Assets.java:387)
at net.minpro.memoranger_ios_moe.Memoranger.create(Memoranger.java:27)
at com.badlogic.gdx.backends.iosmoe.IOSGraphics.glkViewDrawInRect(IOSGraphics.java:228)
at com.badlogic.gdx.backends.iosmoe.IOSGLKView.drawRect(IOSGLKView.java:76)
at ios.uikit.c.UIKit.UIApplicationMain(Native Method)
at net.minpro.memoranger_ios_moe.IOSMoeLauncher.main(IOSMoeLauncher.java:25)

IOSApplication 3 iOS version: 9.3
IOSApplication 3 scale: 2.0
IOSApplication 3 Status bar is visible (height = 20.0)
IOSApplication 3 Total computed bounds are w=640.0 h=920.0
IOSGraphics 3 Display: ppi=163, density=2.0
IOSApplication 3 created
IOSApplication 3 resumed
IOSApplication 3 Status bar is visible (height = 20.0)
IOSApplication 3 Total computed bounds are w=640.0 h=920.0

BUILD SUCCESSFUL

Total time: 1 mins 27.294 secs

I don’t know how this happens while launching in Android is no problem. Could you give me any advices?

Thank you so much for your help.

Regards
keybow

In terms of “WARNING: 40: ERROR: couldn’t get default input device, ID = 0, err = 0!”, putting external microphone through USB solved the problem.

“GdxRuntimeException” issue still remains but deleting the detected file made my app successfully be launched as moe application, which means there seems to be something wrong with the file and it is not the MOE-related problem any more.

Thank you so much for your help.

Regards
keybow

I solved it by setting ios-moe to custom again. Screenshot: https://image.ibb.co/gdMiM8/custom.png