命令“Cordova build android”生成一个名为 app-debug.apk 的 apk 文件,我可以将其安装在我的设备上(Samsung A3 with Android v8.0)
命令“Cordova build android --release”会生成一个名为 app-release-unsigned.apk 的 apk 文件,该文件不会安装在同一设备上(“未安装应用程序”)。
我还必须补充一点,我不是要在 Playstore 上发布该 apk。我也尝试签署 APK,但它不会改变结果。
这两个文件之间的本质区别应该是什么?导致发布版本失败的原因可能是什么?
这是位于 Cordova 项目文件夹中的 config.xml 的内容:
<?xml version='1.0' encoding='utf-8'?>
<widget id="eu.jrc.treechecker" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>TreeChecker</name>
<description>
A mobile application
</description>
<author email="*******" href="********">
Team
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<icon src="www/img/ic_canhemon.png" />
<platform name="android">
<allow-intent href="market:*" />
<preference name="android-minSdkVersion" value="24" />
<preference name="android-targetSdkVersion" value="28" />
</platform>
<plugin name="cordova-plugin-camera" spec="^4.0.3" /> …Run Code Online (Sandbox Code Playgroud)