From 34a06b03b9bf483555109b0ec5576e2f2ebd2f8a Mon Sep 17 00:00:00 2001 From: Don Wilfried Date: Thu, 19 Dec 2024 23:24:36 +0100 Subject: [PATCH] After the compiling success before resolving react-native-reanimated issue --- android/app/build.gradle | 8 ++++++++ android/build.gradle | 4 ++-- babel.config.js | 12 +++++++++--- package.json | 3 ++- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 3b5ba503..7c4bf130 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -82,6 +82,14 @@ project.ext.react = [ apply from: "../../node_modules/react-native/react.gradle" +// Force une version antérieure de work-runtime compatible avec compileSdkVersion 30 +configurations.all { + resolutionStrategy { + force 'androidx.work:work-runtime:2.6.0' + force 'androidx.core:core:1.6.0' + } +} + /** * Set this to true to create two separate APKs instead of one: * - An APK that only works on ARM devices diff --git a/android/build.gradle b/android/build.gradle index 3276902a..ec633a3e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -3,8 +3,8 @@ buildscript { androidXCore = "1.4.0" buildToolsVersion = "30.0.2" minSdkVersion = 21 - compileSdkVersion = 34 - targetSdkVersion = 34 + compileSdkVersion = 30 + targetSdkVersion = 30 kotlinVersion = "1.5.31" ndkVersion = "20.1.5948944" supportLibVersion = "28" diff --git a/babel.config.js b/babel.config.js index 13acc46d..ef08dc5f 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,5 +1,11 @@ module.exports = { - presets: [['module:metro-react-native-babel-preset', { - unstable_disableES6Transforms: true - }]], + presets: [ + [ + 'module:metro-react-native-babel-preset', + { + unstable_disableES6Transforms: true, + }, + ], + ], + plugins: ['react-native-reanimated/plugin'], }; diff --git a/package.json b/package.json index 954d9a94..bcf8899e 100755 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "version": "0.0.1", "private": true, "scripts": { - "start": "node node_modules/react-native/local-cli/cli.js start", + "start": "react-native start", + "android": "react-native run-android", "test": "jest", "postinstall": "node ./fix-android/android-release-fix.js", "release-build": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output ./android/app/src/main/assets/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/release/ && cd ./android && gradlew clean && gradlew app:assembleRelease && cd .. && adb install ./android/app/build/outputs/apk/release/app-release.apk",