Deleted User 832058
Awesome Active Platinian
Kinda annoying that the most special project are made in AIDE. So I thought to teach you to port to Android Studio (i'm still not a teacher ftw)
It's easy:
Android Studio project that has been used on AIDE
- Extract the project to the directory that does not contain spaces
- Delete useless files:
\app\build
\app\src\main\jniLibs
\app\src\main\obj
- Edit \app\src\main\jni\Application.mk and change the line
to
or
- Open the project on Android Studio
If sync and build succeeded, you have successfully ported
Project created via AIDE
I just got a request who wanted to port an AIDE Project to AS, so here you go
If the project was created via AIDE, the project structure will look completely different. What a mess
Let's clean it up
- Delete bin, gen, libs, obj and project.properties
- Rename src to java
- Create \app\src\main\
- Move folders java, jni, res and the file AndroidManifest.xml to \app\src\main\
- Move build.gradle to \app\ folder
Cleaned up project structures
- Edit build.gradle and remove the following code
You may want to remove deprecated dependency
- Change compileSdkVersion and targetSdkVersion to latest version (Version is 30 as of 2021)
- in the dependencies, change compile to implementation
- Add files build.gradle, gradle.properties, gradlew, gradlew.bat, settings.gradle and gradle folder from your other project to the root directory of project. Or simply take them from my Mod Menu template
- Open file \app\src\main\AndroidManifest.xml and remove
Open your project and sync. If build successful, congratz for the port!!!
Is there more to change? tell me :))
It's easy:
Android Studio project that has been used on AIDE
- Extract the project to the directory that does not contain spaces
- Delete useless files:
\app\build
\app\src\main\jniLibs
\app\src\main\obj
- Edit \app\src\main\jni\Application.mk and change the line
Code:
APP_STL := gnustl_static
Code:
APP_STL := c++_static
Code:
APP_STL := c++_shared
- Open the project on Android Studio
If sync and build succeeded, you have successfully ported
Project created via AIDE
I just got a request who wanted to port an AIDE Project to AS, so here you go
If the project was created via AIDE, the project structure will look completely different. What a mess
Let's clean it up
- Delete bin, gen, libs, obj and project.properties
- Rename src to java
- Create \app\src\main\
- Move folders java, jni, res and the file AndroidManifest.xml to \app\src\main\
- Move build.gradle to \app\ folder
Cleaned up project structures
- Edit build.gradle and remove the following code
Code:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.10'
classpath 'com.google.gms:google-services:3.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
Code:
apply plugin: 'com.android.application'
Code:
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
java {
srcDirs = ['src/']
}
resources {
srcDirs = ['res/']
}
}
}
Code:
apply plugin: 'com.google.gms.google-services'
You may want to remove deprecated dependency
Code:
compile 'com.android.support:appcompat-v7:25.+'
- Change compileSdkVersion and targetSdkVersion to latest version (Version is 30 as of 2021)
- in the dependencies, change compile to implementation
- Add files build.gradle, gradle.properties, gradlew, gradlew.bat, settings.gradle and gradle folder from your other project to the root directory of project. Or simply take them from my Mod Menu template
- Open file \app\src\main\AndroidManifest.xml and remove
Code:
<uses-sdk android:minSdkVersion="xx" />
Open your project and sync. If build successful, congratz for the port!!!
Is there more to change? tell me :))
Last edited: