Skip to content

Commit

Permalink
修复项目启动异常错误问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ltsunyue committed Jun 11, 2020
1 parent 60444c1 commit 306183a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 20 deletions.
11 changes: 0 additions & 11 deletions android/app/src/main/java/com/github_rn/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,6 @@ protected String getJSBundleFile() {
return CodePush.getJSBundleFile();
}

@Override
protected List<ReactPackage> getPackages() {
// 3. Instantiate an instance of the CodePush runtime and add it to the list of
// existing packages, specifying the right deployment key. If you don't already
// have it, you can run "code-push deployment ls <appName> -k" to retrieve your key.
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new CodePush("deployment-key-here", MainApplication.this, BuildConfig.DEBUG)
);
}

@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<resources>
<string name="app_name">宝贝</string>
<string moduleConfig="true" name="CodePushDeploymentKey">5cf5f78dff74ebc7140f6dd4d9d677a5a5d3f832</string>
</resources>
2 changes: 2 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
MYAPP_RELEASE_STORE_PASSWORD=123456
MYAPP_RELEASE_KEY_PASSWORD=123456
android.useAndroidX=true
android.enableJetifier=true
13 changes: 4 additions & 9 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
rootProject.name = 'Github_RN'
include ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
include ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android')
include ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android')
include ':react-native-code-push'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app',':react-native-splash-screen'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android')
include ':react-native-splash-screen'
project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
include ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')

0 comments on commit 306183a

Please sign in to comment.