久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

將字節(jié)碼轉換為 dex 時出錯:原因:java.lang.RuntimeE

Error converting bytecode to dex: Cause: java.lang.RuntimeException: Exception parsing classes - Android studio 2.0 beta 6(將字節(jié)碼轉換為 dex 時出錯:原因:java.lang.RuntimeException:異常解析類 - Android Studio 2.0 beta 6) - I
本文介紹了將字節(jié)碼轉換為 dex 時出錯:原因:java.lang.RuntimeException:異常解析類 - Android Studio 2.0 beta 6的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我用 gradle 更新到了最新版本的 Android studio 2.0 Beta 6:

I updated to the last version of Android studio 2.0 Beta 6 with the gradle :

dependencies {
    classpath 'com.android.tools.build:gradle:2.0.0-beta6'
}

該應用在我測試過的所有東西的模擬器和設備上運行良好.

The app works perfectly fine on emulator and devices I tested every thing and it works fine.

我只有在嘗試生成簽名的 APK 時遇到了很多錯誤,

I got many errors only when I try to Generate Signed APK,

我在依賴項中遇到了一些錯誤,當我排除矢量繪圖、矢量動畫繪圖和 Support-v4 庫時,所有這些錯誤都解決了

I got some errors in dependencies, all of them solved when i excluded vector drawable, vector animate drawable and Support-v4 library

現(xiàn)在我沒有任何依賴錯誤.

Now i dont have any dependencies error.

現(xiàn)在我的 app 模塊的 gradle.build 看起來像這樣:

now my gradle.build for the app module looks like this:

apply plugin: 'com.android.application'

android {
    configurations {
        //all*.exclude group: 'com.android.support', module: 'support-v4'
        all*.exclude module: 'animated-vector-drawable'
        all*.exclude module: 'support-vector-drawable'
        //all*.exclude module: 'support-v4'

    }
    repositories {
        maven { url "https://jitpack.io" }

    }
    compileSdkVersion 23
    buildToolsVersion '23.0.2'
    defaultConfig {
        applicationId "com.test.test"
        minSdkVersion 11
        targetSdkVersion 23
        versionCode 1
        versionName "1"

//        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }

}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])

    compile('com.github.afollestad.material-dialogs:commons:0.8.5.5@aar') {
        transitive = true
        exclude module: 'support-v4'
        exclude module: 'appcompat-v7'
        exclude module: 'recyclerview-v7'
    }
    compile('com.google.android.gms:play-services-ads:8.4.0') {
        exclude module: 'support-v4'
    }
    compile('com.google.android.gms:play-services-analytics:8.4.0') {
        exclude module: 'support-v4'
    }
    compile('com.android.support:appcompat-v7:23.2.0') {
        exclude module: 'support-v4'
        exclude module: 'animated-vector-drawable'
        exclude module: 'support-vector-drawable'
    }
    compile('com.android.support:support-v4:23.2.0') {
        exclude module: 'animated-vector-drawable'
        exclude module: 'support-vector-drawable'
    }
    compile('com.android.support:palette-v7:23.2.0') {
        exclude module: 'support-v4'
    }
    compile('com.android.support:cardview-v7:23.2.0') {
        exclude module: 'support-v4'
    }
    compile('com.android.support:recyclerview-v7:23.2.0') {
        exclude module: 'support-v4'
    }
    compile('com.android.support:design:23.2.0') {
        exclude module: 'support-v4'
    }
    compile('com.nineoldandroids:library:2.4.0') {
        exclude module: 'support-v4'
    }
    compile('com.baoyz.swipemenulistview:library:1.2.1') {
        exclude module: 'support-v4'
        exclude module: 'appcompat-v7'
        exclude module: 'recyclerview-v7'
    }
    compile('com.squareup.picasso:picasso:2.5.2') {
        exclude module: 'support-v4'
    }
    compile('com.nononsenseapps:filepicker:2.5.0') {
        exclude module: 'support-v4'
        exclude module: 'appcompat-v7'
        exclude module: 'recyclerview-v7'

    }
    compile 'com.google.code.gson:gson:2.6.1'
}

只有在我為發(fā)布而構建時才會出現(xiàn)錯誤:

The errors shows up only when I build for release:

這是我打開multiDex時的錯誤:

This is the error when i turn on multiDex:

Error:Execution failed for task ':app:transformClassesWithMultidexlistForRelease'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

這是我關閉它時的錯誤:

And this is the error when i turn it off:

:app:transformClassesWithDexForRelease
Error:Error converting bytecode to dex:
Cause: java.lang.RuntimeException: Exception parsing classes

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: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

我嘗試將 buildToolsVersion '23.0.2' 更改為所有可能的版本,但沒有任何改變.

I tried to change the buildToolsVersion '23.0.2' to every possible version and nothing changed.

當我輸入 22.0.1 版本時出現(xiàn)此錯誤:

when i put the version 22.0.1 i got this error:

Error:Error converting bytecode to dex:
Cause: com.android.dx.cf.iface.ParseException: name already added: string{"a"}

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: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

我嘗試了所有可能的支持庫版本和相同的結果.

I tried with all possible support libraries version and same result.

我嘗試使用 Java 1.6 和 1.7,但沒有任何改變!

I tried with Java 1.6 and 1.7 and nothing has changed !

請問還有什么其他可能的解決方案?

what can be other possible solution please ?

推薦答案

我也遇到了同樣的錯誤,我正在搜索許多具有重復依賴項或 multidex 等的現(xiàn)有答案,但沒有一個有效.(Android studio 2.0 Beta 6,構建工具 23.0.2,無 multidex)

I also faced the same error, and i was searching through many existing answers with duplicate dependencies or multidex etc. but none worked. (Android studio 2.0 Beta 6, Build tools 23.0.2, no multidex)

原來我曾經(jīng)使用的包名與清單中描述的包名不匹配.

It turned out that i once used a package names which didn't match the package name that is depicted in the Manifest.

在其他 ParseException 行中,我發(fā)現(xiàn)我在不同模塊中有文件,這些文件具有相似的包名稱/路徑,可能會與 dexer 發(fā)生沖突.

In other ParseException lines, i found out that i had files in different modules whith similiar package names/paths that possibly conflicted the dexer.

示例:

模塊 A:com.example.xyz.ticketing.modulea.Interface.java

模塊 B:com.example.Xyz.ticketing.moduleb.Enumerations.java

模塊 C:依賴于 A 和 B

Module C: Has dependencies on A and B

將Xyz"修復為小寫后,dexer 又正常了.

After fixing "Xyz" to lowercase, the dexer was fine again.

如何找出:

當我查看 gradle 控制臺的輸出時,ParseExceptions 看起來像這樣:

When i looked through the output of the gradle console for the ParseExceptions that looks like this:

AGPBI: {"kind":"error","text":"將字節(jié)碼轉換為 dex 時出錯: 原因:java.lang.RuntimeException: 異常解析類"

AGPBI: {"kind":"error","text":"Error converting bytecode to dex: Cause: java.lang.RuntimeException: Exception parsing classes"

我滾動到接近異常的末尾.在那長長的異常行中有一部分實際上提到了原因:

I scrolled close to the end of the exception. There is a part in that long exception line that actually mentions the cause:

引起:com.android.dx.cf.iface.ParseException:類名(at/dummycompany/mFGM/hata/hwp/BuildConfig)與路徑不匹配(at/dummycompany/mfgm/hata/hwp/BuildConfig.class)

這樣我找到了在哪里搜索不匹配的包名稱/路徑

This way i found out where to search for missmatching package names/paths

這篇關于將字節(jié)碼轉換為 dex 時出錯:原因:java.lang.RuntimeException:異常解析類 - Android Studio 2.0 beta 6的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

相關文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現(xiàn) IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當前風味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復“意外元素lt;查詢gt;在“清單中找到錯誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風味庫的多風味應用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運行時有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
主站蜘蛛池模板: 国产高清精品一区二区三区 | 久久国产综合 | 精品日韩欧美一区二区 | 欧美日韩精品在线一区 | 一区二区精品视频 | 欧美日韩中文在线 | 在线播放日韩 | 亚洲成av人影片在线观看 | 麻豆久久久久久 | 欧美一区二区三区在线看 | 日韩中文字幕免费 | 可以免费看的毛片 | 久久久久久美女 | 日韩免费福利视频 | 天堂一区二区三区 | 欧美性生活视频 | 亚洲精品视频导航 | 伊人网综合在线 | 欧美精品在线视频 | 九色 在线 | 欧美亚洲国语精品一区二区 | 国产精品一区在线 | 成人h视频在线观看 | 欧美久久久久久 | 国产成人精品免高潮在线观看 | 成人免费视频在线观看 | 九九免费观看视频 | 欧美一区视频 | 毛片毛片毛片毛片 | 欧美精品导航 | 卡通动漫第一页 | 日韩欧美在线精品 | 亚洲欧美一区二区三区在线 | 天天爽夜夜操 | 欧美日韩国产精品 | 国产精品免费一区二区三区四区 | 精品亚洲永久免费精品 | 亚洲国产激情 | 日本一区二区三区四区 | 毛片网在线观看 | 日韩福利在线观看 |