Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Pages: 1 2 3 [All]

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

0 Members and 1 Guest are viewing this topic.

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 302
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Android, how to set up project?
« on: October 23, 2015, 06:52:11 AM »

Hello I followed the instructions here: http://res.dead-code.org/doku.php/wmelite:building

But they do not seem to tell me how to set up the Android project itself. Do I use Eclipse or Android Studio? I tried loading it into Android studio and it doesnt seem to want to take the Android source. Any help? Thanks.
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Android, how to set up project?
« Reply #1 on: October 24, 2015, 10:52:15 AM »

Hello I followed the instructions here: http://res.dead-code.org/doku.php/wmelite:building

But they do not seem to tell me how to set up the Android project itself. Do I use Eclipse or Android Studio? I tried loading it into Android studio and it doesnt seem to want to take the Android source. Any help? Thanks.

I don't use Android Studio to build, but you might try to generate a project if you like. There should be a wizard that helps you with that. I use the standalone tools to create a project with sth. like that

Code: [Select]
android update project --path=.

and to build I then use ant:

Code: [Select]
ant clean debug

should build a version with your debug developer key, and you can install it to an attached device (or emulator) with

Code: [Select]
ant installd

If you've never worked a lot on the command line, trying to generate an Android Studio project might be the better way to go. I'm not sure you would want to use Eclipse, as this is no longer supported by Google for quite a while now (I wonder whether you'll still find an Eclipse based Android IDE at all).
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 302
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Android, how to set up project?
« Reply #2 on: October 24, 2015, 12:00:53 PM »

Thanks for the reply. I didnt see any Wizard for Android Studio, I just created a new project and dragged and dropped the WME files in the project files. Changes the Manafest file, etc, but it did not work. So I would use the command line from files already in the WME Android source, or get it form somewhere else? Sorry for the questions, as I am new to Android development.
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Android, how to set up project?
« Reply #3 on: October 24, 2015, 01:27:19 PM »

You just need the "android" tool from the SDK, and probably you need to install "ant" separately. If you already downloaded Android Studio, the SDK is already installed (somewhere).
Logged

piere

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

Hi again. I am using Ant, and the commands listed in your message. After doing debug, it mentions the build.XML file, but nothing is generating a .apk file. Am I missing something? I am really stupid when it comes to the command line and Android development, so maybe you can explain a very beginners guide? I will be happy to donate to you some money if it works.
Logged

HCDaniel

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

This should work for you with a recent wmelite checkout:

Code: [Select]
hg status .

in wmelite/android shows that all my local modifications are the native libraries added:

Code: [Select]
daniel@androiduser-Aspire-V3-772:~/wmelite/android$ hg status .
? libs/AdBuddiz-2.4.4.jar
? libs/armeabi-v7a/libSDL2.so
? libs/armeabi-v7a/libbass.so
? libs/armeabi-v7a/libfreeimage.so
? libs/armeabi-v7a/libgnustl_shared.so
? libs/armeabi-v7a/libmain.so
? libs/armeabi/libSDL2.so
? libs/armeabi/libbass.so
? libs/armeabi/libfreeimage.so
? libs/armeabi/libgnustl_shared.so
? libs/armeabi/libmain.so
? libs/x86/libSDL2.so
? libs/x86/libbass.so
? libs/x86/libfreeimage.so
? libs/x86/libgnustl_shared.so
? libs/x86/libmain.so

At first a file called "local.properties" is required:

Code: [Select]
daniel@androiduser-Aspire-V3-772:~/wmelite/android$ android update project --path .
Updated local.properties
Updated file ./proguard-project.txt

Now all should be set for a debug build with ant:

Code: [Select]
daniel@androiduser-Aspire-V3-772:~/wmelite/android$ ant clean debug
Buildfile: /home/daniel/wmelite/android/build.xml

-check-env:
 [checkenv] Android SDK Tools Revision 24.4.0
 [checkenv] Installed at /opt/android/android-sdk-linux

-setup:
     [echo] Project Name: SDLActivity
  [gettype] Project Type: Application

-pre-clean:

clean:
[getlibpath] Library dependencies:
[getlibpath] No Libraries
   [subant] No sub-builds to iterate on

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 24.4.0
 [checkenv] Installed at /opt/android/android-sdk-linux

-setup:
     [echo] Project Name: SDLActivity
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 19.1.0
     [echo] Resolving Build Target for SDLActivity...
[gettarget] Project Target:   Android 4.0.3
[gettarget] API level:        15
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: /home/daniel/wmelite/android/bin
    [mkdir] Created dir: /home/daniel/wmelite/android/bin/res
    [mkdir] Created dir: /home/daniel/wmelite/android/bin/rsObj
    [mkdir] Created dir: /home/daniel/wmelite/android/bin/rsLibs
    [mkdir] Created dir: /home/daniel/wmelite/android/gen
    [mkdir] Created dir: /home/daniel/wmelite/android/bin/classes
    [mkdir] Created dir: /home/daniel/wmelite/android/bin/dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for SDLActivity...
[dependency] Ordered libraries:
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
    [javac] Compiling 5 source files to /home/daniel/wmelite/android/bin/classes
    [javac] Note: /home/daniel/wmelite/android/src/org/libsdl/app/SDLActivity.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.

-post-compile:

-obfuscate:

-dex:
      [dex] input: /home/daniel/wmelite/android/bin/classes
      [dex] input: /opt/android/android-sdk-linux/tools/support/annotations.jar
      [dex] input: /home/daniel/wmelite/android/libs/AdBuddiz-2.4.4.jar
      [dex] Pre-Dexing /opt/android/android-sdk-linux/tools/support/annotations.jar -> annotations-2da80f7fba88282179c6a4e41fc58588.jar
      [dex] Pre-Dexing /home/daniel/wmelite/android/libs/AdBuddiz-2.4.4.jar -> AdBuddiz-2.4.4-be83e5349564857c26edd123b8ec492c.jar
      [dex] Converting compiled files and external libraries into /home/daniel/wmelite/android/bin/classes.dex...
       [dx] Merged dex A (32 defs/39,1KiB) with dex B (2 defs/1,1KiB). Result is 34 defs/46,1KiB. Took 0,1s
       [dx] Merged dex A (34 defs/46,1KiB) with dex B (75 defs/95,4KiB). Result is 109 defs/160,9KiB. Took 0,1s

-crunch:
   [crunch] Crunching PNG Files in source dir: /home/daniel/wmelite/android/res
   [crunch] To destination dir: /home/daniel/wmelite/android/bin/res
   [crunch] Processing image to cache: /home/daniel/wmelite/android/res/drawable-hdpi/ic_launcher.png => /home/daniel/wmelite/android/bin/res/drawable-hdpi/ic_launcher.png
   [crunch]   (processed image to cache entry /home/daniel/wmelite/android/bin/res/drawable-hdpi/ic_launcher.png: 0% size of source)
   [crunch] Processing image to cache: /home/daniel/wmelite/android/res/drawable-mdpi/ic_launcher.png => /home/daniel/wmelite/android/bin/res/drawable-mdpi/ic_launcher.png
   [crunch]   (processed image to cache entry /home/daniel/wmelite/android/bin/res/drawable-mdpi/ic_launcher.png: 0% size of source)
   [crunch] Processing image to cache: /home/daniel/wmelite/android/res/drawable-xhdpi/ic_launcher.png => /home/daniel/wmelite/android/bin/res/drawable-xhdpi/ic_launcher.png
   [crunch]   (processed image to cache entry /home/daniel/wmelite/android/bin/res/drawable-xhdpi/ic_launcher.png: 105% size of source)
   [crunch] Processing image to cache: /home/daniel/wmelite/android/res/drawable-xxhdpi/ic_launcher.png => /home/daniel/wmelite/android/bin/res/drawable-xxhdpi/ic_launcher.png
   [crunch]   (processed image to cache entry /home/daniel/wmelite/android/bin/res/drawable-xxhdpi/ic_launcher.png: 59% size of source)
   [crunch] Crunched 4 PNG files to update cache

-package-resources:
     [aapt] Creating full resource package...

-package:
[apkbuilder] Current build type is different than previous build: forced apkbuilder run.
[apkbuilder] Creating SDLActivity-debug-unaligned.apk and signing it with a debug key...

-post-package:

-do-debug:
 [zipalign] Running zip align on final apk...
     [echo] Debug Package: /home/daniel/wmelite/android/bin/SDLActivity-debug.apk
[propertyfile] Creating new property file: /home/daniel/wmelite/android/bin/build.prop
[propertyfile] Updating property file: /home/daniel/wmelite/android/bin/build.prop
[propertyfile] Updating property file: /home/daniel/wmelite/android/bin/build.prop
[propertyfile] Updating property file: /home/daniel/wmelite/android/bin/build.prop

-post-build:

debug:

BUILD SUCCESSFUL
Total time: 21 seconds

I added the complete console output, for you to check at which point it differs at your side. I have not added any game data, so my app would finally not do anything when started. For small game packages, just add game data as assets (renamed to .png, like described in the wiki).

Now you should be able to install the debug build with

Code: [Select]
daniel@androiduser-Aspire-V3-772:~/wmelite/android$ ant installd
Buildfile: /home/daniel/wmelite/android/build.xml

-set-mode-check:

-set-debug-files:

install:
     [echo] Installing /home/daniel/wmelite/android/bin/SDLActivity-debug.apk onto default emulator or device...
     [exec] error: device '(null)' not found
     [exec] - waiting for device -

I do not have a device connected right now, otherwise the app would install (you need to enable developer settings and USB debugging).

Hope it helps.
Logged

piere

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

Thanks for the reply, but None of that makes any sense to me. I have never used Android, or command line in my life so I am really confused. Do I move the Ant files into my directory for the WME Android project or do I run it in the Ant directory? Where does the Java directory come into play? So I open the command prompt, then what? Sorry for all the questions and thanks.
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Android, how to set up project?
« Reply #7 on: October 25, 2015, 12:58:01 PM »

I can't give you a complete guide on how to setup your system. But basically, you need to install Java and then ant. For Linux, you simply use the package manager of the distribution. For Windows, you can download an .exe file for installing Java. Then you can download and install ant as per the instructions on the ant website (here http://ant.apache.org/manual/install.html#installing are generic install instructions).

Your install was successful, if you open a command prompt, and type "java" without an error message (like "command not found"), and then repeat the same for "ant".

Finally, the Android SDK (whether installed standalone or in combination with Android Studio) should be in your path as well, so that when you type "android", something else than an error message appears (typically the "Android SDK Manager" GUI should appear). If it doesn't, you should add the "tools" subdirectory from the base directory of the Android SDK to your path, then it should work. (I have set my path as follows:
Code: [Select]
export PATH=$PATH:/opt/android/android-sdk-linux/platform-tools/:/opt/android/android-sdk-linux/tools/ to have both "android" and "adb" (you might need that one later) available in Linux.)

If these commands are available in your command prompt, the build instructions should work. Just go to the "wmelite/android" directory and type the commands.


Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 302
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Android, how to set up project?
« Reply #8 on: October 25, 2015, 01:05:10 PM »

Ok I typed "java" into the command prompt and it comes up, but "android" and "ant" do not. Do I need to put those directories somewhere specifically? When you mentioned to "add the "tools" subdirectory from the base directory of the Android SDK to your path", I am unsure what you meant by that. Do I enter that code you wrote into command prompt? What does that code do? Sorry I am very confused at that point. I am using Windows by the way if that makes a difference. Thanks.
Logged

HCDaniel

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

Let me dig out my old windows vista pc, then I'll see how to do this on windows.
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 302
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Android, how to set up project?
« Reply #10 on: October 25, 2015, 10:54:18 PM »

Thanks you rock  ::rock
Logged

HCDaniel

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

Ant installation on Windows (Vista):

  • A "Java Development Kit" (JDK) is required, a "Java Runtime Environment" alone is not sufficient. If there is nothing, or only a JRE installed, please download & install a JDK. In my case, I have a JDK installed here: C:\Program Files\Java\jdk1.7.0_25
  • Download the "binary distribution" of Ant as .zip file. Extract it to your "program files" folder. On my PC it was much faster to extract to the Desktop first, and then move the generated folder to "Program files". I now have a folder "C:\Program Files\apache-ant-1.9.6" with ant, but it is not yet recognized by the system.
  • According to the instructions (http://ant.apache.org/manual/install.html#installing) I need to set 3 environment variables. I go to "System" -> "Advanced System Settings" -> "Environment Variables" (loosely translated to English).
  • I need to add ant's "bin" path to the path variable. "Path" already exists as a system variable, so I add "C:\Program Files\apache-ant-1.9.6\bin" at the end, separated by ";".
  • ANT_HOME and JAVA_HOME do not exist, so I add them as user variables. I set ANT_HOME to "C:\Program Files\apache-ant-1.9.6" and JAVA_HOME to my JDK root "C:\Program Files\Java\jdk1.7.0_25" (I have a rather old JDK).
  • After saving all my changes, I open a new command prompt. Now "ant" is recognized as a command, and (correctly) says sth. like "build.xml not found".
Logged

HCDaniel

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

Android SDK standalone install on Windows (Vista):

  • Download and install the "standalone SDK" executable for Windows. I chose "install for all users when prompted". The installer puts all files into this folder "C:\Program Files\Android\android-sdk" and creates some shortcuts in the start menu.
  • Start the "SDK manager" from the start menu as administrator (was required on my PC at least). If unsure, do not deselect anything. If you are sure, deselect the installation of the most recent SDK (currently 6.0) if you want to avoid a big download. Do not deselect anything else.
  • Select "SDK Platform" only for the 2 entries "Android 2.3.3 (API 10)" and "Android 3.1 (API 12)". To see API 12, you need to check "Obsolete" in the bottom of the window. Then, select the most recent "Android SDK build-tools" (currently 23.0.1). Install and then close the SDK manager.
  • For a working command line, the 2 paths "C:\Program Files\Android\android-sdk\tools" (for "android") and "C:\Program Files\Android\android-sdk\platform-tools" (for "adb") need to be in your path. Add them to the "path" environment variable separated by ";". My path variable now has 3 paths added, so it looks like this: "<a looong list of folders...>;C:\Program Files\apache-ant-1.9.6\bin;C:\Program Files\Android\android-sdk\tools;C:\Program Files\Android\android-sdk\platform-tools;"
  • Check that typing "android" in a new command line window will show the SDK manager again (just close it when it appears), and that the "adb" command is recognized.
Logged

piere

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

Ok thanks, I got all that working now. Everytime I try to build the project though, it keeps saying that there is no Build.xml file. But the xml file is there, so I am thinking it keeps looking in the wrong place for it ??
Logged

HCDaniel

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

You have a typo. The class is called "FartBlackJack" but the file has the name "FartBlackack.java". Class name and file name must match.
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 302
  • 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: 302
  • 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: 302
  • 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: 302
  • 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: 302
  • 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: 302
  • 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: 302
  • 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

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Android, how to set up project?
« Reply #30 on: November 07, 2015, 01:45:21 PM »

Yes I did that. No change :( Any Way I can get you to compile the final apk for me?

Can you check whether you have any local modifications to files - modifications which "do not look correct"? ("hg diff" would tell, resp. the appropriate TortoiseHG command)

Certainly I could build a debug .apk for you - just send me your .dcp file(s) and tell me the app's canonical name (like "com.mydomain.mygame.MyGameTitle"). This would be fine for your local tests (as it would be signed with my "debug key").

To finally publish an app, you need to sign it with your "release key", and that is one you better keep secret ;-) So in the end we need to get the toolchain working for you, even if I can help you out in the meantime.
Logged

piere

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

Thanks I will get my .apk ready. What is the best resolution to make the game in Wintermute to look best on Android?
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Android, how to set up project?
« Reply #32 on: November 07, 2015, 03:06:51 PM »

That I can't really tell. Android devices come in a variety of (native) resolutions. Whatever looks good on one device, might look bad on another. You need to check several devices. The Android emulator allows to configure screen size and resolution (not sure if 100% freely, but you have several options), so you can check there as well.

For our project we historically decided for 1024x600. That looks good on a variety of devices, independent of their native resolution (wmelite will scale the picture to fullscreen, keeping only the acpect ratio - thus a ratio of around 16:9 should be used to keep the black bars at the side of the screen small).

More important was the use of the "pixelperfect" rendering option in the "settings.xml", as we could not afford inaccuracies of graphics when they were all individually scaled when being drawn. That option is on one hand very memory intensive (you need a back buffer of your graphics in original resolution and depth in memory additionally), but avoids scaling artifacts between individual graphics. It depends on how you arrange your graphics, whether you actually need this option. It should be kept off if not necessary.
Logged

piere

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

I have the APK ready. Any way you can sign it for me? I still can't get anything working on my side.
Logged

HCDaniel

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

Just send me your .dcp files (I assume that's what you meant) and the desired canonical name of your app, then I can send you a "debug APK" for testing.
Logged

piere

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

Sent you a private message :)
Logged
Pages: 1 2 3 [All]
 

Page created in 0.047 seconds with 19 queries.