Page 2 of 4

Re: Building AT on Android

Posted: Mon Jan 15, 2018 11:34 am
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.

Re: Building AT on Android

Posted: Tue Jan 16, 2018 2:41 pm
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,))

Re: Building AT on Android

Posted: Tue Jan 16, 2018 5:21 pm
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.

Re: Building AT on Android

Posted: Wed Jan 17, 2018 12:37 pm
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.

Re: Building AT on Android

Posted: Wed Jan 17, 2018 2:49 pm
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???

Re: Building AT on Android

Posted: Wed Jan 17, 2018 3:07 pm
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.

Re: Building AT on Android

Posted: Wed Jan 17, 2018 4:15 pm
by Zukero
Exactly.

Re: Building AT on Android

Posted: Thu Jan 18, 2018 5:56 pm
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???

Re: Building AT on Android

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

Can you put the apk somewhere and PM me with a link to download it?

Re: Building AT on Android

Posted: Thu Jan 18, 2018 6:39 pm
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.