I want to install Drawer Navigator https://reactnavigation.org/docs/drawer-navigator version 6.x first install
yarn add @react-navigation/drawer
yarn add react-native-gesture-handler react-native-reanimated
babel.config.js
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin',],
};
then run
react-native run-android
errors: Configure project :react-native-reanimated No AAR for react-native-reanimated found. Attempting to build from source. I clone my project multiple time and test different similar solution. but ...
first solution: .\gradlew build --warning-mode all
second solution: cd android && ./gradlew clean && ./gradlew :app:bundleRelease
./gradlew -v
------------------------------------------------------------
Gradle 7.5.1
------------------------------------------------------------
Build time: 2022-08-05 21:17:56 UTC
Revision: d1daa0cbf1a0103000b71484e1dbfe096e095918
Kotlin: 1.6.21
Groovy: 3.0.10
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 11.0.2 (Oracle Corporation 11.0.2+9-LTS)
OS: Windows 10 10.0 amd64
run command --warning - mode all
Finally, I can run project.
Build successful but show no AAR for react native-reanimated
First, install the package according to the version mentioned in the issue. https://github.com/react-navigation/react-navigation/issues/11391
"dependencies": {
"@react-native-masked-view/masked-view": "^0.2.9",
"@react-navigation/drawer": "6.6.2",
"@react-navigation/native": "6.1.6",
"@react-navigation/native-stack": "6.9.7",
"@react-navigation/stack": "6.3.16",
"react": "18.2.0",
"react-native": "0.71.8",
"react-native-gesture-handler": "2.10.1",
"react-native-reanimated": "3.2.0",
"react-native-safe-area-context": "4.5.3",
"react-native-screens": "3.20.0"
},
After that, according the React native android build is failing after configured kotlin-gradle-plugin, kotlin-android and kotlin-android-extensions
resolved the issue by adding kotlin version.
build.gradle file changes
buildscript {
ext {
kotlin_version = '1.8.20'
...
}
dependencies {
...
classpath ("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
}
but sill no aar
node_modules->react-native-reanimated->android
there is no react-native-reanimate.aar