Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Pages: 1 [2] 3  All

Author Topic: Android, how to set up project?  (Read 29983 times)

0 Members and 1 Guest are viewing this topic.

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Android, how to set up project?
« Reply #15 on: October 26, 2015, 10:35:07 AM »

So which should I change then?
« Last Edit: October 26, 2015, 10:59:13 AM by piere »
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Android, how to set up project?
« Reply #16 on: October 26, 2015, 10:47:04 AM »

No, just change the filename to "FartBlackJack.java" (add the missing capital "J").
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Android, how to set up project?
« Reply #17 on: October 26, 2015, 11:12:35 AM »

So I got it all working and added the .apk file, then tested it on my phone. Every time it opens on my phone it says Unfortionetly it has stopped working, so basically it always crashes. I thought it was my game, so I created a sample project in WME and that is crashing too. Any suggestions?
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Android, how to set up project?
« Reply #18 on: October 26, 2015, 11:26:50 AM »

Can you paste the relevant section of your android log? You can capture it by using "adb logcat" on the shell. I need the log of around the time when the game stops working.

Typical mistakes could be missing native libraries, or missing game data (if you added it in the assets/raw folder, you should update "WMELiteFunctions.java" as described in the wiki).

Maybe it is something else though. The log should tell.
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Android, how to set up project?
« Reply #19 on: October 26, 2015, 11:37:20 AM »

Hello, I did that and it just says "waiting for device" then nothing happens, even with my phone plugged in. I private messaged you a link to my project file to check out directly.
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Android, how to set up project?
« Reply #20 on: October 26, 2015, 01:29:57 PM »

Unfortunately I can't check your project right now. Sooner or later you will need a working "adb" anyway, so please try to get this one working.

You need to install a driver for your device, apart from the standard functionality of accessing files on the phone storage. Sometimes, Windows will prompt you to do so. Once you have "USB debugging" enabled on your device (in the developer settings), check that a driver for the "adb interface" is installed. If not, try to get the driver from the manufacturer website, or try to force the Google driver (somewhere in the SDK) to be installed instead.

As a bonus, "ant installd" will then automatically install and run your app.
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Android, how to set up project?
« Reply #21 on: October 27, 2015, 06:55:10 AM »

I found this error in the log file:

Code: [Select]
E/AndroidRuntime(11427): FATAL EXCEPTION: main

E/AndroidRuntime(11427): Process: org.CopelandGames.FartBlackjack, PID: 11427

E/AndroidRuntime(11427): java.lang.UnsatisfiedLinkError: Native method not found: org.libsdl.app.SDLActivity.nativeAddHintCallback:(Ljava/lang/String;Lorg/libsdl/app/SDLActivity$SDLHintCallback;)V

E/AndroidRuntime(11427): at org.libsdl.app.SDLActivity.nativeAddHintCallback(Native Method)

E/AndroidRuntime(11427): at org.libsdl.app.SDLActivity.onCreate(SDLActivity.java:189)

E/AndroidRuntime(11427): at android.app.Activity.performCreate(Activity.java:5585)

E/AndroidRuntime(11427): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)

E/AndroidRuntime(11427): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2400)

E/AndroidRuntime(11427): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2495)

E/AndroidRuntime(11427): at android.app.ActivityThread.access$900(ActivityThread.java:170)

E/AndroidRuntime(11427): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1304)

E/AndroidRuntime(11427): at android.os.Handler.dispatchMessage(Handler.java:102)

E/AndroidRuntime(11427): at android.os.Looper.loop(Looper.java:146)

E/AndroidRuntime(11427): at android.app.ActivityThread.main(ActivityThread.java:5635)

E/AndroidRuntime(11427): at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime(11427): at java.lang.reflect.Method.invoke(Method.java:515)

E/AndroidRuntime(11427): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)

E/AndroidRuntime(11427): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)

E/AndroidRuntime(11427): at dalvik.system.NativeStart.main(Native Method)

This looks like a mismatch of native libraries and the SDLActivity Java class. Now that I think about it, you were probably using the dependency package on bitbucket, which is out of date. I need to update and test the original WME on Android again (was only working on my branch lately). I hope I'll find the time to do that in the coming days.
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Android, how to set up project?
« Reply #22 on: October 27, 2015, 07:04:46 AM »

Is there any way I can use a different package to make it work?
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Android, how to set up project?
« Reply #23 on: October 27, 2015, 07:32:20 AM »

You could use my branch, but that would mean compiling all native libraries from source. With a working Android NDK install (and Cygwin for Windows) this is doable, but probably quite a hassle if you haven't done it before.
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Android, how to set up project?
« Reply #24 on: October 27, 2015, 07:42:18 AM »

Can I pay you to compile it for  me?
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Android, how to set up project?
« Reply #25 on: October 27, 2015, 07:54:00 AM »

It's not about money. I don't have a lot of time at the moment (working on releasing a game this week). Let's see if everything works well, then I can spend some more time on wmelite soon.
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Android, how to set up project?
« Reply #26 on: November 01, 2015, 11:16:40 AM »

I have updated the dependencies package and the repo on bitbucket (original wmelite project). Your game template now works for me. Please update repo and dependencies, then you can try it out.
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Android, how to set up project?
« Reply #27 on: November 06, 2015, 10:32:45 AM »

Hey, I am using the new dep files you upload. Now when I try to do ant debug, I get the following error:

Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Android, how to set up project?
« Reply #28 on: November 06, 2015, 01:09:13 PM »

Hmm, that is really strange. The dependencies package only replaces the files in the "libs" folder, the "AndroidManifest.xml" should remain untouched.

Also pretty strange is how the "AndroidManifest.xml" ended up in your "bin" folder.

Can you try an "ant clean" before "ant debug"?
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Android, how to set up project?
« Reply #29 on: November 07, 2015, 09:48:31 AM »

Yes I did that. No change :( Any Way I can get you to compile the final apk for me?
Logged
Pages: 1 [2] 3  All
 

Page created in 0.021 seconds with 24 queries.