2017-08-30 15 views
1

當我ionic cordova build android --release錯誤來ionic2 - 執行失敗的任務「:processDebugManifest」

IOS建立成功了,但安卓不能建立對我來說,第一次面對這個問題,之前建立的樂趣

最近,我添加一些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" 

更新!

最後我解決了這個問題,並且我在答案中寫了一條路。 enter image description here

+0

@DaveAlden請過來幫我... –

回答

1

通常,這個錯誤是cordova插件問題。

我的項目是weibosdk插件問題

我只是刪除我的weibosdk插件,並發現了一個新的最新插件添加在我的項目,然後構建成功。

科爾多瓦插件RM科爾多瓦 - 插件 - weibosdk

所以,當你遇到這個問題,類型ionic cordova plugin list列出你在你的項目中添加了什麼,然後檢查你的插件,它過期或其他問題。

如果您有其他建議,請在此帖子中留言。謝謝!

1

這是facebook插件的問題。 https://github.com/jeduan/cordova-plugin-facebook4/issues/507

在構建之間,我刪除了插件,平臺和資源並重新生成所有內容。

+0

所以..我必須先刪除所有插件,然後重建它? –

+1

最後,我找到了解決錯誤的方法,但仍然感謝您回答我的問題併爲您提供幫助。 –

相關問題