Skip to content

Commit 485f7a7

Browse files
committed
📃 docs: update Expo instructions
1 parent beb78ab commit 485f7a7

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

README.md

+5-10
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ If your project is based on [Expo](https://expo.dev/), you should create a **dev
6060

6161
> Any library that is compatible with React Native is compatible with the Expo project when you create a **development build**. However, it may not be compatible with the [Expo Go](https://expo.dev/go) app
6262
63+
There is an example project for Android only, available at Expo: <https://github.com/ccnnde/rnovpn-expo-example>
64+
6365
### Android
6466

6567
Add the following to `android/settings.gradle` :
@@ -87,18 +89,11 @@ android {
8789
}
8890
```
8991

90-
But if your project is based on [Expo](https://expo.dev/) and RN >= 0.74, please use the following modifications instead
92+
But if your project is based on [Expo](https://expo.dev/) and RN >= 0.74, please use the following modifications to the `android/gradle.properties` file instead
9193

9294
```diff
93-
android {
94-
// ...
95-
packagingOptions {
96-
jniLibs {
97-
- useLegacyPackaging (findProperty('expo.useLegacyPackaging')?.toBoolean() ?: false)
98-
+ useLegacyPackaging true
99-
}
100-
}
101-
}
95+
-expo.useLegacyPackaging=false
96+
+expo.useLegacyPackaging=true
10297
```
10398

10499
#### Import jniLibs

README.zh-CN.md

+5-10
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ react-native link react-native-simple-openvpn
6060

6161
> Any library that is compatible with React Native is compatible with the Expo project when you create a **development build**. However, it may not be compatible with the [Expo Go](https://expo.dev/go) app
6262
63+
Android 示例请参考该仓库: <https://github.com/ccnnde/rnovpn-expo-example>
64+
6365
### Android
6466

6567
在项目的 `android/settings.gradle` 中添加以下代码:
@@ -87,18 +89,11 @@ android {
8789
}
8890
```
8991

90-
但是如果你的项目基于 [Expo](https://expo.dev/) 且 RN 版本大于等于 0.74,请使用以下修改
92+
但是如果你的项目基于 [Expo](https://expo.dev/) 且 RN 版本大于等于 0.74,请按以下内容修改 `android/gradle.properties` 文件
9193

9294
```diff
93-
android {
94-
// ...
95-
packagingOptions {
96-
jniLibs {
97-
- useLegacyPackaging (findProperty('expo.useLegacyPackaging')?.toBoolean() ?: false)
98-
+ useLegacyPackaging true
99-
}
100-
}
101-
}
95+
-expo.useLegacyPackaging=false
96+
+expo.useLegacyPackaging=true
10297
```
10398

10499
#### 导入 jniLibs

0 commit comments

Comments
 (0)