PS C:\wwwroot\react-native\react_natigation_demo> react-native run-android
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...

FAILURE: Build failed with an exception.

* Where:
Settings file 'C:\wwwroot\react-native\react_natigation_demo\android\settings.gradle' line: 3

* What went wrong:
Could not compile settings file 'C:\wwwroot\react-native\react_natigation_demo\android\settings.gradle'.
> startup failed:
  settings file 'C:\wwwroot\react-native\react_natigation_demo\android\settings.gradle': 3: unexpected char: '\' @ line 3, column 133.
     s\react-native-gesture-handler\android')
                                   ^

  1 error


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

Command failed: gradlew.bat installDebug

Error: Command failed: gradlew.bat installDebug
    at checkExecSyncError (child_process.js:600:11)
    at Object.execFileSync (child_process.js:618:13)
    at runOnAllDevices (C:\wwwroot\react-native\react_natigation_demo\node_modules\react-native\local-cli\runAndroid\runAndroid.js:299:19)
    at buildAndRun (C:\wwwroot\react-native\react_natigation_demo\node_modules\react-native\local-cli\runAndroid\runAndroid.js:135:12)
    at isPackagerRunning.then.result (C:\wwwroot\react-native\react_natigation_demo\node_modules\react-native\local-cli\runAndroid\runAndroid.js:65:12)
    at process._tickCallback (internal/process/next_tick.js:68:7)

PS C:\wwwroot\react-native\react_natigation_demo> react-native upgrade
You should consider using the new upgrade tool based on Git. It makes upgrades easier by resolving most conflicts automatically.
To use it:
- Go back to the old version of React Native
- Run "npm install -g react-native-git-upgrade"
- Run "react-native-git-upgrade"
See https://facebook.github.io/react-native/docs/upgrading.html
Upgrading project to react-native v0.58.6
Check out the release notes and breaking changes: https://github.com/facebook/react-native/releases/tag/v0.58.0
android\app\build.gradle has changed in the new version.
Do you want to keep your android\app\build.gradle or replace it with the latest version?
If you ever made any changes to this file, you'll probably want to keep it.
You can see the new version here: C:\wwwroot\react-native\react_natigation_demo\node_modules\react-native\local-cli\templates\HelloWorld\android\app\build.gradle
Do you want to replace android\app\build.gradle? Answer y to replace, n to keep your version:
y
Replacing android\app\build.gradle
android\app\src\main\java\com\react_natigation_demo\MainApplication.java has changed in the new version.
Do you want to keep your android\app\src\main\java\com\react_natigation_demo\MainApplication.java or replace it with the latest version?
If you ever made any changes to this file, you'll probably want to keep it.
You can see the new version here: C:\wwwroot\react-native\react_natigation_demo\node_modules\react-native\local-cli\templates\HelloWorld\android\app\src\main\java\com\helloworld\MainApplication.java
Do you want to replace android\app\src\main\java\com\react_natigation_demo\MainApplication.java? Answer y to replace, n to keep your version:
y
Replacing android\app\src\main\java\com\react_natigation_demo\MainApplication.java
android\settings.gradle has changed in the new version.
Do you want to keep your android\settings.gradle or replace it with the latest version?
If you ever made any changes to this file, you'll probably want to keep it.
You can see the new version here: C:\wwwroot\react-native\react_natigation_demo\node_modules\react-native\local-cli\templates\HelloWorld\android\settings.gradle
Do you want to replace android\settings.gradle? Answer y to replace, n to keep your version:
y
Replacing android\settings.gradle
ios\react_natigation_demo.xcodeproj\project.pbxproj has changed in the new version.
Do you want to keep your ios\react_natigation_demo.xcodeproj\project.pbxproj or replace it with the latest version?
If you ever made any changes to this file, you'll probably want to keep it.
You can see the new version here: C:\wwwroot\react-native\react_natigation_demo\node_modules\react-native\local-cli\templates\HelloWorld\ios\HelloWorld.xcodeproj\project.pbxproj
Do you want to replace ios\react_natigation_demo.xcodeproj\project.pbxproj? Answer y to replace, n to keep your version:
y
Replacing ios\react_natigation_demo.xcodeproj\project.pbxproj
Successfully upgraded this project to react-native v0.58.6
PS C:\wwwroot\react-native\react_natigation_demo> react-native run-android
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug)...

> Configure project :app
WARNING: The specified Android SDK Build Tools version (28.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Task :app:installDebug
10:18:46 V/ddms: execute: running am get-config
10:18:46 V/ddms: execute 'am get-config' on 'TA39200H1V' : EOF hit. Read: -1
10:18:46 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'XT1572 - 7.0' for app:debug
10:18:46 D/app-debug.apk: Uploading app-debug.apk onto device 'TA39200H1V'
10:18:46 D/Device: Uploading file onto device 'TA39200H1V'
10:18:46 D/ddms: Reading file permision of C:\wwwroot\react-native\react_natigation_demo\android\app\build\outputs\apk\debug\app-debug.apk as: rwx------
10:18:48 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
10:18:51 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'TA39200H1V' : EOF hit. Read: -1
10:18:51 V/ddms: execute: returning
10:18:51 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
10:18:51 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on 'TA39200H1V' : EOF hit. Read: -1
10:18:51 V/ddms: execute: returning
Installed on 1 device.

BUILD SUCCESSFUL in 46s
28 actionable tasks: 28 executed
Running C:\Users\imfon\AppData\Local\Android\Sdk/platform-tools/adb -s TA39200H1V reverse tcp:8081 tcp:8081
adb server version (32) doesn't match this client (40); killing...
* daemon started successfully
Starting the app on TA39200H1V (C:\Users\imfon\AppData\Local\Android\Sdk/platform-tools/adb -s TA39200H1V shell am start -n com.react_natigation_demo/com.react_natigation_demo.MainActivity)...
Starting: Intent { cmp=com.react_natigation_demo/.MainActivity }

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注