Setting up dev environment.

Discussions of the development process of the game.
User avatar
rijackson741
Posts: 3597
Joined: Tue Aug 20, 2013 2:04 am
android_version: 10 - Android 10
Location: Somewhere in Dhayavar

Re: Setting up dev environment.

Post by rijackson741 »

Great :D

So what's next? Are you looking to contribute to code or content? Or just exploring?
Level:69, XP:6038672, PV:555, FQ:77
HP:224, AC:216, AD:47-59, AP:3, ECC:27%, CM:3, BC:174, 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, AP:L:1, FS:DW:2, S:DW:1
QQkp
Posts: 31
Joined: Sat Dec 21, 2019 4:33 am
android_version: 10 - Android 10

Re: Setting up dev environment.

Post by QQkp »

Apologies for thread necro.

Edit 3: Solved! The build process wasn't the issue - unbeknownst to me, one of the times I was toying with the configs, I somehow ended up with a modified AndorsTrail.iml that was stuffed into the project's .idea folder (which is ignored by git). Killing that .iml file, then right-clicking the real AndorsTrail.iml in the root AndorsTrail directory and hitting "Open Project" caused the resulting APKs to work perfectly. (No idea what was wrong with the old .iml file, but eh, probably a lot, so I won't think too hard on it.)

Hurrah!

---

Edit 2: Next problem - the resulting APK consistently crashes on the Virtual Device I've just set up (hardware profile Nexus 5, OS 7.1.1/Nougat @ API 25). The same Virtual Device is capable of installing and playing the official release from the Play Store, so I think the APK itself is a dud. `git status` on the AndorsTrail checkout for the project shows everything clean except for project.properties, where AS apparently auto-added a seemingly harmless line: "project.type=0"

So maybe that approach for fixing the build process wasn't the right way to go after all? Sanity checks more than welcome! :)


---

Edit: Nevermind, I've figured it out. Apparently, DxConsole doesn't exist in the 28+ versions of build-tools, but it does in 25. Installing the version 25 build-tools wasn't enough - had to install 25 and uninstall all subsequent versions - but that seems to have corrected it.

For others with a functioning environment, does this sound correct? SDK Platform/API 28, but SDK Build-Tools 25? Or have I gotten myself down the wrong path?

---

I'm trying to figure out what I've done here - I started setting up a dev environment back in January, but had to abandon it until now.

Current status:
  • Running AS 2.3.3 (couldn't get 2.2.3 like Gonk mentioned earlier in the thread, since it appears that it's been removed from the AS archives - they only have releases going back 3 years)
  • Running Android SDK 28 (initially tried 25 as mentioned earlier in this thread, but it seems that this commit made 28+ required, since VERSION_CODES.P didn't exist in 25)
  • Running Windows 10 Home
  • Currently encountering the same error that fifa1988 bonked into earlier in the thread - stack trace attached:

    Code: Select all

    Information:2020-06-27 19:22 - Compilation completed with 10 errors and 0 warnings in 1s 764ms
    Error:Android Dex: [AndorsTrail] Failed to load dx.jar
    Error:Android Dex: [AndorsTrail] java.lang.ClassNotFoundException: com.android.dx.command.DxConsole
    Error:Android Dex: [AndorsTrail] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    Error:Android Dex: [AndorsTrail] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    Error:Android Dex: [AndorsTrail] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    Error:Android Dex: [AndorsTrail] at org.jetbrains.android.compiler.tools.AndroidDxRunner.loadDex(AndroidDxRunner.java:80)
    Error:Android Dex: [AndorsTrail] at org.jetbrains.android.compiler.tools.AndroidDxRunner.runDex(AndroidDxRunner.java:136)
    Error:Android Dex: [AndorsTrail] at org.jetbrains.android.compiler.tools.AndroidDxRunner.main(AndroidDxRunner.java:336)
    Error:Android Dex: [AndorsTrail] Exception in thread "main" java.lang.NullPointerException
    Error:Android Dex: [AndorsTrail] at org.jetbrains.android.compiler.tools.AndroidDxRunner.runDex(AndroidDxRunner.java:139)
The "missing" dx.jar doesn't appear to be truly missing - I see it at C:\Android\sdk\build-tools\28.0.3\lib\dx.jar - but, unzipping the jar file, I see that there is no such class in it as "com.android.dx.command.DxConsole". There is a com.android.dx.command package, but it only contains Main.class, UsageException.class, and a handful of subpackages.

Any idea what's going on here?
User avatar
rijackson741
Posts: 3597
Joined: Tue Aug 20, 2013 2:04 am
android_version: 10 - Android 10
Location: Somewhere in Dhayavar

Re: Setting up dev environment.

Post by rijackson741 »

I ran into this as well. Found the answer on Stack Exchange. PITA.
Level:69, XP:6038672, PV:555, FQ:77
HP:224, AC:216, AD:47-59, AP:3, ECC:27%, CM:3, BC:174, 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, AP:L:1, FS:DW:2, S:DW:1
Post Reply