我创建了一个新项目,并立即使用expo:eject
将其转换为托管项目。不幸的是,当我运行npx react-native run-android --variant release
时,会引发此错误。模拟器已打开,并且已安装apk,但无法正常启动。
11:14:44 V/ddms: execute 'am get-config' on '59dfc475' : EOF hit. Read: -1
11:14:44 V/ddms: execute: returning
Installing APK 'app-release.apk' on 'MI PAD 4 - 8.1.0' for app:release
11:14:44 D/app-release.apk: Uploading app-release.apk onto device '59dfc475'
11:14:44 D/Device: Uploading file onto device '59dfc475'
11:14:44 D/ddms: Reading file permision of /Users/mjabadilla/dev/github/mjmaix/app-skeleton/AppSkeleton/android/app/build/outputs/apk/release/app-release.apk as: rw-r--r--
11:14:45 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-release.apk"
11:14:49 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-release.apk"' on '59dfc475' : EOF hit. Read: -1
11:14:49 V/ddms: execute: returning
11:14:49 V/ddms: execute: running rm "/data/local/tmp/app-release.apk"
11:14:49 V/ddms: execute 'rm "/data/local/tmp/app-release.apk"' on '59dfc475' : EOF hit. Read: -1
11:14:49 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.0.1/userguide/command_line_interface.html#sec:command_line_warnings
答案 0 :(得分:0)
显然,弹出的项目(v37)中包含expo-updates
模块,因此必须在发布版本之前执行expo publish
。
如果您想了解更多信息,可以阅读Release builds with expo-updates的官方文件