Android 生成时出错:没有源映射引用+;移除哨兵科尔多瓦,退出代码为1

Android 生成时出错:没有源映射引用+;移除哨兵科尔多瓦,退出代码为1,android,cordova,build,sentry,source-maps,Android,Cordova,Build,Sentry,Source Maps,我正在尝试为android构建我的ionic应用程序,大多数用户在splashscreen之后都有一个白色屏幕。我在过去的一周里一直试图确定它可能会出现在哪里,但我不知道。。。因此,我试图消除我在构建时的所有错误。(它仍然成功地建立了错误和工作在几乎一半的手机) 第一个在这里: Building for Android... [ERROR] An error occurred while running subprocess cordova. cordova.cmd plugi

我正在尝试为android构建我的ionic应用程序,大多数用户在splashscreen之后都有一个白色屏幕。我在过去的一周里一直试图确定它可能会出现在哪里,但我不知道。。。因此,我试图消除我在构建时的所有错误。(它仍然成功地建立了错误和工作在几乎一半的手机)

第一个在这里:

Building for Android...
[ERROR] An error occurred while running subprocess cordova.

        cordova.cmd plugin remove sentry-cordova exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
> cordova.cmd plugin remove sentry-cordova Sentry: running before_plugin_rm - set SENTRY_SKIP_WIZARD=true to skip this angular.json build.json build_android.sh build-extras.gradle CertificateSigningRequest.certSigningRequest
...
 tslint.json www Uninstalling sentry-cordova from android Subproject Path: CordovaLib Subproject Path: app Uninstalling sentry-cordova from browser js-module uninstall called : plugins\sentry-cordova\dist\js\sentry-cordova.bundle.js Uninstalling sentry-cordova from ios Removing "sentry-cordova" Removing sentry-cordova from package.json doc.find is not a function
第二个是后面,有很多这样的线:

- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/1-es5.1922
我很确定我错过了一些信息。如果有必要的话,请不要犹豫,但我肯定我忘了做点什么,但我现在有点绝望

编辑:以下是我用于构建的脚本的开头:

echo "Building for Android..."
#npm run android:build:prod
sentryRemove=$(ionic cordova plugin remove sentry-cordova)
echo $sentryRemove

sentryAdd=$(cordova plugin add sentry-cordova)

echo $sentryAdd

echo "successfully  added the sentry. \n Performing build now."

appBuildOut=$(ionic cordova build android --prod --release --source-map)

echo $appBuildOut

BUILD_MESSAGE='BUILD SUCCESSFUL'

感谢您的帮助

如果我理解正确,第一个问题是为什么在构建应用程序时运行插件删除命令。我将检查调用此命令的内容,因为只有在删除插件时才应调用在插件前出错的脚本


要使此脚本正常工作,请尝试运行环境变量
SENTRY\u SKIP\u WIZARD=true
,然后查看构建是否有效。我认为白色屏幕的原因与Sentry无关,因为失败的步骤似乎与源地图上传有关。

谢谢您的回答。我已经添加了用于构建的脚本。很奇怪,删除后又重新添加,但我不知道他们为什么这样写。事实上,我是一名初级开发人员,我恢复了一位前开发人员的工作,他退出了该项目,没有回应。嗯,构建工作正常,只是之后的应用程序工作不太好。你能解释一下把这个环境变量放在哪里吗?所以有可能是源地图上传失败导致了白色屏幕?谢谢again@RobinRousset导出SENTRY_SKIP_WIZARD=true&&cordova build(或在&&&之后运行的任何命令)