Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 48c29cc

Browse files
committed
Merge pull request #250 from Microsoft/docs
Docs
2 parents 5119715 + f04fead commit 48c29cc

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ After installing the plugin and syncing your Android Studio project with Gradle,
282282
...
283283
}
284284
```
285-
285+
286286
### Plugin Configuration (Android - React Native v0.18.0+)
287287

288288
*NOTE: These instructions are specific to apps that are using React Native v0.18.0+. If you are using v0.15.0-v0.17.0, then refer to the previous section.*
@@ -324,8 +324,29 @@ After installing the plugin and syncing your Android Studio project with Gradle,
324324
...
325325
}
326326
```
327+
328+
2. If you used RNPM to install/link the CodePush plugin, there are two additional changes you'll need to make due to the fact that RNPM makes some assumptions about 3rd party modules that we don't currently support. If you're not using RNPM then simply skip to step #3:
327329
328-
2. Ensure that the `android.defaultConfig.versionName` property in your `android/app/build.gradle` file is set to a semver compliant value. Note that if the value provided is missing a patch version, the CodePush server will assume it is `0`, i.e. `1.0` will be treated as `1.0.0`.
330+
```java
331+
...
332+
// 1. Remove the following import statement
333+
import com.microsoft.codepush.react.CodePushReactPackage;
334+
...
335+
public class MainActivity extends ReactActivity {
336+
...
337+
@Override
338+
protected List<ReactPackage> getPackages() {
339+
return Arrays.<ReactPackage>asList(
340+
...
341+
new CodePushReactPackage() // 2. Remove this line
342+
...
343+
);
344+
}
345+
...
346+
}
347+
```
348+
349+
3. Ensure that the `android.defaultConfig.versionName` property in your `android/app/build.gradle` file is set to a semver compliant value. Note that if the value provided is missing a patch version, the CodePush server will assume it is `0`, i.e. `1.0` will be treated as `1.0.0`.
329350
330351
```gradle
331352
android {

0 commit comments

Comments
 (0)