Live Note

Remain optimistic

React-native 环境

安装 iOS 依赖

1
2
pod install --verbose --no-repo-update
cocopads 最好和项目中的版本一致

打包安卓 release 版本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
cd android
# build google release
./gradlew assembleGoogleRelease
# pwd build file
app/build/outputs/apk/google/release/

# build google aab
./gradlew bundleGoogleRelease
# pwb google aab
app/build/outputs/bundle/googleRelease/

# run
cd ..
npx react-native run-android --variant=release

android gradle 版本设置

1
android studio -> 右上角setting -> project structure -> project -> Gradle Version 选择项目中对应版本

SDK 版本设置

1
2
setting -> build tools -> gradle -> gradle project -> gradle JDK
使用项目对应的版本

gradle 更新依赖

1
2
file -> sync project with gradle files
需要连接国际互联网