Author Topic: Problem with َmake apk for Android with Monkey0506 guide  (Read 1517 times)  Share 

RickJ

  • fix'n one thing and break'n two ...
    • I can help with scripting
    •  
    • I can help with story design
    •  
Re: Problem with َmake apk for Android with Monkey0506 guide
« Reply #20 on: 28 Jun 2017, 18:33 »
Quote
"Basically, this is where a person should stop trying and wait for further updates" is pretty much the understatement of the year.
I have been following with great interest and am waiting patiently for further updates but this made me smile. :)

monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
Re: Problem with َmake apk for Android with Monkey0506 guide
« Reply #21 on: 29 Jun 2017, 05:14 »
So, the biggest problem is building those native libraries for Android port?

He also edited the NDK build script, and I'm not certain that his modifications there work on Windows either, but I can't test it at all without the engine's native dependencies. I finally got an installation of Linux under Virtualbox running again (Debian 9 installer kept crashing, so I had to download a different distro). I should be able to rebuild the Android-native Allegro (etc.) and test the NDK build from Windows, or default to downloading the NDK for Linux and run it there.

Those libraries is probably something that should not be rebuilt every time. Would it be a viable solution if Nick could upload precompiled libraries?

Right, there's no reason that the Allegro libraries should have to be rebuilt every time the engine is rebuilt, so if they could be hosted (outside of the repo, obviously) elsewhere that would be ideal.

Quote
"Basically, this is where a person should stop trying and wait for further updates" is pretty much the understatement of the year.
I have been following with great interest and am waiting patiently for further updates but this made me smile. :)

Well... *sigh* Hopefully there will be a temporary fix soon, but the plugin will need to be kept up-to-date with regard to the Android engine files it uses or this whole problem will just resurface. What should be done is that the plugin should have a dependency that the Android engine files exist in an "Editor/Android" subdirectory, and if it can't copy the engine files from there then it can't deploy the APK. That way the engine files can be updated without having to rebuild the plugin.

The way things are now, the Android engine files are packed into "template.zip" from which a(n AGS) project-specific Android Studio project is created (including the engine files), and "template.zip" is packed inside the plugin! :/ Not very well planned out, but in my own defense it was thrown together as more of a proof-of-concept from which to move forward and is versioned as v0.0 (I'll keep shouting it 'til someone hears me! :=). The engine files aside, "template.zip" should almost never have to change though, so.... [/technical-details-rant]
« Last Edit: 29 Jun 2017, 05:29 by monkey0506 »
User was banned for this post.

monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
Re: Problem with َmake apk for Android with Monkey0506 guide
« Reply #22 on: 19 Aug 2017, 21:39 »
I overlooked a rather obvious (albeit less than ideal) workaround to make the plugin work with AGS 3.4.0, which is simply to create a shallow copy of the "Compiled" folder's contents just before running the jobb tool.

That, and reading that Android engine libraries from the editor's directory are included in v0.0.3-alpha. You need to extract "Android.zip" into "EDITOR_DIRECTORY/Android" (so, "EDITOR_DIRECTORY/Android/armeabi/libags_parallax.so", etc.). The rest should work as previously described. I apologize for not thinking of this approach sooner. (roll)
User was banned for this post.

Mehrdad

    • I can help with animation
    •  
    • I can help with characters
    •  
    • I can help with story design
    •  
    • I can help with web design
    •  
Re: Problem with َmake apk for Android with Monkey0506 guide
« Reply #23 on: 21 Aug 2017, 08:00 »
Hi . Sorry but I have black screen with new version too. Maybe my knowledge is poor and I'm wrong.

monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
Re: Problem with َmake apk for Android with Monkey0506 guide
« Reply #24 on: 21 Aug 2017, 13:10 »
Could you upload the APK so I can investigate? :-\
User was banned for this post.


monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
Re: Problem with َmake apk for Android with Monkey0506 guide
« Reply #26 on: 22 Aug 2017, 05:54 »
I've gotten so far as to verify that I can extract your game data file from the OBB. I haven't yet had time to investigate why it isn't working. :( I will try and get back to you with further details soon.
User was banned for this post.

Mehrdad

    • I can help with animation
    •  
    • I can help with characters
    •  
    • I can help with story design
    •  
    • I can help with web design
    •  
Re: Problem with َmake apk for Android with Monkey0506 guide
« Reply #27 on: 26 Aug 2017, 05:59 »
Hi Monkey0506
Did you find time for test my apk file? Is it possible make an apk with template default AGS game ?

We haven't any PC market in Iran ( My country ). And our country is blocked for any business for Steam , GOG ,...  Instead we have a good Android market . That's why I strongly need to this port . Already I fixed Persian fonts with huge help by Crimson Wizard . And I'm waiting long time for Android port.
I'm appreciate for any help
« Last Edit: 26 Aug 2017, 06:07 by Mehrdad »

monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
Re: Problem with َmake apk for Android with Monkey0506 guide
« Reply #28 on: 26 Aug 2017, 08:43 »
I may not have time to investigate this for several weeks at least. Even if the plugin is not working, the processes it use do work. Use the jobb tool and Oceanspirit Dennis Android Studio project files available from my GitHub account. That's the best advice I can give for now.
User was banned for this post.

Mehrdad

    • I can help with animation
    •  
    • I can help with characters
    •  
    • I can help with story design
    •  
    • I can help with web design
    •  
Re: Problem with َmake apk for Android with Monkey0506 guide
« Reply #29 on: 31 Aug 2017, 08:35 »
Hi

My friend found your plugin problem. Problem is about your OBB maker . He said That made an OBB with :
https://developer.android.com/studio/command-line/jobb.html

He said that removed sa.ags from my OBB and made a new OBB with it .And replace with my OBB and works fine .

It takes some works that I haven't knowledge about it.
Monkey, Please only improve your OBB maker

Mehrdad

« Last Edit: 31 Aug 2017, 08:46 by Mehrdad »

Re: Problem with َmake apk for Android with Monkey0506 guide
« Reply #30 on: 09 Sep 2017, 15:31 »
Hey! I am having a weird button1 that does nothing, except poping a message stating "Has JDK? True and Has Android SDK? True", once pressed with the latest release. ???

Has anyone seen this before? Also I don't have Android (or Linux) available in Build on General Settings.

My system is:

Windows 10, 64-Bits
Adventure Game Studio 3.4.1-7 Beta (downloaded from here)
Android Studio Version is 2.3.3 (built on June 6, 2017)
Java is Version 8 Update 144 (build 1.8.0_144-b01)

I got the plugin from monkey0506 github, v0.0.3-alpha here.

Other than Google Chrome and Steam (but with no games), there is nothing else installed in this computer.

EDIT: Fixed it! I forgot to copy the Android/ in the AGS Editor folder. But now, I am getting build failed...

Add spoiler tag for Hidden:


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':agsEngineLibrary'.
> failed to find target with hash string 'android-24' in: C:\Users\erico\AppData\Local\Android\sdk
BUILD FAILED


EDIT2: I installed the Nougat, which is API level 24, using the SDK Manager from Android Studio -> Tools -> Android -> SDK Manager. But Now I am getting "failed to find Build Tools revision 24.0.1". From the SDK Manager-> SDK Tools, I see I have Android SDK Tools 26.0.2 installed. There's no obvious way to get the 24.0.1 SDK from there... :/

EDIT3: Installed build tools 24.0.1. Needed to find my android sdk folder in AppData, in the bin folder, used the command line sdkmanager to install the version with sdkmanager.bat build-tools;24.0.1. Here's a picture on imgur.

EDIT4: So it build correctly ONE TIME. Now it gives me an erro in the console:
Unexpected error: Invalid name.
Parameter name: name


I have no idea what's that. The only thing I did between builds was removing the RSA Key, because the first build created an APK and an OBB file, when I kinda just wanted an APK... But now even adding the key back doesn't solve my problem...

EDIT5: Ok. I deleted everything, and download my game source again, retraced the steps, left the RSA Key empty and buid the game.apk with everything in it! YEY! Except it doesn't work. I only get a black screen and the app exits...

EDIT6: Opening the Android Studio Project I understand what Mehrdad said, because I am getting the following error (using the Android Monitor):

09-10 14:17:06.776 3417-3417/com.erio.ff D/OBB_COPY: File not found exception occurred copying expansion file: /storage/emulated/0/Android/obb/com.erio.ff/main.1.com.erio.ff.obb (No such file or directory)
09-10 14:17:06.826 3417-3417/com.erio.ff D/STORAGE: Expansion file /storage/emulated/0/Android/obb/com.erio.ff/main.1.com.erio.ff.obb not found!
« Last Edit: 10 Sep 2017, 18:50 by eri0o »

Re: Problem with َmake apk for Android with Monkey0506 guide
« Reply #31 on: 12 Sep 2017, 19:00 »
Hey, if someone knows how to generate a single .APK file (no obb) and make it work, I would be very happy. Maybe I am forgetting something but I have no idea what. Also, from the engine, can I detect it's ran on Android?

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Problem with َmake apk for Android with Monkey0506 guide
« Reply #32 on: 12 Sep 2017, 20:00 »
Also, from the engine, can I detect it's ran on Android?

If you mean "from script", there is System.OperatingSystem which should return eOSAndroid if you are running android port.

Re: Problem with َmake apk for Android with Monkey0506 guide
« Reply #33 on: 12 Sep 2017, 21:04 »
Yeah,I meant from script. Ok, if I manage to generate this APK I will use this to pretoggle my touch flag on the game - it sets the text that follow mouse to be fixed on bottom and some other minor adjustments I thought could be useful :) .