Sfoglia il codice sorgente

Update installation-android.md (#2032)

bogobogo 7 anni fa
parent
commit
46067cbc48
1 ha cambiato i file con 13 aggiunte e 15 eliminazioni
  1. 13
    15
      docs/docs/installation-android.md

+ 13
- 15
docs/docs/installation-android.md Vedi File

@@ -3,7 +3,7 @@
3 3
 1. Install `react-native-navigation` latest stable version.
4 4
 
5 5
 	```sh
6
-	yarn add react-native-navigation@latest
6
+	yarn add react-native-navigation@alpha
7 7
 	```
8 8
 
9 9
 2. Add the following in `android/settings.gradle`.
@@ -48,21 +48,19 @@
48 48
 	import com.reactnativenavigation.NavigationApplication;
49 49
 
50 50
 	public class MainApplication extends NavigationApplication {
51
+     @Override
52
+	public boolean isDebug() {
53
+		return BuildConfig.DEBUG;
54
+	}
51 55
 
52
-		@Override
53
-		public boolean isDebug() {
54
-			// Make sure you are using BuildConfig from your own application
55
-			return BuildConfig.DEBUG;
56
-		}
57
-
58
-		protected List<ReactPackage> getPackages() {
59
-			// Add additional packages you require here
60
-			// No need to add RnnPackage and MainReactPackage
61
-			return Arrays.<ReactPackage>asList(
62
-				// eg. new VectorIconsPackage()
63
-			);
64
-		}
56
+	@Nullable
57
+	@Override
58
+	public List<ReactPackage> createAdditionalReactPackages() {
59
+		return Arrays.<ReactPackage>asList(
60
+			// eg. new VectorIconsPackage()
61
+		);
65 62
 	}
63
+ 	}
66 64
 	```
67 65
 
68 66
 	Make sure that `isDebug` methods is implemented.
@@ -73,4 +71,4 @@
73 71
 		android:name=".MainApplication"
74 72
 		...
75 73
 	/>
76
-	```
74
+	```