Android IDE Complete Guide SDK 35

AndroidIDE: A Complete Guide to Compiling with SDK 35 - Yamim Dev

AndroidIDE: A Complete Guide to Compiling with SDK 35

This guide will walk you through the process of compiling an APK in AndroidIDE using SDK version 35 (35.0.0). Follow each step carefully to ensure a successful build.


Prerequisites

  • AndroidIDE installed on your Android device.
  • An active internet connection to download the necessary files.

Steps

1. Download and Extract SDK Files

Download the SDK Package:

Download the Android SDK for aarch64 from the following link:

https://github.com/lzhiyong/termux-ndk/releases/download/android-sdk/android-sdk-aarch64.zip

Create a Directory:

Create a folder named android-sdk-aarch64 in your device's Download directory.

Move and Unzip the File:

  • Move the downloaded ZIP file into the newly created android-sdk-aarch64 folder.
  • Unzip the file inside this folder using a file manager.

2. Copy Build Tools (Version 35.0.0)

Open the AndroidIDE Terminal and run the following command to copy the build tools to the correct location:

cp -r /storage/emulated/0/Download/android-sdk-aarch64/android-sdk/build-tools/35.0.0 /data/data/com.itsaky.androidide/files/home/android-sdk/build-tools/

3. Copy Platform (Android 35)

In the same terminal, execute the following command to copy the platform files:

cp -r /storage/emulated/0/Download/android-sdk-aarch64/android-sdk/platforms/android-35 /data/data/com.itsaky.androidide/files/home/android-sdk/platforms/

4. Update the `aapt2` Tool

Backup Existing `aapt2` (from SDK 34):

mkdir -p /data/data/com.itsaky.androidide/files/home/.androidide/34.0.4/
mv /data/data/com.itsaky.androidide/files/home/.androidide/aapt2 /data/data/com.itsaky.androidide/files/home/.androidide/34.0.4/

Set Up New `aapt2` for SDK 35:

mkdir -p /data/data/com.itsaky.androidide/files/home/.androidide/35.0.0/
cp /storage/emulated/0/Download/android-sdk-aarch64/android-sdk/build-tools/35.0.0/aapt2 /data/data/com.itsaky.androidide/files/home/.androidide/35.0.0/
chmod +x /data/data/com.itsaky.androidide/files/home/.androidide/35.0.0/aapt2

Replace the IDE's `aapt2` with the New Version:

cp -f /data/data/com.itsaky.androidide/files/home/.androidide/35.0.0/aapt2 /data/data/com.itsaky.androidide/files/home/.androidide/

5. Update Gradle Configuration

Edit `gradle.properties`:

Add the following line to your project's `gradle.properties` file to suppress the unsupported compile SDK warning:

android.suppressUnsupportedCompileSdk=35

Edit `app/build.gradle`:

android {
    compileSdk 35
    ...

    defaultConfig {
        targetSdk 35
        ...
    }
    ...
}

Troubleshooting Common Errors

1. License Agreement Issues

If your build fails due to license issues, you need to accept them via the terminal.

cd /data/data/com.itsaky.androidide/files/home/android-sdk/cmdline-tools/latest/bin
./sdkmanager --licenses

Follow the prompts and type 'y' to accept all licenses.

2. Gradle Version Compatibility

If you see a resource linking error related to android.jar, you may need to update your Gradle version.

Update Gradle to Version 8.4

  • Close your current project in AndroidIDE.
  • Open the AndroidIDE Terminal.
  • Download and Unzip Gradle 8.4:
    wget https://services.gradle.org/distributions/gradle-8.4-bin.zip
    unzip gradle-8.4-bin.zip
    rm -rf gradle-8.4-bin.zip
  • Get the full path to the new Gradle installation:
    cd gradle-8.4
    pwd

    Copy the full path that is displayed.

  • Configure AndroidIDE to Use the New Version:
    • Go to AndroidIDE Settings > Build Tools > Custom Gradle Installation.
    • Paste the copied path into the input field.

Download AndroidIDE

If you need the specific versions of the IDE these instructions were tested with, you can download them below.

Post a Comment