Skip to content

Commit

Permalink
fix: Android build - set java version compatible with Expo 51 (#143)
Browse files Browse the repository at this point in the history
This PR fixes the build for Android devices using Expo 51.

Expo 51 uses React Native 0.74 which uses Java 17 ([see
here](https://reactnative.dev/docs/set-up-your-environment?platform=android)):
`If you have already installed JDK on your system, we recommend JDK 17.
You may encounter problems using higher JDK versions.`

The previous version used was Java 18 which created a conflict between
the two versions: `Inconsistent JVM-target compatibility detected for
tasks 'compileDebugJavaWithJavac' (17) and 'compileDebugKotlin' (18).`

Finally, this PR also removes the native folders and adds them in the
.gitignore files because they are automatically created `npx expo
run:ios` (or android), following the recommendations of `npx
expo-doctor@latest`.

Signed-off-by: D4ryl00 <[email protected]>
  • Loading branch information
D4ryl00 authored May 21, 2024
1 parent bf9bfff commit a519acd
Show file tree
Hide file tree
Showing 72 changed files with 458 additions and 3,596 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
nodejs 21.7.3
ruby 3.2.2
cocoapods 1.15.2
java openjdk-18.0.1.1
java openjdk-17.0.2
yarn 1.22.19
golang 1.21.7
buf 1.30.1
4 changes: 4 additions & 0 deletions expo/example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ yarn-error.*

# typescript
*.tsbuildinfo

# native folders
android/
ios/
16 changes: 0 additions & 16 deletions expo/example/android/.gitignore

This file was deleted.

172 changes: 0 additions & 172 deletions expo/example/android/app/build.gradle

This file was deleted.

Binary file removed expo/example/android/app/debug.keystore
Binary file not shown.
14 changes: 0 additions & 14 deletions expo/example/android/app/proguard-rules.pro

This file was deleted.

7 changes: 0 additions & 7 deletions expo/example/android/app/src/debug/AndroidManifest.xml

This file was deleted.

32 changes: 0 additions & 32 deletions expo/example/android/app/src/main/AndroidManifest.xml

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit a519acd

Please sign in to comment.