Adding RNPM/Android doc

This commit is contained in:
Jonathan Carter
2016-03-16 10:44:17 -07:00
parent 511971584d
commit fa30ae31ff

View File

@@ -282,7 +282,7 @@ After installing the plugin and syncing your Android Studio project with Gradle,
...
}
```
### Plugin Configuration (Android - React Native v0.18.0+)
*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,
...
}
```
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:
```java
...
// 1. Remove the following import statement
import com.microsoft.codepush.react.CodePushReactPackage;
...
public class MainActivity extends ReactActivity {
...
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
...
new CodePushReactPackage() // 2. Remove this line
...
);
}
...
}
```
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`.