└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # AndroidIDE-SDK-35 2 | 3 | # How to Compile an APK in AndroidIDE Using SDK 35 (35.0.0) 4 | 5 | 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. 6 | 7 | --- 8 | 9 | ## Prerequisites 10 | 11 | - **AndroidIDE** installed on your Android device. 12 | - **Internet connection** to download necessary files. 13 | 14 | --- 15 | 16 | ## Steps 17 | 18 | ### **1. Download and Extract the SDK Files** 19 | 20 | - **Download the SDK Package**: 21 | 22 | Download the Android SDK for aarch64 from the following link: 23 | 24 | ``` 25 | https://github.com/lzhiyong/termux-ndk/releases/download/android-sdk/android-sdk-aarch64.zip 26 | ``` 27 | 28 | - **Create a Directory**: 29 | 30 | Create a folder named `android-sdk-aarch64` in your `Download` directory. 31 | 32 | - **Move and Unzip the File**: 33 | 34 | - Move the downloaded ZIP file into the `android-sdk-aarch64` folder. 35 | - Unzip the file inside this folder. 36 | 37 | ### **2. Copy Build Tools Version 35.0.0** 38 | 39 | - **Open the AndroidIDE Terminal**. 40 | 41 | - **Run the Following Command**: 42 | 43 | ```bash 44 | 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/ 45 | ``` 46 | 47 | ### **3. Copy Platform Android-35** 48 | 49 | - **In the AndroidIDE Terminal**, execute: 50 | 51 | ```bash 52 | cp -r /storage/emulated/0/Download/android-sdk-aarch64/android-sdk/platforms/android-35 /data/data/com.itsaky.androidide/files/home/android-sdk/platforms/ 53 | ``` 54 | 55 | ### **4. Update the `aapt2` Tool and Organize Folders** 56 | 57 | - **Backup Existing `aapt2` (SDK 34)**: 58 | 59 | ```bash 60 | mkdir -p /data/data/com.itsaky.androidide/files/home/.androidide/34.0.4/ 61 | mv /data/data/com.itsaky.androidide/files/home/.androidide/aapt2 /data/data/com.itsaky.androidide/files/home/.androidide/34.0.4/ 62 | ``` 63 | 64 | - **Set Up `aapt2` for SDK 35**: 65 | 66 | ```bash 67 | mkdir -p /data/data/com.itsaky.androidide/files/home/.androidide/35.0.0/ 68 | 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/ 69 | chmod +x /data/data/com.itsaky.androidide/files/home/.androidide/35.0.0/aapt2 70 | ``` 71 | 72 | - **Replace the Existing `aapt2` with the New Version**: 73 | 74 | ```bash 75 | cp -f /data/data/com.itsaky.androidide/files/home/.androidide/35.0.0/aapt2 /data/data/com.itsaky.androidide/files/home/.androidide/ 76 | ``` 77 | 78 | ### **5. Update Gradle Configuration** 79 | 80 | - **Edit `gradle.properties`**: 81 | 82 | Add the following line to suppress the unsupported compile SDK warning: 83 | 84 | ``` 85 | android.suppressUnsupportedCompileSdk=35 86 | ``` 87 | 88 | - **Edit `app/build.gradle`**: 89 | 90 | Change the `compileSdk` and `targetSdk` versions to `35`: 91 | 92 | ```gradle 93 | android { 94 | compileSdk 35 95 | ... 96 | 97 | defaultConfig { 98 | targetSdk 35 99 | ... 100 | } 101 | ... 102 | } 103 | ``` 104 | 105 | --- 106 | 107 | ## Switching Between SDK Versions 108 | 109 | If you need to switch back to SDK 34, replace the `aapt2` file with the backed-up version. 110 | 111 | - **Run in AndroidIDE Terminal**: 112 | 113 | ```bash 114 | cp -f /data/data/com.itsaky.androidide/files/home/.androidide/34.0.4/aapt2 /data/data/com.itsaky.androidide/files/home/.androidide/ 115 | ``` 116 | 117 | --- 118 | 119 | ## Troubleshooting Common Errors 120 | 121 | ### **1. License Agreement Issues** 122 | 123 | If compilation with SDK 35 fails, you might need to accept the SDK licenses. 124 | 125 | - **Update Licenses**: 126 | 127 | ```bash 128 | cd /data/data/com.itsaky.androidide/files/home/android-sdk/cmdline-tools/latest/bin 129 | ./sdkmanager --licenses 130 | ``` 131 | 132 | Follow the prompts to accept all licenses. 133 | 134 | ### **2. Gradle Version Compatibility** 135 | 136 | If you encounter the following error: 137 | 138 | ``` 139 | > Android resource linking failed 140 | error: failed to load include path /data/data/com.itsaky.androidide/files/home/android-sdk/platforms/android-35/android.jar. 141 | ``` 142 | 143 | You need to update to a higher version of Gradle. 144 | 145 | #### **Update Gradle to Version 8.4** 146 | 147 | - **Close the Current Project** in AndroidIDE. 148 | 149 | - **Open the AndroidIDE Terminal**. 150 | 151 | - **Download and Unzip Gradle 8.4**: 152 | 153 | ```bash 154 | wget https://services.gradle.org/distributions/gradle-8.4-bin.zip 155 | unzip gradle-8.4-bin.zip 156 | rm -rf gradle-8.4-bin.zip 157 | ``` 158 | 159 | - **Obtain the Full Path to Gradle**: 160 | 161 | ```bash 162 | cd gradle-8.4 163 | pwd 164 | ``` 165 | 166 | Note down the full path displayed (e.g., `/data/data/com.itsaky.androidide/files/home/gradle-8.4`). 167 | 168 | - **Configure AndroidIDE to Use the New Gradle Version**: 169 | 170 | - Open **AndroidIDE Settings**. 171 | - Navigate to **Build Tools > Custom Gradle Installation**. 172 | - Paste the copied path into the input field. 173 | 174 | --- 175 | 176 | **Note**: After completing these steps, you should be able to compile your APK using SDK 35 successfully. 177 | 178 | --- 179 | 180 | If you have any questions or encounter issues, feel free to ask for assistance. 181 | --------------------------------------------------------------------------------