Android Cordova自适应图标导致构建失败:即;路径“;参数的类型必须为字符串
尝试在Cordova应用程序中使用自适应图标(如文档中所述),但当我尝试运行Android Cordova自适应图标导致构建失败:即;路径“;参数的类型必须为字符串,android,cordova,Android,Cordova,尝试在Cordova应用程序中使用自适应图标(如文档中所述),但当我尝试运行Cordova run android时,该应用程序从未运行,CLI仅输出此信息 Android Studio project detected The "path" argument must be of type string 这就是我在config.xml <platform name="android"> <resource-file src="res/colors.xml" targ
Cordova run android
时,该应用程序从未运行,CLI仅输出此信息
Android Studio project detected
The "path" argument must be of type string
这就是我在config.xml
<platform name="android">
<resource-file src="res/colors.xml" target="/app/src/main/res/values/colors.xml" />
<icon background="@color/background" density="hdpi" foreground="res/icon.png" />
<allow-intent href="market:*" />
</platform>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="background">#191919</color>
</resources>
我知道问题与图标
config有关,因为它只在我使用前台
而不是src
时发生。此配置工作正常(但图标不是自适应的,具有默认背景色)
这是我的相关版本
- 节点9.11.2
- npm 5.6.0
- 科尔多瓦8.1.2(科尔多瓦-lib@8.1.1)
- cordova android 7.1.1
<platform name="android">
<resource-file src="res/colors.xml" target="/app/src/main/res/values/colors.xml" />
<icon background="@color/background" density="hdpi" src="res/icon.png" />
<allow-intent href="market:*" />
</platform>