Tutorial Port AIDE Project to Android Studio

TheLGL

Awesome Active Platinian
Original poster
Skilled
Feb 19, 2020
156
4,279
193
UK
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
Code:
APP_STL := gnustl_static
to
Code:
APP_STL := c++_static
or
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

1617008379347.png


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

Image 1617011242.png


Image 1617008986.png


Image 1617008971.png


- 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

Image 1617009446.png


Image 1617009456.png


- 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

1617011351693.png


- 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:

_SecureVPN

Rookie
Mar 8, 2023
1
0
1
42
Brazil
please, please, please can someone or platinmods teach how to port an Android Studio project to the aide , and port an Android Studio project to the Android IDE? please