[SOLVED]Exporting to Android: The build failed

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.
Post Reply
Message
Author
User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

[SOLVED]Exporting to Android: The build failed

#1 Post by Imperf3kt »

The log file is over 500 lines, so I've added it as an attachment.
android.txt
(31.9 KiB) Downloaded 100 times
The error seems to come in when compiling:
BUILD FAILED
C:\Program Files (x86)\renpy\rapt\android-sdk-r24.4.1\tools\ant\build.xml:888: The following error occurred while executing this line:
C:\Program Files (x86)\renpy\rapt\android-sdk-r24.4.1\tools\ant\build.xml:890: The following error occurred while executing this line:
C:\Program Files (x86)\renpy\rapt\android-sdk-r24.4.1\tools\ant\build.xml:902: The following error occurred while executing this line:
C:\Program Files (x86)\renpy\rapt\android-sdk-r24.4.1\tools\ant\build.xml:283: null returned: 1
I'm seeing a lot of "class name (Renpy/gallery/tutorial/R) does not match path (renpy/gallery/tutorial/R.class)" and similar errors.

About the game, there's nothing fancy in it. Its got less content than other games I've exported to Android, but this is the first time I've seen this error and I can't understand a word of the error log.

Can anybody help?
Last edited by Imperf3kt on Fri Sep 22, 2017 1:56 am, edited 1 time in total.
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

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: Exporting to Android: The build failed

#2 Post by PyTom »

My guess is that you gave it a name like Renpy.gallery.tutorial, and windows is not liking the upper-case R. That's a new one - I'm going to force this to lower case in the future.
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: Exporting to Android: The build failed

#3 Post by Imperf3kt »

Almost. For the Android build, I gave it the project name "NewGUIGalleryTutorial" and when it asked for a project short name, I gave "gallery tutorial"

I think you may be onto something though, so I will look into this after work. I think maybe the space is causing issues.
The project I tested this on isn't intended to be used on an android device (planned small text that is otherwise unreadable on a small screen), I just like to package up a copy that I can think about and mentally change during my moments of free time at work.

Thanks for the reply.
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

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

Re: Exporting to Android: The build failed

#4 Post by Imperf3kt »

Okay, after looking into it after work, It seems I called the package name "Renpy.gallery.tutorial" as you had suspected. (There's three things to name when configuring Android builds, I got confused about which one you had meant.)

I changed the capital R to lower case r but it still failed.

One thing I do notice, is that when Editra opens up with the log report, it complains about mixed line endings and asks me if I want to convert them all to one format.

Edit:
After testing with something I know 100% for sure exported to Android last time I tried and has not been edited since, I get the same error.
I decided to try reinstalling the JDK, but Ren'Py reports the JDK works fine.

I'm not sure whats the matter.
I'll try updating Ren'Py... or not - Ren'Py reports Ren'Py is up to date.

Edit 2: I tried to compile "The Question" to Android. It also failed, so I recorded the whole (~3 minute) process.

https://puu.sh/xDuNr/f46121ad75.mp4

Okay, I'm confused.
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

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: Exporting to Android: The build failed

#5 Post by PyTom »

Can you post the new android.txt, now that you've changed things? The old one is invalid.
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: Exporting to Android: The build failed

#6 Post by Imperf3kt »

Ah, right, sorry. Forgot to include that.

Android.txt generated while trying to build an Android .apk for the Question:
android.txt
(12.89 KiB) Downloaded 100 times
[dx] Caused by: com.android.dx.cf.iface.ParseException: class name (Renpy/gallery/tutorial/BuildConfig) does not match path (renpy/gallery/tutorial/BuildConfig.class)
Yes, I made sure this is the log from "The Question"
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

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: Exporting to Android: The build failed

#7 Post by PyTom »

Hm...

This is the same problem, being cached somewhere in the build process. I'd poke around for BuildConfig.class and delete relevant-seeming directories until it works. (Or you might want to just try deleting the entire rapt directory, save for the keystore file, and reinstall.)
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
Karl_C
Veteran
Posts: 232
Joined: Sun Mar 31, 2013 6:18 am
Contact:

Re: Exporting to Android: The build failed

#8 Post by Karl_C »

Isn't 'gradlew clean' available to execute the project's clean task? It seems to be the command line equivalent to Android Studio's 'Build --> Clean Project'?

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

[Solved]Re: Exporting to Android: The build failed

#9 Post by Imperf3kt »

Okay, problem solved.

I went though the "rapt" folder and deleted everything inside "gen" except "R.java.d"
I then went into the "bin" folder and deleted all the files related to the games I had previously packaged.

The build Succeeded.

Thanks for the clue on where I should look, PyTom. It was really helpful. I was looking through the launcher folder contents for hours until you mentioned that xD
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