Android IDE (AIDE) Support Forum

😹 [SOLVED] Can't Compile with latest android.jar (┛◉Д◉)┛彡┻━┻

Look like AIDE App can’t built the app with custom android.jar
After I got the latest android.jar. I tried to change the compiling android.jar file in both 2 ways:

  1. open the AIDE app -> Setting -> Build & Run -> SDK ->(type full path. Ex: /storage/emulated/0/android-10/android.jar )
  2. Browsing the file -> Hold the file -> select “Set as android.jar”
    Then publish project as apk. But when I upload to Google Console, it said the API was target at 21.
    However, the Manifest file is wrote:

I tried the “Add library to project” too, and still not worked.
Did anybody successful?

Did you set the compileSdkVersion on gradle file or the android:minSdkVersion="XX" on AndroidManifest?

3 Likes

Thank you so much for suggesting solution.
I didn’t knew build.gradle file before.
Just change the parameters in this file and it worked like a charm. Awesome!!!
Compiling with sdk29 successful.

1 Like

Im here to help you!

1 Like

Would you be so kind to show us you Gradle files. I’m battling with same issue, don’t exactly know what to import in Gradle?
Thanks😋

1 Like

Example code in build.gradle:

apply plugin: 'com.android.application'
android {
    compileSdkVersion 29
    buildToolsVersion "21.1.0"

    defaultConfig {
        applicationId "com.picox.CCorn"
        minSdkVersion 5
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v4:23.0.0'
 
    //compile 'com.android.support:appcompat-v7:21.0.3'
    //compile 'com.android.support:appcompat-v7:28.0.0-alpha1'
    //compile 'com.android.support:support-v7:23.0.0'
    //compile 'com.google.android.gms:play-services-location:10.0.1'
}
2 Likes

If the old version of .jar you can’t build, use the customized version of .jar. This is the version on the phone, maybe it is not strong enough by ide tool on the computer

1 Like

I’m using .jar from this source:
https://dl.google.com/android/repository/platform-29_r03.zip
It worked fine.
(Extract > take android.jar > browse in AIDE > touch and hold the .jar file > select “Set As Android.jar” > Menu > More… > Project… > Refresh Build )

2 Likes