建立Cordova的图标错误

Mic*_*ael 6 android-manifest cordova ionic-framework

使用cordova build一年之久的项目提出:

:processDebugResources
my_project/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:24: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/icon').
Run Code Online (Sandbox Code Playgroud)

然后粉碎:

FAILURE: Build failed with an exception.
Run Code Online (Sandbox Code Playgroud)

任何的想法?

Ami*_*kar 7

我遇到了同样的问题,我通过重新生成图标路径解决了这个问题,试试这个

ionic resources --icon
Run Code Online (Sandbox Code Playgroud)

在此之后使用以下命令

ionic build
Run Code Online (Sandbox Code Playgroud)


Che*_*ers 1

在您的清单中,是否有:

    android:icon="@drawable/ic_launcher"
Run Code Online (Sandbox Code Playgroud)

如果是这样,您可以尝试将其切换为:

    android:icon="@mipmap/ic_launcher"
Run Code Online (Sandbox Code Playgroud)

看来@drawable 已被@minimap 取代。更多信息可以在这里这里找到。希望这可以帮助。