ionic2 - 任务“:processDebugManifest”执行失败

2023-12-04

When I ionic cordova build android --release错误来了

ios构建已经成功,但是android无法为我构建,第一次遇到这个问题,在构建乐趣之前

最近,我在我的项目中添加了一些codova插件和第三方登录sdk,但现在不适合我

zhungzhens-MacBook-Air:minan zhungzhenzhungzhen$ ionic cordova build android
Running app-scripts build: --build --iscordovaserve --externalIpRequired --nobrowser

[15:18:50]  build dev started ... 
[15:18:50]  clean started ... 
[15:18:50]  clean finished in 8 ms 
[15:18:50]  copy started ... 
[15:18:50]  transpile started ... 
[15:18:55]  transpile finished in 5.83 s 
[15:18:55]  preprocess started ... 
[15:18:56]  deeplinks started ... 
[15:18:56]  deeplinks finished in 105 ms 
[15:18:56]  preprocess finished in 106 ms 
[15:18:56]  webpack started ... 
[15:18:56]  copy finished in 6.34 s 
[15:19:10]  webpack finished in 14.86 s 
[15:19:10]  sass started ... 
[15:19:12]  sass finished in 1.75 s 
[15:19:12]  postprocess started ... 
[15:19:12]  postprocess finished in 8 ms 
[15:19:12]  lint started ... 
[15:19:12]  build dev finished in 22.64 s 
> cordova build android
⠙ Running command [15:19:22]  lint finished in 10.16 s 
✖ Running command - failed!

[ERROR] Cordova encountered an error.
        You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova build android (exit code 1):

        (truncated) ... rscript UP-TO-DATE
        :CordovaLib:compileDebugRenderscript UP-TO-DATE
        :CordovaLib:generateDebugResValues UP-TO-DATE
        :CordovaLib:generateDebugResources UP-TO-DATE
        :CordovaLib:packageDebugResources UP-TO-DATE
        :CordovaLib:processDebugManifest UP-TO-DATE
        :CordovaLib:generateDebugBuildConfig UP-TO-DATE
        :CordovaLib:processDebugResources UP-TO-DATE
        :CordovaLib:generateDebugSources UP-TO-DATE
        :CordovaLib:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
        :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
        :CordovaLib:processDebugJavaRes UP-TO-DATE
        :CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
        :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
        :CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
        :CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
        :CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE
        :CordovaLib:bundleDebug UP-TO-DATE
        :CordovaLib:preReleaseBuild UP-TO-DATE
        :CordovaLib:checkReleaseManifest
        :CordovaLib:prepareReleaseDependencies
        :CordovaLib:compileReleaseAidl UP-TO-DATE
        :CordovaLib:compileReleaseNdk UP-TO-DATE
        :CordovaLib:copyReleaseLint UP-TO-DATE
        :CordovaLib:mergeReleaseShaders UP-TO-DATE
        :CordovaLib:compileReleaseShaders UP-TO-DATE
        :CordovaLib:generateReleaseAssets UP-TO-DATE
        :CordovaLib:mergeReleaseAssets UP-TO-DATE
        :CordovaLib:mergeReleaseProguardFiles UP-TO-DATE
        :CordovaLib:packageReleaseRenderscript UP-TO-DATE
        :CordovaLib:compileReleaseRenderscript UP-TO-DATE
        :CordovaLib:generateReleaseResValues UP-TO-DATE
        :CordovaLib:generateReleaseResources UP-TO-DATE
        :CordovaLib:packageReleaseResources UP-TO-DATE
        :CordovaLib:processReleaseManifest UP-TO-DATE
        :CordovaLib:generateReleaseBuildConfig UP-TO-DATE
        :CordovaLib:processReleaseResources UP-TO-DATE
        :CordovaLib:generateReleaseSources UP-TO-DATE
        :CordovaLib:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
        :CordovaLib:compileReleaseJavaWithJavac UP-TO-DATE
        :CordovaLib:processReleaseJavaRes UP-TO-DATE
        :CordovaLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
        :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
        :CordovaLib:mergeReleaseJniLibFolders UP-TO-DATE
        :CordovaLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
        :CordovaLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
        :CordovaLib:bundleRelease UP-TO-DATE
        :prepareComAndroidSupportAnimatedVectorDrawable2531Library UP-TO-DATE
        :prepareComAndroidSupportAppcompatV72531Library UP-TO-DATE
        :prepareComAndroidSupportCardviewV72531Library UP-TO-DATE
        :prepareComAndroidSupportCustomtabs2531Library UP-TO-DATE
        :prepareComAndroidSupportSupportCompat2531Library UP-TO-DATE
        :prepareComAndroidSupportSupportCoreUi2531Library UP-TO-DATE
        :prepareComAndroidSupportSupportCoreUtils2531Library UP-TO-DATE
        :prepareComAndroidSupportSupportFragment2531Library UP-TO-DATE
        :prepareComAndroidSupportSupportMediaCompat2531Library UP-TO-DATE
        :prepareComAndroidSupportSupportV42531Library UP-TO-DATE
        :prepareComAndroidSupportSupportVectorDrawable2531Library UP-TO-DATE
        :prepareComCommit451PhotoView124Library UP-TO-DATE
        :prepareComFacebookAndroidFacebookAndroidSdk4260Library UP-TO-DATE
        :prepareOpenDefault206Library UP-TO-DATE
        :prepareOrgApacheCordovaCordovaLib623DebugLibrary
        :prepareDebugDependencies
        :compileDebugAidl
        :compileDebugRenderscript
        :generateDebugBuildConfig
        :generateDebugResValues
        :generateDebugResources
        :mergeDebugResources
        :processDebugManifest/Users/zhungzhenzhungzhen/Desktop/minan/platforms/android/AndroidManifest.xml:54:9-242
        Error:
        Element activity#com.zhungzhen.minanapp.wxapi.WXEntryActivity at AndroidManifest.xml:54:9-242 duplicated with
        element declared at AndroidManifest.xml:21:9-27:20
        /Users/zhungzhenzhungzhen/Desktop/minan/platforms/android/AndroidManifest.xml Error:
        Validation failed, exiting


        See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

        :processDebugManifest FAILED

        FAILURE: Build failed with an exception.

        * What went wrong:
        Execution failed for task ':processDebugManifest'.
        > Manifest merger failed with multiple errors, see logs

        * Try:
        Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

        BUILD FAILED

        Total time: 11.711 secs
        Error: /Users/zhungzhenzhungzhen/desktop/minan/platforms/android/gradlew: Command failed with exit code 1 Error
        output:
        /Users/zhungzhenzhungzhen/Desktop/minan/platforms/android/AndroidManifest.xml:54:9-242 Error:
        Element activity#com.zhungzhen.minanapp.wxapi.WXEntryActivity at AndroidManifest.xml:54:9-242 duplicated with
        element declared at AndroidManifest.xml:21:9-27:20
        /Users/zhungzhenzhungzhen/Desktop/minan/platforms/android/AndroidManifest.xml Error:
        Validation failed, exiting

        FAILURE: Build failed with an exception.

        * What went wrong:
        Execution failed for task ':processDebugManifest'.
        > Manifest merger failed with multiple errors, see logs

        * Try:
        Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

两个插件请求不同版本的 android 支持 图书馆在这里。

这是我从网上查到的,是插件问题吗?

这是我的插件列表

com-sarriaroman-photoviewer 1.1.10 "PhotoViewer"
cordova-plugin-console 1.0.5 "Console"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-qqsdk 0.9.6 "QQSDK"
cordova-plugin-sharesdk 0.1.0 "ShareSDK"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.1 "StatusBar"
cordova-plugin-wechat 2.0.0 "Wechat"
cordova-plugin-weibosdk 0.6.0 "WeiboSDK"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova-plugin-x-socialsharing 5.1.8 "SocialSharing"
es6-promise-plugin 4.1.0 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"

更新!!!

Finally I solved this problem and I wrote the way in the answer. enter image description here


通常,这个错误是cordova插件的问题。

对于我的项目来说是weibosdk插件问题

我只是删除了我的weibosdk插件,并在我的项目中找到了一个新的最新插件添加,然后构建成功。

cordova 插件 rm cordova-plugin-weibosdk

所以当你遇到这个问题时,输入ionic cordova plugin list列出您在项目中添加的内容,然后检查您的插件是否已过时或存在其他问题。

如果您有其他建议,请在这篇文章中评论。谢谢!

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ionic2 - 任务“:processDebugManifest”执行失败 的相关文章

随机推荐