Error:Execution failed for task ':app:transformClassesWithDexForRelease'

來源:互聯網
上載者:User

標籤:orm   bug   forms   使用   multi   UI   -o   form   command   

Android Studio 3.0.1打包的一個坑

使用的Android Studio 3.0.1版本,buildToolsVersion "26.0.2"
Debug模式運行App沒有任何問題,但是打包的時候就不行了,報以下錯誤:
Error:Execution failed for task ‘:app:transformClassesWithDexForRelease‘.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.android.dx.command.Main with arguments {--dex --num-threads=4 --multi-dex --main-dex-list E:\Android\code\FTS6\app\build\intermediates\multi-dex\release\maindexlist.txt --output E:\Android\code\FTS6\app\build\intermediates\transforms\dex\release\0 --min-sdk-version 18 E:\Android\code\FTS6\app\build\intermediates\transforms\jarMerging\release\0.jar}

在網上搜尋多次無果,最後想起來自己在使用Eclipse的時候,替換過dx.jar包(至於為什麼要替換,也是因為Eclipse不太相容這些最新的SDK的原因),還好之前自己在替換前都有備份,還原回去後,再次打包就好了,自己踩的坑,記錄一下

Error:Execution failed for task ':app:transformClassesWithDexForRelease'

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.