Game Development Community

Torque 2D android setup

by Bruce Morick · in Torque 2D Beginner · 04/05/2016 (3:17 pm) · 6 replies

Does anyone have an ANDROID STUDIO setup document similar to what Mike Lilligreen did for ECLIPSE?

#1
04/05/2016 (10:44 pm)
I have put together a crude, but working quickstart guide for you:
Torque 2D Android Studio Guide
#2
04/06/2016 (7:24 am)
Thank you...
#3
04/07/2016 (5:06 pm)
@Nathan - The guide helped very much. But I got the following error when trying to run the application. Any ideas?

$ adb shell am start -n "com.garagegames.torque2d/com.garagegames.torque2d.MyNativeActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error while executing: am start -n "com.garagegames.torque2d/com.garagegames.torque2d.MyNativeActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.garagegames.torque2d/.MyNativeActivity }
Error type 3
Error: Activity class {com.garagegames.torque2d/com.garagegames.torque2d.MyNativeActivity} does not exist.

Error while Launching activity
#4
04/07/2016 (8:29 pm)
Are you sure you're using Torque 2D at least v3.3 or development branch? Cause they're working fine for me for compiling then uploading and running T2D on my Fire tablet using Android 5.1. Now I did clone the github repository directly and did not try the release page archive files though.

If you believe you are indeed using latest code then please do the following for me:
  1. in Android Studio click on Build menu then Clean Project

  2. Next zip up this directory:
  3. Torque2D/engine/compilers/android-studio
    except for, meaning exclude zipping, this directory:
    Torque2D/engine/compilers/android-studio/build

  4. And last upload the zip archive of android-studio to dropbox or somewhere that you can link here so I can acquire it and check the android build files to see what's going on.
#5
04/07/2016 (8:59 pm)
I downloaded the Torque2D-3.3-win.zip. It appears to be the correct version because I am now using positional audio released with 3.3. I having been playing around with different options. I did get it to load the APK on the device (Galaxy S6) 1 time but it failed to start. I ran it a second time and got a similar message again

com.garagegames.torque2d/com.garagegames.torque2d.MyNativeActivity} does not exist

strange... I will continue to play...
#6
04/09/2016 (5:24 pm)
I cloned the latest git version (thanks Peter for fixing the version number) and selected SDK 23 (Galaxy S6 with Android 6.0.1) "Make Project" and "Run" and got the following on the phone.

"Unfortunately, Torque2d has stopped."

So the APK was created and stored on the device but something is stopping it from running. I had this happen in ECLIPSE before caused by access name problems. (com.garagegames.torque2d A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4000 in tid 31057 (NativeThread))

So I am at a loss...