• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling OTCv8 for Android

Erikas Kontenis

Board Moderator
Staff member
Board Moderator
Joined
Jul 3, 2009
Messages
1,864
Reaction score
567
Location
Lithuania
I have posted a while ago in a thread little tutorial on how I was struggling to compile otcv8 for android. I saw recently such posts that few people are struggling to compile too. So, I am copy-paste my insights here for easier search and in hope in the tutorial thread the knowledge won't get lost.

For further generations I am leaving some tips on how to compile this because its way more fun to develop game than walk through this dependency hell.

So, firstly download android sdk and make sure you have in android/sdk/platform/android-25 folder downloaded. When downloading through ADGE the SDK and stuff the newest releases does not have apache ant tools so you simply download it from here and paste in Android\Sdk\Tools instead of previously downloaded tools folder. "Cannot find build.xml" error building Android SDK sample (https://stackoverflow.com/questions/43648201/cannot-find-build-xml-error-building-android-sdk-sample)

When you will get error about EXEC : [javac] error : Target option 5 is no longer supported. Use 7 or later. then open Android\Sdk\tools\ant\build.xml file and change version 1.5 to 1.7
<property name="java.target" value="1.7" />
<property name="java.source" value="1.7" />

Lastly, the newest java sdks won't work as well and you will need old java sdk- for me worked this version jdk1.8.0_361. Also the newest apache ant version didn't worked for me too So I used apache-ant-1.9.7.

Also, you will need specific platform-tools version because latest doesn't work. For me Android\Sdk\build-tools\30.0.3 version worked while 33 didn't

GG & HF
 
have in android/sdk/platform/android-25 folder downloaded.
where do i get

When downloading through ADGE the SDK and stuff the newest releases does not have apache ant tools so you simply download it from here and paste in Android\Sdk\Tools instead of previously downloaded tools folder. "Cannot find build.xml" error building Android SDK sample (https://stackoverflow.com/questions/43648201/cannot-find-build-xml-error-building-android-sdk-sample)? <<< Know that this should be pasted in Android\Sdk\Tools
but
where do i get the program to ge this folder? android/sdk/platform/android-25

@Erikas Kontenis i have been struggling with these steps
Lua:
Also install android extension for visual studio In visual studio go to options -> cross platform -> c++ and set Android NDK to C:\android\android-ndk-r21b Right click on otclientv8 -> proporties -> general and change target api level to android-25

Put data.zip in android/otclientv8/assets You can use powershell script create_android_assets.ps1 to create them automaticly (won't be encrypted)
can you help me please?

edit: have installed everything now, can't find sdk folder, just sdkcontroller:
 
Last edited:
I have posted a while ago in a thread little tutorial on how I was struggling to compile otcv8 for android. I saw recently such posts that few people are struggling to compile too. So, I am copy-paste my insights here for easier search and in hope in the tutorial thread the knowledge won't get lost.

For further generations I am leaving some tips on how to compile this because its way more fun to develop game than walk through this dependency hell.

So, firstly download android sdk and make sure you have in android/sdk/platform/android-25 folder downloaded. When downloading through ADGE the SDK and stuff the newest releases does not have apache ant tools so you simply download it from here and paste in Android\Sdk\Tools instead of previously downloaded tools folder. "Cannot find build.xml" error building Android SDK sample (https://stackoverflow.com/questions/43648201/cannot-find-build-xml-error-building-android-sdk-sample)

When you will get error about EXEC : [javac] error : Target option 5 is no longer supported. Use 7 or later. then open Android\Sdk\tools\ant\build.xml file and change version 1.5 to 1.7
<property name="java.target" value="1.7" />
<property name="java.source" value="1.7" />

Lastly, the newest java sdks won't work as well and you will need old java sdk- for me worked this version jdk1.8.0_361. Also the newest apache ant version didn't worked for me too So I used apache-ant-1.9.7.

Also, you will need specific platform-tools version because latest doesn't work. For me Android\Sdk\build-tools\30.0.3 version worked while 33 didn't

GG & HF
IM Facing this issue at the builder of the apk
Lua:
2>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\MDD\Android\V150\Android.Common.targets(462,5): error MSB3073: The command ""C:\Android\apache-ant-1.9.7\bin\ant.bat" debug -Dout.final.file="C:\Users\carlos\OneDrive\Documentos\GitHub\otclientv8\android\otclientv8\ARM\Release\..\..\..\..\otclientv8_armv7a.apk"" exited with code 1.

Code:
Severity    Code    Description    Project    Path    File    Line    Suppression State
Error    MSB3073    The command ""C:\Android\apache-ant-1.9.7\bin\ant.bat" debug -Dout.final.file="C:\Users\felip\OneDrive\Documentos\GitHub\otclientv8\android\otclientv8\ARM\Release\..\..\..\..\otclientv8_armv7a.apk"" exited with code 1.    otclientv8 (otclientv8\otclientv8)    C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\MDD\Android\V150    C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\MDD\Android\V150\Android.Common.targets    462
 
Back
Top