Selaa lähdekoodia

Android working

Tom Underhill 4 vuotta sitten
vanhempi
commit
549af89df1

+ 5
- 5
example/android/app/build.gradle Näytä tiedosto

9
  * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
9
  * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10
  * bundle directly from the development server. Below you can see all the possible configurations
10
  * bundle directly from the development server. Below you can see all the possible configurations
11
  * and their defaults. If you decide to add a configuration block, make sure to add it before the
11
  * and their defaults. If you decide to add a configuration block, make sure to add it before the
12
- * `apply from: "../../node_modules/react-native/react.gradle"` line.
12
+ * `apply from: "../../../node_modules/react-native/react.gradle"` line.
13
  *
13
  *
14
  * project.ext.react = [
14
  * project.ext.react = [
15
  *   // the name of the generated asset file containing your JS bundle
15
  *   // the name of the generated asset file containing your JS bundle
44
  *   //         'devDisabledIn${buildType}'
44
  *   //         'devDisabledIn${buildType}'
45
  *
45
  *
46
  *   // the root of your project, i.e. where "package.json" lives
46
  *   // the root of your project, i.e. where "package.json" lives
47
- *   root: "../../",
47
+ *   root: "../../../",
48
  *
48
  *
49
  *   // where to put the JS bundle asset in debug mode
49
  *   // where to put the JS bundle asset in debug mode
50
  *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
50
  *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
80
     enableHermes: false,  // clean and rebuild if changing
80
     enableHermes: false,  // clean and rebuild if changing
81
 ]
81
 ]
82
 
82
 
83
-apply from: "../../node_modules/react-native/react.gradle"
83
+apply from: "../../../node_modules/react-native/react.gradle"
84
 
84
 
85
 /**
85
 /**
86
  * Set this to true to create two separate APKs instead of one:
86
  * Set this to true to create two separate APKs instead of one:
183
     implementation "com.facebook.react:react-native:+"  // From node_modules
183
     implementation "com.facebook.react:react-native:+"  // From node_modules
184
 
184
 
185
     if (enableHermes) {
185
     if (enableHermes) {
186
-        def hermesPath = "../../node_modules/hermes-engine/android/";
186
+        def hermesPath = "../../../node_modules/hermes-engine/android/";
187
         debugImplementation files(hermesPath + "hermes-debug.aar")
187
         debugImplementation files(hermesPath + "hermes-debug.aar")
188
         releaseImplementation files(hermesPath + "hermes-release.aar")
188
         releaseImplementation files(hermesPath + "hermes-release.aar")
189
     } else {
189
     } else {
198
     into 'libs'
198
     into 'libs'
199
 }
199
 }
200
 
200
 
201
-apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
201
+apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

+ 2
- 2
example/android/build.gradle Näytä tiedosto

24
         mavenLocal()
24
         mavenLocal()
25
         maven {
25
         maven {
26
             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
26
             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
27
-            url("$rootDir/../node_modules/react-native/android")
27
+            url("$rootDir/../../node_modules/react-native/android")
28
         }
28
         }
29
         maven {
29
         maven {
30
             // Android JSC is installed from npm
30
             // Android JSC is installed from npm
31
-            url("$rootDir/../node_modules/jsc-android/dist")
31
+            url("$rootDir/../../node_modules/jsc-android/dist")
32
         }
32
         }
33
 
33
 
34
         google()
34
         google()

+ 1
- 1
example/android/settings.gradle Näytä tiedosto

1
 rootProject.name = 'example'
1
 rootProject.name = 'example'
2
-apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
2
+apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3
 include ':app'
3
 include ':app'

+ 0
- 4944
example/yarn.lock
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 10
metro.config.js Näytä tiedosto

1
-/**
2
- * This cli config is needed for development purposes, e.g. for running
3
- * integration tests during local development or on CI services.
4
- */
5
-
6
-module.exports = {
7
-  resolver: {
8
-    platforms: ['win32', 'ios', 'macos', 'android'],
9
-  },
10
-};