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
JustALittleSin
Regular
Posts: 41
Joined: Wed Apr 11, 2012 1:15 pm
Projects: Unit & Jetser Forever
Organization: Visualnovels.nl
Location: The Hague, Holland
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#106 Post by JustALittleSin »

Morhighan wrote:Hi there, so I'm following this guide.

I'm at "Step 2: Set up the Android SDK and Development Environment" and I keep getting this. (see attached.)

I keep re-installing the JDK, but to no avail.
Had the same error, reinstalling Python worked for me.
Visualnovels.nl - We write (about) visual novels. In Dutch.
Dutch translations:
Visualnovels.nl Devblog - As above, but more relevant for non-Dutchies
Marijuana - De Waarheid / Witch Spell / Heartful Chance
Locked-In / Moonlight Walks [WIP]
The Knife Of The Traitor [WIP]

bard
Newbie
Posts: 1
Joined: Wed Jan 23, 2013 1:29 am
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#107 Post by bard »

rikimaru55 wrote:Hi! I managed to create the build and install on Android using APT, but when I ran it, I got the following error:

While executing init code:
File "game/options.rpy", line 272, in script
File "game/options.rpy", line 277, in python
NameError: name 'build' is not defined

Have you seen this error before?
Echoing rikimaru's question. I've run into the exact same error when I try running my RAPT packaged game. No problems creating the apk, but as soon as I open the game on my Android device it shows this error.

Any suggestions?

System: Win7 64-bit (with 64-bit Java, Python)
Tested on Android 4.2 and 2.1 with identical results

User avatar
Biomass
Regular
Posts: 104
Joined: Tue Jan 01, 2013 11:13 pm
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#108 Post by Biomass »

bard wrote:
rikimaru55 wrote:Hi! I managed to create the build and install on Android using APT, but when I ran it, I got the following error:

While executing init code:
File "game/options.rpy", line 272, in script
File "game/options.rpy", line 277, in python
NameError: name 'build' is not defined

Have you seen this error before?
Echoing rikimaru's question. I've run into the exact same error when I try running my RAPT packaged game. No problems creating the apk, but as soon as I open the game on my Android device it shows this error.

Any suggestions?

System: Win7 64-bit (with 64-bit Java, Python)
Tested on Android 4.2 and 2.1 with identical results

This is caused by the addition of build module related commands when you tell the renpy launcher to add build information to your project. The build module does not exist on android though. Since RAPT spits out its own apk file using its own process, you should remove any references to the build module. In your options.rpy file, remove everything below the lines that says "## This section contains information about how to build your project into distribution files."

User avatar
facadepapergirl
Regular
Posts: 46
Joined: Thu Jan 31, 2013 7:27 pm
Projects: Pokemon: Final Evolution; Galactic Lust Crisis
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#109 Post by facadepapergirl »

I get this when I try to build. It says 'cannot create a file that already exists: assets/ common.
app.png

User avatar
chewpower
Regular
Posts: 36
Joined: Mon Feb 11, 2013 11:08 pm
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#110 Post by chewpower »

Hi. I'm trying to follow the instruction but everytime I run the "android.py installsdk" command, right after I answered "yes" for the question "do you accept the terms" (or something like that) my cmd keeps prompting for proxy username and password (my workplace uses proxy, so, yeah). After filling those prompts for about 195 times, rapt seems to execute something in loop until my cmd decides to terminate the loop, hence ending the operation. Is the command "android.py installsdk" could work with proxies?

And two, according to the guide in renpy documentation, we have to go through 4 steps to make the game runnable on android. Do we have to follow them through again from the beginning to the end (besides the installation thingy) if we want to do another game?

Thank you all and have a good day.

User avatar
facadepapergirl
Regular
Posts: 46
Joined: Thu Jan 31, 2013 7:27 pm
Projects: Pokemon: Final Evolution; Galactic Lust Crisis
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#111 Post by facadepapergirl »

You must do the configuration and build for each game, which is step 3 and step 4. The first two steps are pretty much just installation. It wouldn't hurt to test it every time, but you don't have to do steps 1 & 2 every time.

ubccin
Newbie
Posts: 3
Joined: Sat Feb 16, 2013 9:58 pm
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#112 Post by ubccin »

I follow each steps
i made it to most, but when i run the command " android.py build mygame release install" (pic attached)

also, i was kinda confused during the part for configuration of the game, it asked me about the package, where the format should
have been sth like "com.xxx.xxx.xxx" .. i dont have one i think ?
Attachments
prob.jpg

ubccin
Newbie
Posts: 3
Joined: Sat Feb 16, 2013 9:58 pm
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#113 Post by ubccin »

JustALittleSin wrote:Ugh, It looks like I overlooked an earlier errormessage, something like "Error: Target id android-8 is not valid. Use 'android list targets' to get the target ids". I found the solution here: http://techpad.co.uk/content.php?sid=96

Anyone with the same problem should

1. run android-sdk/tools/android.bat
2. Install everything in the folder Android 4.1 (API 16)
3. run android.bat again, with the following command: android create avd --target 2 --name my_avd
4. open buildlibs/build.py in an editor and change android-8 (on line 231) to android-16

After that, RAPT worked perfectly for me.

how do you do step 3 ?
and also, i dont think i finish step two as well, it says " This package depends on 'Android SDK Platform-tools, revision 16.0.1'.

User avatar
chewpower
Regular
Posts: 36
Joined: Mon Feb 11, 2013 11:08 pm
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#114 Post by chewpower »

ubccin wrote: also, i was kinda confused during the part for configuration of the game, it asked me about the package, where the format should
have been sth like "com.xxx.xxx.xxx" .. i dont have one i think ?
Probably this post can help you http://lemmasoft.renai.us/forums/viewto ... 75#p195056 just see step number 8.

User avatar
chewpower
Regular
Posts: 36
Joined: Mon Feb 11, 2013 11:08 pm
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#115 Post by chewpower »

Hi, as for my last question...
chewpower wrote:Hi. I'm trying to follow the instruction but everytime I run the "android.py installsdk" command, right after I answered "yes" for the question "do you accept the terms" (or something like that) my cmd keeps prompting for proxy username and password (my workplace uses proxy, so, yeah). After filling those prompts for about 195 times, rapt seems to execute something in loop until my cmd decides to terminate the loop, hence ending the operation. Is the command "android.py installsdk" could work with proxies?
I tried to run the steps again with a modem and I think the Android SDK has been successfully installed, so now I can proceed to the next step, and nothing goes wrong.

Only in step 4 in "android.py build [insert_game_here] release" I got the error that seems to get to other people as well. Error: Target id android-8 is not valid. Use 'android list targets' to get the target ids

I understand this is the problem with Android SDK and I've come to a conclusion that the Android 2.2 package isn't installed yet, so I run android.bat to open the SDK manager but there is no packages to be installed, even after it fetched few URL to find any available package.

In short, my Android SDK can't show/install any package and contains only this (picture)

I've tried the following:
1. use my modem and not using proxy, still no package shows up
2. check the "Force https:/ to http:/" in Options menu, but still nothing
3. set the PATH variable in Environment Setting (Computer-->(rightclick)Properties-->Advanced System Settings-->(in Advance tab) Environment Variable) to contain the path of the android.bat, but still nothing...

Anyone?

EDIT: please forgive my stupidity. I just need to turn off my antivirus and firewall, then the packages magically shows up...
Attachments
SDK Manager screenshot
SDK Manager screenshot

kurix
Newbie
Posts: 1
Joined: Tue Feb 26, 2013 4:08 pm
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#116 Post by kurix »

I'm having trouble with the second step. "android.py test" returns "All systems go!"

When I try to run "android.py installsdk" I get an error message:

Code: Select all

C:\Users\Dewi\Downloads\Python\rapt-6.14.0.1>android.py installsdk

I'm compiling a short test program, to see if you have a working JDK
on your system.


The JDK is present and working. Good!


I'm downloading Apache Ant. This might take a while.


I'm extracting Apache Ant.

Traceback (most recent call last):
  File "C:\Users\Dewi\Downloads\Python\rapt-6.14.0.1\android.py", line 66, in <m
odule>
    main()
  File "C:\Users\Dewi\Downloads\Python\rapt-6.14.0.1\android.py", line 40, in ma
in
    install_sdk.install_sdk(iface)
  File "buildlib\install_sdk.py", line 191, in install_sdk
    unpack_ant(interface)
  File "buildlib\install_sdk.py", line 123, in unpack_ant
    os.rename(unpacked, "apache-ant")
WindowsError: [Error 5] Access is denied
I'm running the command prompt window as admin. The rapt-6.14.0.1 folder contains the "apache-ant-1.8.4-bin.tar.gz" file and the extracted "apache-ant-1.8.4" folder. Anybody else had this trouble? Any ideas?

CaseyLoufek
Regular
Posts: 142
Joined: Sat May 28, 2011 1:15 am
Projects: Bliss Stage, Orbital Knights
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#117 Post by CaseyLoufek »

Also had to reinstall Python 2.7... which is odd since I installed 2.7 after RAPT in the first place.

Also the build is a tad probabalistic. Sometimes it just fails to be able to access assets, then works fine next run.

On the droid it's great but I noticed I can't use my external .py files and had to move everything into .rpy files

CaseyLoufek
Regular
Posts: 142
Joined: Sat May 28, 2011 1:15 am
Projects: Bliss Stage, Orbital Knights
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#118 Post by CaseyLoufek »

Okay, thinking about this a little more clearly it seems obvious the problem is to do with .pyc files. So is it that the game is looking for .pyc files that didn't get packed... or is it a problem with using .pyc files in the enviroment? Or does Ren'py not actually make stuff into .pyc in the first places and that's confusing the packed version? I see .rpyc but no .pyc files.

Easy fix is too move it all to .rpy files, I just liked having them out so I could easily bring classes into a non-Ren'py project if I ever wanted to. Not that hard to do so even with this issue.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
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

#119 Post by PyTom »

I think .py files will work, but not .pyc. .pyo might or might not work.
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
Interitum
Newbie
Posts: 17
Joined: Sun Mar 17, 2013 10:32 pm
Projects: Amor et Vitia
Organization: Interitum Studios
Contact:

Re: RAPT - Ren'Py Android Packaging Tool

#120 Post by Interitum »

Well, can't get past Step 2.
Checked the path, attempted fixing it.
No go.
JDK exists, re-installed both that and Python.
Ideas?
Thanks in advance.
Attachments
cmdcap.jpg
"A wise man once told me, 'Procrastination is like...'"

"I know I am a scout,
And I should have found a way out,
So everyone can find a way out."

I will eat ALL your unhappiness!

Post Reply

Who is online

Users browsing this forum: Amazon [Bot]