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

Setting up dev environment.

Discussions of the development process of the game.
ace
VIP
Posts: 573
Joined: Sat Jun 21, 2014 4:00 am
android_version: 9.0 - Pie
Location: lodar's hideout

Re: Setting up dev environment.

Post by ace »

The only error in AS I get is Android-apt-compiler error because of a file which contains space in its name . I can read and modify code just fine.
the secrets of shadow and light
be happy :lol:
https://facebook.com/andorstrail
User avatar
Moerit
VIP
Posts: 107
Joined: Wed Oct 16, 2013 6:44 pm
android_version: 4.1 - Jellybean

Re: Setting up dev environment.

Post by Moerit »

Damn, looks like eclipse isnt anymore avaible - all download links in the Contribution Guide are leading to the newest AS-Version.I used now the downloadlink from rijackson but noob as i am i stumble over the first pop-up window there ("Welcome to Android Studio" - i chose "Check out project from Version Control" -> "GitHub" and get an error message ("Cannot run program "git.exe": CreateProcess error=2, Das System kann die angegebene Datei nicht finden"))

we really need a new Guide but im totally thankfully when the dev-team will firstly push through the new version!

P.S.: If someone more expierenced with AS is willing to explain how those thinks work i'd be glad - until then i will have to check if the eclipse on my old laptop will work
Lvl: 16, XP: 47538, Gold: 474, RoLS: 0, ElyR: 0, RoL: 0, ChaR: 0, GoLF: 0, ShaF: 0, SRoV: 0, VSH: 0, WMC: 0, GoW: 0
HP: 151, AC: 248%, AD: 29-40, AP: 4, ECC: 22%, CM: -, BC: 160%, DR: 5
User avatar
rijackson741
Posts: 4451
Joined: Tue Aug 20, 2013 2:04 am
android_version: 10 - Android 10
Location: Somewhere in Dhayavar
Contact:

Re: Setting up dev environment.

Post by rijackson741 »

This might sound kind of obvious, but did you install git? I don't think Android Studio will install it for you.

Zukero maybe has the installer for Eclipse.
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
Zukero
Lead Developer
Posts: 2028
Joined: Thu Jul 21, 2011 9:56 am
android_version: 8.0
Location: Eclipse

Re: Setting up dev environment.

Post by Zukero »

You can get eclipse from https://eclipse.org/downloads/packages and get "Eclipse for Java developers". You'll then need to find an old release of the stand-alone Android SDK, because the new ones don't include a graphical package manager.
Finally, you'll need to install the ADT plug-in from within eclipse, using an "update site" like found here: https://github.com/dandar3/eclipse-adt- ... /README.md

Once you figure out how to set up all of this, you'll notice that the debugger and logcat do not work on Android 7.0+

Now, Android Studio 3.0+ requires a code structure that Andor's Trail do not have currently, so you're stuck with AS 2.x.

See, this is a mess. After the release, I'll work on making AT usable in the latest AS, and then maybe I'll manage to update this guide.... :roll:
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
Moerit
VIP
Posts: 107
Joined: Wed Oct 16, 2013 6:44 pm
android_version: 4.1 - Jellybean

Re: Setting up dev environment.

Post by Moerit »

I just can wish you gooood luck for that project!
I examined my old laptop which i was working with. I found an old adt-bundle and with that i followed the Contribution Guide until i had to update to API 21 but the SDK-manager doesnt offer me that, well, nevermind - i maybe will better be waiting until the release is finally out before i will try any more to get the system set up.
In case someone is interested in the bundle, here's the link

Edit:
Updated the SDK Manager, now it shows packages up to API 28. I now only install the API 21 packages.
eclipse said ADT version is to low. I deleted the eclipse folder and replaced it with the one i downloaded via Zukero's links above.
Had to update my eclipse-workspace but eclipse now starts without errors. There's now just a little red "!" in the package explorer on andorstrail.
tryong to launch or debug gives me a Launch error "Selection does not contain a main type"
my guess: Its about the programs version (either SDK or ADT or some package or AT's mentioned other structure)
Lvl: 16, XP: 47538, Gold: 474, RoLS: 0, ElyR: 0, RoL: 0, ChaR: 0, GoLF: 0, ShaF: 0, SRoV: 0, VSH: 0, WMC: 0, GoW: 0
HP: 151, AC: 248%, AD: 29-40, AP: 4, ECC: 22%, CM: -, BC: 160%, DR: 5
User avatar
James Doakes
Posts: 4
Joined: Tue Aug 13, 2019 12:11 pm
android_version: 4.4 - Kitkat

Re: Setting up dev environment.

Post by James Doakes »

So, as a first step towards anything I want to successfully make the v0.7.5 apk in Android Studio.
But I have little experience with setting up things like this, I guess, and it becomes quite a headache when there is no clear guide for using this project in AS.

What I've done so far (short version):
-Forked on github, downloaded production branch with GitHub Desktop.
-Installed AS 2.2.3 from https://developer.android.com/studio/archive
-In AS, choose existing project -> I chose AndorsTrail folder (am I supposed to do this?)
-Project structure -> API 24, language level 5.0
In addition to assets, libs, res and src I also have .idea and gen folders now. The gen folder is automatically marked as the only source folder. I don't know what this is but without it, "import com.gpl.rpg.AndorsTrail.R;" won't resolve. I found it sensible to also mark src as a root source folder.
Now the (first) errors seems to happen in HeroinfoActivity.java:
"import android.support.v4.app.FragmentActivity;" and
"import android.support.v4.app.FragmentTabHost;".
Those lines seems to offer slightly different errors when trying out different API levels.

What now? Please help, I'll reward 20k exp and 50 gold.
Surprise!
User avatar
rijackson741
Posts: 4451
Joined: Tue Aug 20, 2013 2:04 am
android_version: 10 - Android 10
Location: Somewhere in Dhayavar
Contact:

Re: Setting up dev environment.

Post by rijackson741 »

I'm not sure what you mean when you say "In AS, choose existing project". You need to go to File, New, Import project, and then choose the AndorsTrail folder for the sources.

When are you getting these errors? When you try to build the apk? Are these fatal errors?

We do need a new guide, but we are changing the structure of the sources to match what AS 3.x wants, so there's not much point in writing one for AS 2.x. Ideally, it would be obsolete before we finished it :D
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
Zukero
Lead Developer
Posts: 2028
Joined: Thu Jul 21, 2011 9:56 am
android_version: 8.0
Location: Eclipse

Re: Setting up dev environment.

Post by Zukero »

Your issues indicate that you didn't reference the jar file under lib/ as a dependency.
The R class is generated by the SDK from the list of files under res/, and is created in gen/.

Other than that, you can try to use Android Studio 3.x by using the AS3_migration branch from my github. It's not complete yet, but should yield a usable project.
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
Gonk
Posts: 192
Joined: Mon Mar 04, 2019 8:45 pm
android_version: 8.1 - Oreo

Re: Setting up dev environment.

Post by Gonk »

My build environment is working with android studio 2.2.3. The main difficulties when I first tried it were correctly importing instead of opening the project. See rijacksons post for details on how to do it. And using the correct sdk: I had to uninstall sdk tools 28 and install 25. If you still have problems I can try to assist you by giving more detailed explainations, sending my configs, etc.
User avatar
James Doakes
Posts: 4
Joined: Tue Aug 13, 2019 12:11 pm
android_version: 4.4 - Kitkat

Re: Setting up dev environment.

Post by James Doakes »

Thanks! The missing jar lib was the last piece of the puzzle.
I also made it work in AS 3.x! That one was just open and run.

Just to mention it: When I try using the import method that's recommended here on AS 2.2.3, it automatically converts to gradle no matter what.
( https://www.dropbox.com/s/s700a8e5fesl7 ... T.png?dl=0 )
But opening it as an existing project (folder icon on welcome screen), however, worked by (iirc):
1) Add framework: android (on module AndorsTrail)
2) Set the SDK (API 28 worked?)
3) Add the .jar in \libs folder to dependencies (listed alongside the SDK)
4) Mark the \src folder as a source folder (alongside \gen, which should exist by now)
Surprise!
Post Reply