【发布时间】:2020-10-23 14:50:13
【问题描述】:
我试图通过首先使用react-native start 启动服务器然后在我的设备中使用react-native run-android 运行我的反应本机应用程序,但是当它成功构建时它会自动关闭。
当我运行 react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1752 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Installing the app...
> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
> Configure project :react-native-firebase
react-native-firebase: using React Native prebuilt binary from C:\Users\DAWOR\Go-polo-master\node_modules\react-native\android
> Task :app:processDebugGoogleServices
Parsing json file: C:\Users\DAWOR\Go-polo-master\android\app\google-services.json
> Task :app:installDebug
07:10:22 V/ddms: execute: running am get-config
07:10:22 V/ddms: execute 'am get-config' on '4200336f97fc7483' : EOF hit. Read: -1
07:10:22 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'SM-G615F - 8.1.0' for app:debug
07:10:22 D/app-debug.apk: Uploading app-debug.apk onto device '4200336f97fc7483'
07:10:22 D/Device: Uploading file onto device '4200336f97fc7483'
07:10:22 D/ddms: Reading file permision of C:\Users\DAWOR\Go-polo-master\android\app\build\outputs\apk\debug\app-debug.apk as: rwx------
07:10:24 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
07:10:48 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on '4200336f97fc7483' : EOF hit. Read: -1
07:10:48 V/ddms: execute: returning
07:10:48 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
07:10:48 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on '4200336f97fc7483' : EOF hit. Read: -1
07:10:48 V/ddms: execute: returning
Installed on 1 device.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 42s
318 actionable tasks: 3 executed, 315 up-to-date
info Connecting to the development server...
info Starting the app on "4200336f97fc7483"...
Starting: Intent { cmp=com.gopro/.MainActivity }
PS C:\Users\DAWOR\Go-polo-master>
我试图清理缓存,但是当我运行 npm cache clean 和使用 npm cache clean --force 时它会抛出错误,它会显示 npm WARN using --force Recommended protections disabled.
任何人都可以告诉我发生了什么事
【问题讨论】:
标签: android react-native android-studio gradle