Skip to content

Commit 855f1ba

Browse files
Copilot0xrinegade
andcommitted
Fix Android build compatibility by upgrading to API 35 and Java 21
- Updated android/variables.gradle: compileSdkVersion and targetSdkVersion 34 → 35 - Updated .github/workflows/build-android.yml: api-level and build-tools 34 → 35 - Capacitor automatically updated Java compatibility to VERSION_21 in capacitor.build.gradle This resolves the "VANILLA_ICE_CREAM constant not found" error by using Android API 35 which includes the Build.VERSION_CODES.VANILLA_ICE_CREAM constant required by Capacitor Android 7.4.2. Co-authored-by: 0xrinegade <[email protected]>
1 parent 944a091 commit 855f1ba

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/build-android.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ jobs:
8686
- name: Setup Android SDK
8787
uses: android-actions/setup-android@v3
8888
with:
89-
api-level: 34
90-
build-tools: 34.0.0
89+
api-level: 35
90+
build-tools: 35.0.0
9191

9292
- name: Cache Gradle packages
9393
uses: actions/cache@v4

android/app/capacitor.build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
android {
44
compileOptions {
5-
sourceCompatibility JavaVersion.VERSION_17
6-
targetCompatibility JavaVersion.VERSION_17
5+
sourceCompatibility JavaVersion.VERSION_21
6+
targetCompatibility JavaVersion.VERSION_21
77
}
88
}
99

android/variables.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ext {
22
minSdkVersion = 22
3-
compileSdkVersion = 34
4-
targetSdkVersion = 34
3+
compileSdkVersion = 35
4+
targetSdkVersion = 35
55
androidxActivityVersion = '1.8.0'
66
androidxAppCompatVersion = '1.6.1'
77
androidxCoordinatorLayoutVersion = '1.2.0'

0 commit comments

Comments
 (0)