RAPT - Ren'Py Android Packaging Tool

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Message
Author
User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#241 Post by PyTom »

Yes, it's made for arm only. It seems to work on intel devices that have an arm emulator, such as intel-based tablets.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Jibus
Regular
Posts: 135
Joined: Tue May 26, 2015 9:45 am
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#242 Post by Jibus »

Thanks, indeed ! Genymotion has removed the arm emulator from their package.

User avatar
emilkun
Newbie
Posts: 16
Joined: Tue Apr 28, 2015 6:11 am
Location: England
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#243 Post by emilkun »

Hello! I've been working with Ren'Py for months now and I haven't met a single problem that hadn't an answer here, so sorry if someone already asked this I must have missed it!
I'd like to make an Android version of one of my games, I went through all the comments here but nobody seems to be as lost as I am. I resized everything so this isn't a problem. I would like to know if anyone made a step by step or a video tutorial of them building an android version of their games? I know that there are a dozen tutorials on that but none is precise, it seems to be made for people who already know how building android games work.
I have the "Google Play support is enabled, but build.google_play_key is not set. Please set in your game." message, and know that I have to set it but nobody says how or where. I also know that there are many many things to do/download, I tried a dozen tutorials but I don't get any of them.
I don't have any problem with Ren'Py itself, so yeah basically I'd like to know if anyone made a really precise step by step/tutorial or something for people who don't know how android distributions work please! ;w;
Thanks and sorry for my bad English!

Jibus
Regular
Posts: 135
Joined: Tue May 26, 2015 9:45 am
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#244 Post by Jibus »

@emilkun you have to setup a google developper account (25$ fees). Then after you create your product, Google will give you a key that you have to put in your game.

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#245 Post by xavimat »

SOLVED: (see below)

BUILD FAILED
I'm not sure what's wrong.
Ubuntu 15.04 64b. Renpy 6.99.4.467. Fresh installation of RAPT and openjdk-7-jdk
android.txt
(8.82 KiB) Downloaded 150 times
EDIT:
The relevant part of the traceback should be this:

Code: Select all

BUILD FAILED
/home/xavimat/Documents/renpy/rapt/android-sdk-r23/tools/ant/build.xml:601: The following error occurred while executing this line:
/home/xavimat/Documents/renpy/rapt/android-sdk-r23/tools/ant/build.xml:653: The following error occurred while executing this line:
/home/xavimat/Documents/renpy/rapt/android-sdk-r23/tools/ant/build.xml:698: Execute failed: java.io.IOException: Cannot run program "/home/xavimat/Documents/renpy/rapt/android-sdk-r23/build-tools/20.0.0/aapt" (in directory "/home/xavimat/Documents/renpy/rapt/android-sdk-r23/extras/google/play_licensing/library"): error=2, No such file or directory
I've checked and both the file aapt and tht directory library are present in their correct places.
More info: We want to create an expansion pack for google play (done before with another game and got it working).

SOLVED (thanks, PyTom)
The problem: Ubuntu 64 bits can't run some 32 bits programs needed to create the android build.
The solution: This code solves it:

Code: Select all

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
sudo apt-get install zlib1g:i386
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Live
Newbie
Posts: 3
Joined: Fri Oct 07, 2016 3:12 pm
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#246 Post by Live »

trying to make my game to an android game but when i try to build i get this error

BUILD FAILED
/Applications/renpy-6.17.0-sdk/rapt/android-sdk-r24.4.1/tools/ant/build.xml:928: The following error occurred while executing this line:
/Applications/renpy-6.17.0-sdk/rapt/android-sdk-r24.4.1/tools/ant/build.xml:946: null returned: 1

What is wrong?

User avatar
Psieye
Newbie
Posts: 6
Joined: Thu Jan 01, 2015 2:21 pm
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#247 Post by Psieye »

Live wrote:trying to make my game to an android game but when i try to build i get this error

BUILD FAILED
/Applications/renpy-6.17.0-sdk/rapt/android-sdk-r24.4.1/tools/ant/build.xml:928: The following error occurred while executing this line:
/Applications/renpy-6.17.0-sdk/rapt/android-sdk-r24.4.1/tools/ant/build.xml:946: null returned: 1

What is wrong?
[SOLVED: See latest edit at bottom]
I'm facing the same symptom as the above post. My context:

- Windows 10
- Renpy 6.99.12.4 (downloaded yesterday)
- After Renpy grabbed the Android SDK, ran rapt/android-sdk-r24.4.1/tools/android.bat and installed Android 7.1.1 (API 25 - latest one) and Android 2.2 (API 8)
- Went through the configure step with mostly default answers aside from my (ASCII-only) project name and selecting Android 2.2 as my target platform (for menu buttons)

The android build attempt froze the Ren'Py launcher so I went to work. Hours later, I come home to find an android.txt with the error message quoted above. A quick search on stackoverflow says I should 'ant clean' so I ran "rapt/apache-ant-1.9.3/bin/ant clean" in the rapt/android-sdk-r24.4.1/tools/ant directory where build.xml is. That got hit with this error:

Code: Select all

Buildfile: C:\RenPy\renpy-6.99.12.4-sdk\rapt\android-sdk-r24.4.1\tools\ant\build.xml
  [taskdef] Could not load definitions from resource anttasks.properties. It could not be found.
  [taskdef] Could not load definitions from resource emma_ant.properties. It could not be found.

-check-env:

BUILD FAILED
C:\RenPy\renpy-6.99.12.4-sdk\rapt\android-sdk-r24.4.1\tools\ant\build.xml:396: Problem: failed to create task or type checkenv
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
I am trying again after installing (from the android.bat) Android 4.1.2 (API 16) as well. After tens of minutes to process 44165 android files, it sits at 'Packaging internal data' for... further tens of minutes before ending with 'The build seems to have failed'. The error message in android.txt is the same as before: null returned at build.xml 946. Any advice on how to proceed?

In case it's relevant, the android.txt dump includes:

Code: Select all

-check-env:
 [checkenv] Android SDK Tools Revision 25.2.5
 [checkenv] Installed at C:\RenPy\renpy-6.99.12.4-sdk\rapt\android-sdk-r24.4.1
Edit:

"ant clean" works when done from rapt/ but that doesn't solve the problem of the build ultimately reaching "null returned at build.xml 946". I noticed I hadn't pasted this piece of android.txt before:

Code: Select all

-package-resources:
     [aapt] Creating full resource package...
     [aapt]       Unable to add 'C:\RenPy\renpy-6.99.12.4-sdk\rapt\assets\x-game\x-cache\x-bytecode.rpyb': Zip add failed (-2147483648)
     [aapt] ERROR: unable to process assets while packaging 'C:\RenPy\renpy-6.99.12.4-sdk\rapt\bin\{projectName}-1.0.ap_'
     [aapt] ERROR: packaging of 'C:\RenPy\renpy-6.99.12.4-sdk\rapt\bin\{projectName}-1.0.ap_' failed
----------------------------
Solution

Plan B: a complete restart of the process. I started all the way back from the self-extracting renpy-6.99.12.4-sdk.7z.exe extracting to a new folder. Noticing that the "Install SDK" step was already grabbing libraries on its own, this time I didn't poke around with rapt/android-sdk-r24.4.1/tools/android.bat

This meant there were only 400-ish android files to process instead of the 44k I was seeing before. Stack overflow reported "Zip add failed" could mean the zip was too large - the vast reduction in android files to process and cram into a zip solved my issue.

ezshre
Newbie
Posts: 8
Joined: Tue Oct 24, 2017 4:07 pm
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#248 Post by ezshre »

Psieye wrote: Tue May 30, 2017 4:09 pm
Live wrote:trying to make my game to an android game but when i try to build i get this error

BUILD FAILED
/Applications/renpy-6.17.0-sdk/rapt/android-sdk-r24.4.1/tools/ant/build.xml:928: The following error occurred while executing this line:
/Applications/renpy-6.17.0-sdk/rapt/android-sdk-r24.4.1/tools/ant/build.xml:946: null returned: 1

What is wrong?
[SOLVED: See latest edit at bottom]
I'm facing the same symptom as the above post. My context:

- Windows 10
- Renpy 6.99.12.4 (downloaded yesterday)
- After Renpy grabbed the Android SDK, ran rapt/android-sdk-r24.4.1/tools/android.bat and installed Android 7.1.1 (API 25 - latest one) and Android 2.2 (API 8)
- Went through the configure step with mostly default answers aside from my (ASCII-only) project name and selecting Android 2.2 as my target platform (for menu buttons)

The android build attempt froze the Ren'Py launcher so I went to work. Hours later, I come home to find an android.txt with the error message quoted above. A quick search on stackoverflow says I should 'ant clean' so I ran "rapt/apache-ant-1.9.3/bin/ant clean" in the rapt/android-sdk-r24.4.1/tools/ant directory where build.xml is. That got hit with this error:

Code: Select all

Buildfile: C:\RenPy\renpy-6.99.12.4-sdk\rapt\android-sdk-r24.4.1\tools\ant\build.xml
  [taskdef] Could not load definitions from resource anttasks.properties. It could not be found.
  [taskdef] Could not load definitions from resource emma_ant.properties. It could not be found.

-check-env:

BUILD FAILED
C:\RenPy\renpy-6.99.12.4-sdk\rapt\android-sdk-r24.4.1\tools\ant\build.xml:396: Problem: failed to create task or type checkenv
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
I am trying again after installing (from the android.bat) Android 4.1.2 (API 16) as well. After tens of minutes to process 44165 android files, it sits at 'Packaging internal data' for... further tens of minutes before ending with 'The build seems to have failed'. The error message in android.txt is the same as before: null returned at build.xml 946. Any advice on how to proceed?

In case it's relevant, the android.txt dump includes:

Code: Select all

-check-env:
 [checkenv] Android SDK Tools Revision 25.2.5
 [checkenv] Installed at C:\RenPy\renpy-6.99.12.4-sdk\rapt\android-sdk-r24.4.1
Edit:

"ant clean" works when done from rapt/ but that doesn't solve the problem of the build ultimately reaching "null returned at build.xml 946". I noticed I hadn't pasted this piece of android.txt before:

Code: Select all

-package-resources:
     [aapt] Creating full resource package...
     [aapt]       Unable to add 'C:\RenPy\renpy-6.99.12.4-sdk\rapt\assets\x-game\x-cache\x-bytecode.rpyb': Zip add failed (-2147483648)
     [aapt] ERROR: unable to process assets while packaging 'C:\RenPy\renpy-6.99.12.4-sdk\rapt\bin\{projectName}-1.0.ap_'
     [aapt] ERROR: packaging of 'C:\RenPy\renpy-6.99.12.4-sdk\rapt\bin\{projectName}-1.0.ap_' failed
----------------------------
Solution

Plan B: a complete restart of the process. I started all the way back from the self-extracting renpy-6.99.12.4-sdk.7z.exe extracting to a new folder. Noticing that the "Install SDK" step was already grabbing libraries on its own, this time I didn't poke around with rapt/android-sdk-r24.4.1/tools/android.bat

This meant there were only 400-ish android files to process instead of the 44k I was seeing before. Stack overflow reported "Zip add failed" could mean the zip was too large - the vast reduction in android files to process and cram into a zip solved my issue.
I tried this, doesn't work :/ What exactly do you mean by complete restart of the process?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#249 Post by Imperf3kt »

Try going to your rapt folder, go into 'bin' and delete all .apk files you see.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

polisummer
Newbie
Posts: 12
Joined: Sat Jul 29, 2017 12:37 pm
Projects: Absolutely Haunting, What?! My Neighbors are Demons?!!
Organization: Kyungeki Workshop
Tumblr: polisummer
itch: polisummer
Location: middle of a tree sanctuary
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#250 Post by polisummer »

I get this build failed error on Renpy 6.99.13 and I'm not sure how to fix it.

Code: Select all


Updating source code.

Updating build files.
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
Resolved location of library project to: /Applications/renpy-6.99.13-sdk/rapt/extras/google/market_apk_expansion/downloader_library
Updated and renamed default.properties to project.properties
Updated local.properties
Added file ./build.xml
Updated file ./proguard-project.txt




Creating assets directory.

Packaging internal data.

I'm using Ant to build the package.
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
Buildfile: /Applications/renpy-6.99.13-sdk/rapt/build.xml

-set-mode-check:

-set-release-mode:

-release-obfuscation-check:
     [echo] proguard.config is ${proguard.config}

-pre-build:

-check-env:
 [checkenv] Android SDK Tools Revision 24.4.1
 [checkenv] Installed at /Applications/renpy-6.99.13-sdk/rapt/android-sdk-r24.4.1

-setup:
     [echo] Project Name: SnowDazeTheMusicofWinter-0.9.19
  [gettype] Project Type: Application

-build-setup:
[getbuildtools] Using latest Build Tools: 23.0.1
     [echo] Resolving Build Target for SnowDazeTheMusicofWinter-0.9.19...
[gettarget] Project Target:   Android 5.1.1
[gettarget] API level:        22
     [echo] ----------
     [echo] Creating output directories if needed...
     [echo] ----------
     [echo] Resolving Dependencies for SnowDazeTheMusicofWinter-0.9.19...
[dependency] Library dependencies:
[dependency] 
[dependency] ------------------
[dependency] Ordered libraries:
[dependency] 
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'release'...

nodeps:

-set-mode-check:

-set-release-mode:

-release-obfuscation-check:
     [echo] proguard.config is ${proguard.config}

-pre-build:

-check-env:
 [checkenv] Android SDK Tools Revision 24.4.1
 [checkenv] Installed at /Applications/renpy-6.99.13-sdk/rapt/android-sdk-r24.4.1

-setup:
     [echo] Project Name: library
  [gettype] Project Type: Android Library

-build-setup:
[getbuildtools] Using latest Build Tools: 23.0.1
     [echo] Resolving Build Target for library...
[gettarget] Project Target:   Android 5.1.1
[gettarget] API level:        22
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: /Applications/renpy-6.99.13-sdk/rapt/extras/google/market_licensing/library/bin/rsObj
    [mkdir] Created dir: /Applications/renpy-6.99.13-sdk/rapt/extras/google/market_licensing/library/bin/rsLibs
     [echo] ----------
     [echo] Resolving Dependencies for library...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency] 
[dependency] ------------------

-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] No changed resources. R.java and Manifest.java untouched.
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
    [javac] Compiling 19 source files to /Applications/renpy-6.99.13-sdk/rapt/extras/google/market_licensing/library/bin/classes
    [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.
    [javac] error: Target option 1.5 is no longer supported. Use 1.6 or later.

BUILD FAILED
/Applications/renpy-6.99.13-sdk/rapt/android-sdk-r24.4.1/tools/ant/build.xml:597: The following error occurred while executing this line:
/Applications/renpy-6.99.13-sdk/rapt/android-sdk-r24.4.1/tools/ant/build.xml:716: The following error occurred while executing this line:
/Applications/renpy-6.99.13-sdk/rapt/android-sdk-r24.4.1/tools/ant/build.xml:730: Compile failed; see the compiler error output for details.

Total time: 0 seconds




The build seems to have failed.


User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#251 Post by Imperf3kt »

From the error log, it looks like you need to update java. Speaking of which, I need to do that soon too.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

polisummer
Newbie
Posts: 12
Joined: Sat Jul 29, 2017 12:37 pm
Projects: Absolutely Haunting, What?! My Neighbors are Demons?!!
Organization: Kyungeki Workshop
Tumblr: polisummer
itch: polisummer
Location: middle of a tree sanctuary
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#252 Post by polisummer »

Do you know which version I need to change Java to? I just checked and reinstalled Java 8 Update 151. I'm getting the same error.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#253 Post by PyTom »

I think you might need to downgrade the jdk.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#254 Post by PyTom »

Actually, never mind. 6.99.14 has a fix for this.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#255 Post by Imperf3kt »

I recently received an email from Google stating that from August 2019, all uploaded .apk files must have both 32bit and 64 bit counterparts.

Is RAPT able to account for this?
Here's a link to more info:

https://android-developers.googleblog.c ... mance.html
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Post Reply

Who is online

Users browsing this forum: No registered users