v0.8.9 (Bugfixes + translations) released to Google Play!

Useful links
Source code of the game - Contribution guide - ATCS Editor - Translate the game on Weblate - Example walkthrough - Andor's Trail Directory - Join the Discord
Get the game (v0.8.9) from Google, F-Droid, our server, or itch.io

Building AT on Android

Discussions of the development process of the game.
User avatar
Zukero
Lead Developer
Posts: 2028
Joined: Thu Jul 21, 2011 9:56 am
android_version: 8.0
Location: Eclipse

Re: Building AT on Android

Post by Zukero »

You should have some error log (logcat) somewhere in AIDE. Look for some messages tagged Fatal or Error, and potentially a stack trace (many lines beginning with com.gpl.rpg.andorstrail....).
When found, paste it here.
Lvl: 78, XP: 8622632, Gold: 271542, RoLS: 1, ElyR: -, RoL: -, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 1, VSH: 1, WMC: 1, GoW: 1
HP: 71, AC: 301%, AD: 38-47, AP: 3, ECC: 50%, CM: 3.75, BC: 101%, DR: 2
User avatar
Shadow Slayer
Posts: 56
Joined: Fri Jan 05, 2018 10:22 am
android_version: 4.4 - Kitkat
Location: Vacor's Hideout (Temporarily Retired)(Real Life Location, I WILL NOT TELL YOU:))

Re: Building AT on Android

Post by Shadow Slayer »

Yeah, Unfortunately I can't paste it out or wright it down for one reason, I get up to 7116 errors, I did write down most of the errors that repeated for thousands of times, I tried building AT as an Android App, Mobile game and Java App. I have written what happened for each in sections to make it easier to see what happened...

1: Android App) When creating an android app I got No errors when turning on AIDE and my project, when I pressed the play button, when compiling the apt I got 3 errors upon 0% saying something about icon not being found in resource or something with @ at some point and some stuff written that I do not understand, (references to appt and resource) when the compiling went up to 10% or higher until stopping upon 1115 errors, but they all seemed similar, they said unknown entity or package "R", or Invalid package declaration, when I pressed the first error I was taken to some points of the code saying stuff like, <preset.skill>"R" or sometimes random Rs in the code, the second error was at the top of the code simply saying package com.gpl.rpg.AndorsTrail... The rest was mainactivity.java or other activites like heroinfo.java or any other activity I know of, this seemed alright because I moved the gpl folder into every single place possible in the project, I even created a folder called package com, and I tried starting a new project placing gpl in different places but no other copies in the project...

2: Mobile Game) I did the same things as in android app including the same resolutions but this time I wasn't getting the odd 3 errors at start of compiling but 7116 errors about unknown entities, packages and invalid package declarations...

3: Java Application) Strangely enough Everything worked (No errors on load and running of the app) but when I pressed the button to run it it still displayed hello world... But I suppose that's because AT is not a Java app.

And thank you for trying to help :D :D :D

Edit: Is it possible I have these errors because some of my items or conditions I created in ATCS don't have a category?(I read a post about someone having similar problems viewtopic.php?f=6&t=5649 (But that was after the game loaded so I don't think so,))
They called it the Shadow, and started creating a small cult around it, Only the smallest core of the cult actually knows that this power comes from the Kazaul-era dark arts...
User avatar
Zukero
Lead Developer
Posts: 2028
Joined: Thu Jul 21, 2011 9:56 am
android_version: 8.0
Location: Eclipse

Re: Building AT on Android

Post by Zukero »

Option 1 sounds like it is what you need to use.
You REALLY should try to run the game as it can be found on github first (master branch).
The "R" file is generated by the android toolkit to generate numeric IDs for all resources under the "res/" folder to reference them from Java code. For example, in the android java code, you would use something like:

Code: Select all

findResource(R.xml.home);
to access the home.tmx map file.

"aapt" is the android toolkit binary that generates the R.java file. It is (one of) the first step(s) in compiling an android app.
The "R" class is referenced many times in many places in the Java code, so if aapt fails to create it, the compiler will throw many similar errors about it missing.

I never managed to use one of the free Android app compilers because their aapt binary would fail to launch on Android 5+ (a new security requirement for binaries enforced in 5+). AIDE should have it done right though.

It is very likely that something you changed makes aapt fail.
It is also possible that there's something new in the recent versions of the android toolkit that choke on the existing code.
I have to look something up about new versions failing to compile because all contents of the res/xml/ directory must be XML files, with filenames ending in .xml, and our maps are XML files ending in .tmx, forcing me to move it all under res/raw/, and updating the res/values/loadresources*.xml files accordingly.
Lvl: 78, XP: 8622632, Gold: 271542, RoLS: 1, ElyR: -, RoL: -, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 1, VSH: 1, WMC: 1, GoW: 1
HP: 71, AC: 301%, AD: 38-47, AP: 3, ECC: 50%, CM: 3.75, BC: 101%, DR: 2
User avatar
rijackson741
Posts: 4451
Joined: Tue Aug 20, 2013 2:04 am
android_version: 10 - Android 10
Location: Somewhere in Dhayavar
Contact:

Re: Building AT on Android

Post by rijackson741 »

Zukero wrote: Tue Jan 16, 2018 5:21 pm You REALLY should try to run the game as it can be found on github first (master branch).
I just want to emphasize that point. You are confounding two problems: getting AIDE to build AT correctly, and incorporating your content. Solve one first, then the other.

There's an AIDE community here: https://plus.google.com/communities/104 ... 900d6f6158 that may be able to help. If you point them to the github sources (minus your content) someone can probably give you instructions on what to do.
Level:71, XP:6493739, PV:608, FQ:84
HP:210, AC:212, AD:58-77, AP:4, ECC:16%, CM:1.5, BC:188, DR:3
Gold: 237559 | RoLS:1, RoL:1, GoW:1, VSH:1, RoFLS:1, WoB:1
HH:1, WA:1, CS:2, Cl:1, IF:4, Ev:3, Re:2, WP:DA:1, WP:1S:1, WP:B:1, AP:L:1, FS:DW:2, S:DW:1
User avatar
Shadow Slayer
Posts: 56
Joined: Fri Jan 05, 2018 10:22 am
android_version: 4.4 - Kitkat
Location: Vacor's Hideout (Temporarily Retired)(Real Life Location, I WILL NOT TELL YOU:))

Re: Building AT on Android

Post by Shadow Slayer »

Zukero wrote: Tue Jan 16, 2018 5:21 pm Option 1 sounds like it is what you need to use.
You REALLY should try to run the game as it can be found on github first (master branch).
So I should download AT from github or something, sorry but what do you mean by running the game, you mean playing AT???
They called it the Shadow, and started creating a small cult around it, Only the smallest core of the cult actually knows that this power comes from the Kazaul-era dark arts...
sdevaney
Site Admin
Posts: 1177
Joined: Fri Jan 28, 2011 10:17 pm
android_version: 14 - Android 14
Contact:

Re: Building AT on Android

Post by sdevaney »

Shadow Slayer wrote: Wed Jan 17, 2018 2:49 pm
Zukero wrote: Tue Jan 16, 2018 5:21 pm Option 1 sounds like it is what you need to use.
You REALLY should try to run the game as it can be found on github first (master branch).
So I should download AT from github or something, sorry but what do you mean by running the game, you mean playing AT???
I believe what they mean is for you to try compiling from the github source using your phone method without your new content. We know the github source is good to compile an apk as it's been used in previous content testing. Then once you are able to do that, look into adding in your new content and compiling an apk with it included.
User avatar
Zukero
Lead Developer
Posts: 2028
Joined: Thu Jul 21, 2011 9:56 am
android_version: 8.0
Location: Eclipse

Re: Building AT on Android

Post by Zukero »

Exactly.
Lvl: 78, XP: 8622632, Gold: 271542, RoLS: 1, ElyR: -, RoL: -, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 1, VSH: 1, WMC: 1, GoW: 1
HP: 71, AC: 301%, AD: 38-47, AP: 3, ECC: 50%, CM: 3.75, BC: 101%, DR: 2
User avatar
Shadow Slayer
Posts: 56
Joined: Fri Jan 05, 2018 10:22 am
android_version: 4.4 - Kitkat
Location: Vacor's Hideout (Temporarily Retired)(Real Life Location, I WILL NOT TELL YOU:))

Re: Building AT on Android

Post by Shadow Slayer »

Ok, so I finally did it, but...After creating AT, I added my ATCS content to the resaurces folder, json files into raw and maps into xml, I reinstalled AT with my content after recompiling apk, but nothing was there, I uninstalled the AT I created and deleted the apk and created a new one with my content included, I run it and still nothing there :o

Does somebody know whats wrong???
They called it the Shadow, and started creating a small cult around it, Only the smallest core of the cult actually knows that this power comes from the Kazaul-era dark arts...
User avatar
rijackson741
Posts: 4451
Joined: Tue Aug 20, 2013 2:04 am
android_version: 10 - Android 10
Location: Somewhere in Dhayavar
Contact:

Re: Building AT on Android

Post by rijackson741 »

Did you get any errors when compiling?

Can you put the apk somewhere and PM me with a link to download it?
Level:71, XP:6493739, PV:608, FQ:84
HP:210, AC:212, AD:58-77, AP:4, ECC:16%, CM:1.5, BC:188, DR:3
Gold: 237559 | RoLS:1, RoL:1, GoW:1, VSH:1, RoFLS:1, WoB:1
HH:1, WA:1, CS:2, Cl:1, IF:4, Ev:3, Re:2, WP:DA:1, WP:1S:1, WP:B:1, AP:L:1, FS:DW:2, S:DW:1
User avatar
Shadow Slayer
Posts: 56
Joined: Fri Jan 05, 2018 10:22 am
android_version: 4.4 - Kitkat
Location: Vacor's Hideout (Temporarily Retired)(Real Life Location, I WILL NOT TELL YOU:))

Re: Building AT on Android

Post by Shadow Slayer »

rijackson741 wrote: Thu Jan 18, 2018 6:12 pm Did you get any errors when compiling?

Can you put the apk somewhere and PM me with a link to download it?
No errors and I dont know how to link a download from my phone and I dont think it would help, there are no errors when compiling, it is just as if aide is ignoring my content when compiling, I opened R.java file and saw all the files from the resaurce folder (public static final name_of_file=numbers) apart from my content.
They called it the Shadow, and started creating a small cult around it, Only the smallest core of the cult actually knows that this power comes from the Kazaul-era dark arts...
Post Reply