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

Commit fa30ae3

Browse files
committed
Adding RNPM/Android doc
1 parent 5119715 commit fa30ae3

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
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,6 +324,27 @@ After installing the plugin and syncing your Android Studio project with Gradle,
324324
...
325325
}
326326
```
327+
328+
3. If you used RNPM to install/link the CodePush plugin, there are a two additional changes you'll need to make due to the fact thsat RNPM makes some assupmtions about the CodePush plugin that aren't currently true. Otherwise, skip to step #3:
329+
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+
```
327348

328349
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`.
329350

0 commit comments

Comments
 (0)