When making an Android build, missing file error

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
hedleypty
Regular
Posts: 31
Joined: Mon Oct 20, 2014 12:52 am
Contact:

Re: When making an Android build, missing file error

#16 Post by hedleypty » Thu Apr 28, 2016 3:15 pm

I am running this from Linux and I got the same problem!
I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/android.rpy", line 445, in script
File "game/android.rpy", line 447, in <module>
IOError: [Errno 2] No such file or directory: '/home/hedley/Documents/renpy/rapt/android-sdk-r24.4.1/extras/google/play_apk_expansion/downloader_library/project.properties'

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "game/android.rpy", line 445, in script
File "/home/hedley/Documents/renpy/renpy/ast.py", line 806, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "/home/hedley/Documents/renpy/renpy/python.py", line 1577, in py_exec_bytecode
exec bytecode in globals, locals
File "game/android.rpy", line 447, in <module>
File "/home/hedley/Documents/renpy/rapt/buildlib/rapt/install_sdk.py", line 263, in install_sdk
get_packages(interface)
File "/home/hedley/Documents/renpy/rapt/buildlib/rapt/install_sdk.py", line 186, in get_packages
with open(plat.path("android-sdk/extras/google/play_apk_expansion/downloader_library/project.properties"), "r") as f:
IOError: [Errno 2] No such file or directory: '/home/hedley/Documents/renpy/rapt/android-sdk-r24.4.1/extras/google/play_apk_expansion/downloader_library/project.properties'

Linux-4.4.0-21-generic-x86_64-with-debian-stretch-sid
Ren'Py 6.99.10.1227
Ren'Py Launcher 6.99.10.1227

hedleypty
Regular
Posts: 31
Joined: Mon Oct 20, 2014 12:52 am
Contact:

Re: When making an Android build, missing file error

#17 Post by hedleypty » Sat Apr 30, 2016 4:11 pm

After 24 hours, I could solve it! I took me a lot, because the advice given were very difficult to follow.
This is what I did:

Firstly I have installed Android Studio.
Secondly, I have installed play_apk_expansion, the billing and the licencing extra packages using the skd manager from Android studio. It is placed in a cogwheel in the lower part of the interface in Linux (I guess it's the same in Windows)

Thirdly, I have constructed a mock compressed file called "android-sdk-r24.4.1_r24.4.1-linux.tgz" from the installed contents of the Sdk using the Android Studio ADV Manager.
Since I am using linux Lubuntu, it is placed at /home/<username>/Android/Sdk/. I copied in a folder called android-sdk-linux/ and I place the folder inside the compressed file. Before adding these to the compressed file, i rename the folder market_apk_expansion to play_apk_expansion and the folder market_licencing to play_licencing.

Fifthly, I download a fresh copy of rapt from the renpy website and uncompressed the folder inside the renpy folder

Sixthly, I place the mock compressed file in the rapt folder.

Sixthy, I suppressed the download of an Sdk (which doesn't contain the "extras" folder) from Google. In order to do that I commented out these 2 lines from ../renpy/rapt/buildlib/rapt/install_sdk.py:

Code: Select all

   #interface.info("I'm downloading the Android SDK. This might take a while.")

    #interface.download(url, plat.path(archive))
Finally I ran renpy and tried to installed the sdk and store the keys... everything worked for me at least!

fzzylogic
Newbie
Posts: 1
Joined: Sat Jun 04, 2016 6:00 am
Contact:

Re: When making an Android build, missing file error

#18 Post by fzzylogic » Sat Jun 04, 2016 6:37 am

I had the same error on a 32bit Xubuntu 14.04.4. Problem was two-fold.
First, two important folders are missing.
Second, once they are downloaded, they have different default names to what renpy expects.

Path to resolution was as follows:

1. Installed Renpy 6.99.10 by downloading and extracting .tar.bz2 archive from https://www.renpy.org/latest.html.
2. Launch Renpy and click "Android" menu option (rapt should be installed automatically at this point). A new "rapt" folder will now exist within your main renpy folder.
3. From Android screen, click "Install SDK and create keys". SDK archive will be downloaded and unpacked within rapt folder, with folder name according to SDK version. Mine was "android-sdk-r24.4.1". However, this folder is missing two sub-folders.
4. To get the missing sub-folders, from the terminal cd into "your_main_renpy_folder/rapt/android-sdk-r24.4.1/tools" folder. Launch 'android' script with "sudo ./android". (sudo may not strictly be necessary, but i'm putting it in to avoid talking about potential file ownership problems)
5. The Android SDK manager should appear. Deselect everything (several Gigs of unnecessary things may be selected), scroll to the Extras section (bottom) and select only: "Google Play APK Expansion Library" and "Google Play Licensing Library". Then click "Install 2 packages" at the bottom right.
6. This should download two new folders and put them at: "your_main_renpy_folder/rapt/android-sdk-r24.4.1/extras/google/". These folders are initially called "market_apk_expansion" and "market_licensing". Renpy 6.99.10 expects them to be called "play_apk_expansion" and "play_licensing". So rename *both* of them to what renpy expects. Thanks so much to the thorough posting of the last person who ran into this problem, bcs i got stuck at only renaming one of them.. If only one is renamed, no obvious error is shown (terminal shows pipe error..), but you are not able to configure or build Android projects.
7. Relaunch renpy. Within the Android screen, you should now be able to configure and build Android things.

Also, i should mention that i downloaded the latest nightly build (03/06/2016) after learning that the problem may have been fixed already there, but upon launching it seems to have "updated" itself to a version that still has this problem and since i don't know how to tell it not to do that, i ended up with this approach.

Hope this helps someone. This post is so long may as well also thank PyTom and everyone for all your efforts, Renpy is great.

User avatar
Geckos
Veteran
Posts: 471
Joined: Fri Aug 17, 2012 8:33 am
Completed: Brilliant Shadows, Perceptions of the Dead, The Phantom Icecream Truck
Projects: Embers of Magic, Pale Spectrum, Perceptions of the Dead
Organization: Ithaqua Labs
Tumblr: geckosart
Deviantart: sitaart
Contact:

Re: When making an Android build, missing file error

#19 Post by Geckos » Tue Jul 26, 2016 3:10 pm

fzzylogic wrote:I had the same error on a 32bit Xubuntu 14.04.4. Problem was two-fold.
First, two important folders are missing.
Second, once they are downloaded, they have different default names to what renpy expects.

Path to resolution was as follows:

1. Installed Renpy 6.99.10 by downloading and extracting .tar.bz2 archive from https://www.renpy.org/latest.html.
2. Launch Renpy and click "Android" menu option (rapt should be installed automatically at this point). A new "rapt" folder will now exist within your main renpy folder.
3. From Android screen, click "Install SDK and create keys". SDK archive will be downloaded and unpacked within rapt folder, with folder name according to SDK version. Mine was "android-sdk-r24.4.1". However, this folder is missing two sub-folders.
4. To get the missing sub-folders, from the terminal cd into "your_main_renpy_folder/rapt/android-sdk-r24.4.1/tools" folder. Launch 'android' script with "sudo ./android". (sudo may not strictly be necessary, but i'm putting it in to avoid talking about potential file ownership problems)
5. The Android SDK manager should appear. Deselect everything (several Gigs of unnecessary things may be selected), scroll to the Extras section (bottom) and select only: "Google Play APK Expansion Library" and "Google Play Licensing Library". Then click "Install 2 packages" at the bottom right.
6. This should download two new folders and put them at: "your_main_renpy_folder/rapt/android-sdk-r24.4.1/extras/google/". These folders are initially called "market_apk_expansion" and "market_licensing". Renpy 6.99.10 expects them to be called "play_apk_expansion" and "play_licensing". So rename *both* of them to what renpy expects. Thanks so much to the thorough posting of the last person who ran into this problem, bcs i got stuck at only renaming one of them.. If only one is renamed, no obvious error is shown (terminal shows pipe error..), but you are not able to configure or build Android projects.
7. Relaunch renpy. Within the Android screen, you should now be able to configure and build Android things.

Also, i should mention that i downloaded the latest nightly build (03/06/2016) after learning that the problem may have been fixed already there, but upon launching it seems to have "updated" itself to a version that still has this problem and since i don't know how to tell it not to do that, i ended up with this approach.

Hope this helps someone. This post is so long may as well also thank PyTom and everyone for all your efforts, Renpy is great.
Worked great. Thank you for taking the time to post about it!
Image ImageImage

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]