wmora/martianrun

Maintain string resources

Closed this issue · 10 comments

Thank you very much for the great tutorial and for providing the source code, it is the best libGDX tutorial I've found.

I am not able to compile the game as I am not sure how to update the string resources. I thought in the res/xml folder there should be strings.xml, but there is only app_tracker_config.xml, which doesn't look like the place to update.

Best regards,
Stoil

wmora commented

@stoil hi! Add the strings to your res/values/strings.xml or create a separate XML file in the same directory

Thanks for the quick response!
But actually to get google services id I need to first add the game to Google Play, and I am not ready to do that. Is there a way to disable from within the code the services functionality with the achievements, scores, etc. and to have just the game?

Best regards,
Stoil

Hi William,

I added the string resources to res/values/strings.xml, just like they are in your setup instructions (with the XXXX...), and the project can compile and APK can be generated, however on my phone (HTC EVO 3D) both in run mode with the phone connected, and when running the installed program from the APK on the phone, only the music is playing and message "Martin RunHas Stopped!" is displayed.
I am using Android Studio.

wmora commented

Hmmm do you have a log?

This is the log, when running on connected phone:

Waiting for device.
Target device: htc-htc_evo_3d_x515m-SH1CPV200700
Uploading file
local path: C:\Stoil\Android\martianrun-master4\martianrun-master\android\build\outputs\apk\android-debug.apk
remote path: /data/local/tmp/com.gamestudio24.cityescape.android
No apk changes detected. Skipping file upload, force stopping package instead.
DEVICE SHELL COMMAND: am force-stop com.gamestudio24.cityescape.android
Launching application: com.gamestudio24.cityescape.android/com.gamestudio24.martianrun.android.AndroidLauncher.
DEVICE SHELL COMMAND: am start -n "com.gamestudio24.cityescape.android/com.gamestudio24.martianrun.android.AndroidLauncher" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.gamestudio24.cityescape.android/com.gamestudio24.martianrun.android.AndroidLauncher }

On the phone I get the message that Martian Run had stopped working and the music is playing...

Best regards,
Stoil

Just to add that the desktop compiles without any problem, just the Android is not working...

wmora commented

Ok, good to know. I wont be able to take a look at this for a few days.
Will let you know once I do.

On Mon, Apr 6, 2015, 11:22 stoil2 notifications@github.com wrote:

Just to add that the desktop compiles without any problem, just the
Android is not working...


Reply to this email directly or view it on GitHub
#3 (comment).

Thanks.

Sorry, I think I didn't give the relevant log (I am new to android development and Android Studio). This is in red from logcat:

04-06 22:04:45.817 401-401/com.gamestudio24.cityescape.android E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.ff.a

04-06 22:04:47.228 401-506/com.gamestudio24.cityescape.android E/Adreno200-EGL﹕ <qeglDrvAPI_eglGetConfigAttrib:484>: EGL_BAD_ATTRIBUTE
04-06 22:04:47.228 401-506/com.gamestudio24.cityescape.android E/Adreno200-EGL﹕ <qeglDrvAPI_eglGetConfigAttrib:484>: EGL_BAD_ATTRIBUTE

04-06 22:04:48.970 401-401/com.gamestudio24.cityescape.android E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.IllegalStateException: A fatal developer error has occurred. Check the logs for further information.
at com.google.android.gms.internal.ff$h.b(Unknown Source)
at com.google.android.gms.internal.ff$h.a(Unknown Source)
at com.google.android.gms.internal.ff$b.eN(Unknown Source)
at com.google.android.gms.internal.ff$a.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4945)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)

Best regards,
Stoil

I solved the issue. The problem was that I left xxxx as app_id, and also had to modify the Android manifest.
Sorry for bugging you on this and thanks for the support.

Best regards,
Stoil

wmora commented

Glad you solved it!

El lun., 6 de abr. de 2015 a la(s) 6:14 p. m., stoil2 <
notifications@github.com> escribió:

I solved the issue. The problem was that I left xxxx as app_id, and also
had to modify the Android manifest.
Sorry for bugging you on this and thanks for the support.

Best regards,
Stoil


Reply to this email directly or view it on GitHub
#3 (comment).