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

導入 Xerces 庫時無法構建應用程序(退出值 1)

Can#39;t build app when I import Xerces library (exit value 1)(導入 Xerces 庫時無法構建應用程序(退出值 1))
本文介紹了導入 Xerces 庫時無法構建應用程序(退出值 1)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

當我在 Xerces 庫中導入時,我似乎無法構建我的應用程序.由于以前的問題,我已經(jīng)在使用 multidex,因此我知道這一切都正確設置.

我現(xiàn)在花了幾天時間在網(wǎng)上尋找并嘗試了各種版本的 Xerces 和對我的 build.gradle 的調整,但無法解決問題.我試過清理重建,重新設置Android Studio/我的電腦,使用jar直接編譯,現(xiàn)在正式?jīng)]有想法了.

下面是我的 build.gradle 設置:

<代碼>android {compileSdkVersion 23構建工具版本23.0.2"默認配置 {應用程序ID#packageid#"minSdkVersion 18targetSdkVersion 23版本代碼 1版本名稱0.8"multiDexEnabled 真}構建類型 {調試{縮小啟用假proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'}發(fā)布 {縮小啟用真proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'}}}依賴{//編譯 fileTree(include: ['*.jar'], dir: 'libs')測試編譯'junit:junit:4.12'編譯'com.android.support:multidex:1.0.1'編譯'com.google.android.gms:play-services:8.4.0'編譯'com.android.support:appcompat-v7:23.1.1'編譯'com.android.support:support-v4:23.1.1'編譯'com.android.support:design:23.1.1'編譯'me.dm7.barcodescanner:zbar:1.8.4'編譯項目(':rangebar-1.3')編譯('com.crashlytics.sdk.android:crashlytics:2.5.5@aar'){傳遞=真;}編譯'com.batch.android:batch-sdk:1.5'編譯'xerces:xercesImpl:2.11.0'//編譯文件('libs/xercesImpl-2.9.1.jar')}

我也已經(jīng)擴展了我的應用程序,因此在課堂上使用了以下內容:

@Override受保護的無效 attachBaseContext(上下文基礎){super.attachBaseContext(base);MultiDex.install(this);}

但是,每次我嘗試構建時都會收到以下錯誤:

錯誤:任務 ':app:transformClassesWithMultidexlistForDebug' 執(zhí)行失敗.>com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:Program FilesJavajdk1.7.0_79injava.exe'' 以非零退出值 1 結束

以下是我的 gradle 構建錯誤日志的結尾部分:

讀取程序jar [C:DocumentsMobileProjectsIAAndroidappuildintermediates	ransformsjarMergingdebugjars11fcombined.jar]讀取庫 jar [C:AppDataLocalAndroidsdkuild-tools23.0.2libshrinkedAndroid.jar]準備輸出 jar [C:DocumentsMobileProjectsIAAndroidappuildintermediatesmulti-dexdebugcomponentClasses.jar]從程序 jar 復制資源 [C:DocumentsMobileProjectsIAAndroidappuildintermediates	ransformsjarMergingdebugjars11fcombined.jar]:app:transformClassesWithMultidexlistForDebug 失敗FAILURE:構建失敗并出現(xiàn)異常.* 什么地方出了錯:任務 ':app:transformClassesWithMultidexlistForDebug' 執(zhí)行失敗.>com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:Program FilesJavajdk1.7.0_79injava.exe'' 以非零退出值 1 結束* 嘗試:使用 --stacktrace 選項運行以獲取堆棧跟蹤.使用 --info 或 --debug 選項運行以獲得更多日志輸出.構建失敗

解決方案

你試過清理rebuild,reset Android Studio/my PC,直接用jar編譯,現(xiàn)在給你一些建議.希望對你有幫助.

在給出建議之前,我想告訴你先閱讀這篇文章:配置你的帶有 Gradle 的 Multidex 應用程序.然后您可以按照建議進行操作.

建議一:

對于gradle bulid,必須遵循

<塊引用>

 dev 利用 minSDKVersion = 21 來允許 Android gradle 插件對每個模塊進行 pre-dex 并生成一個可以在其上進行測試的 APKAndroid Lollipop 無需耗時的 dex 合并過程.

您已將 minSdkVersion 用作 "minSdkVersion 18".所以請更新它.

建議二:

注意:使用 Android Plugin for Gradle 版本低于 1.1,您需要為 multidex-instrumentation 添加以下依賴項:

依賴項{androidTestCompile('com.android.support:multidex-instrumentation:1.0.1') {排除組:'com.android.support',模塊:'multidex'}}

注意:目前不支持使用 multidex 創(chuàng)建測試 APK.

建議 3:

您的輸入 jar 包含多個同名的資源文件.ProGuard 像往常一樣繼續(xù)復制資源文件,跳過任何以前使用過的名稱的文件.再一次,警告可能表明存在一些問題,因此建議刪除重復項.一種方便的方法是在輸入 jar 上指定過濾器.沒有關閉這些警告的選項.

<塊引用>

標準的 Android 構建過程會自動指定輸入給你的罐子.可能沒有簡單的方法來過濾它們以刪除這些警告.您可以手動刪除重復的資源文件來自輸入和庫.

ProGuard 可能會在遇到解析錯誤或 I/O 錯誤,或者一些更嚴重的警告時終止:

建議 4:

內存問題.我的 Messages Gradle Build 中有類似的消息

錯誤:任務 ':app:dexDebug' 執(zhí)行失敗.

<塊引用>

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:Program FilesJavajdk1.8.0_45injava.exe'' 完成非零退出值 1我在裝有 Windows 8.1 操作系統(tǒng)的筆記本電腦上沒有可用 RAM.我關閉了一些我不需要的程序.在那之后,我有了更多的空閑內存,我的項目是在 android studio 中構建的.

建議 5:

有人建議關閉 Android Studio 并殺死 Java 進程,這非常大(1.2 GB).然后你可以用 gradle 運行.有幫助.

建議 6:

安裝最新版本的構建工具.調整你的 build.gradle 以使用

`buildToolsVersion "22.0.1"`

對某些情況有幫助.

I cannot seem to get my app to build when I import in the Xerces library. I am already using the multidex due to previous issues and therefore I know this is all setup properly.

I have spend a couple of days now looking online and trying all sorts of versions of Xerces and tweaks to my build.gradle but cannot work out the issue. I have tried cleaning re-building, re-setting Android Studio/my PC, using a jar directly compiling and now officially out of ideas.

Below is my build.gradle setup:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "#packageid#"
        minSdkVersion 18
        targetSdkVersion 23
        versionCode 1
        versionName "0.8"
        multiDexEnabled true
    }

    buildTypes {
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
//    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.google.android.gms:play-services:8.4.0'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:support-v4:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'me.dm7.barcodescanner:zbar:1.8.4'
    compile project(':rangebar-1.3')
    compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
        transitive = true;
    }
    compile 'com.batch.android:batch-sdk:1.5'
    compile 'xerces:xercesImpl:2.11.0'
//    compile files('libs/xercesImpl-2.9.1.jar')
}

I have also extended my Application already and therefore have used the following within the class:

@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);

    MultiDex.install(this);
}

However, every time I try to build I keep getting the following error:

Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:Program FilesJavajdk1.7.0_79injava.exe'' finished with non-zero exit value 1

Below is the end part of my gradle build error log:

Reading program jar [C:DocumentsMobileProjectsIAAndroidappuildintermediates	ransformsjarMergingdebugjars11fcombined.jar]
Reading library jar [C:AppDataLocalAndroidsdkuild-tools23.0.2libshrinkedAndroid.jar]
Preparing output jar [C:DocumentsMobileProjectsIAAndroidappuildintermediatesmulti-dexdebugcomponentClasses.jar]
  Copying resources from program jar [C:DocumentsMobileProjectsIAAndroidappuildintermediates	ransformsjarMergingdebugjars11fcombined.jar]
:app:transformClassesWithMultidexlistForDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:Program FilesJavajdk1.7.0_79injava.exe'' finished with non-zero exit value 1

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

BUILD FAILED

解決方案

As you have tried cleaning re-building, re-setting Android Studio/my PC, using a jar directly for compiling, now I want to give you some suggestions. Hope it can help you.

Before giving suggestion, I want to tell you to go through this article first: Configuring Your App for Multidex with Gradle. Then you can follow the suggestions.

Suggestion-1:

For gradle bulid, it must be followed

         dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
         to pre-dex each module and produce an APK that can be tested on
         Android Lollipop without time consuming dex merging processes.

You have used minSdkVersion as "minSdkVersion 18". So plase update it.

Suggestion-2:

Note: With Android Plugin for Gradle versions lower than 1.1, you need to add the following dependency for multidex-instrumentation:

dependencies {
    androidTestCompile('com.android.support:multidex-instrumentation:1.0.1') {
         exclude group: 'com.android.support', module: 'multidex'
    }
}

Note: Use of multidex for creating a test APK is not currently supported.

Suggestion-3:

Your input jars contain multiple resource files with the same name. ProGuard continues copying the resource files as usual, skipping any files with previously used names. Once more, the warning may be an indication of some problem though, so it's advisable to remove the duplicates. A convenient way to do so is by specifying filters on the input jars. There is no option to switch off these warnings.

The standard Android build process automatically specifies the input jars for you. There may not be an easy way to filter them to remove these warnings. You could remove the duplicate resource files manually from the input and the libraries.

ProGuard may terminate when it encounters parsing errors or I/O errors, or some more serious warnings:

Suggestion-4:

Problem RAM. I had similar message in my Messages Gradle Build

Error:Execution failed for task ':app:dexDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:Program FilesJavajdk1.8.0_45injava.exe'' finished with non-zero exit value 1 I didn't have free RAM on my laptop with the OS windows 8.1. I closed a few programs that I don't need. After that, I had more free RAM and my project was built in android studio.

Suggestion-5:

Some people suggested to close Android Studio and kill the java processs, which was very big (1.2 GB). Then you can run with gradle. It helps.

Suggestion-6:

Install the latest version of the build tools. Adjust your build.gradle to use

`buildToolsVersion "22.0.1"`

It helps some cases.

這篇關于導入 Xerces 庫時無法構建應用程序(退出值 1)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關文檔推薦

Upload progress listener not fired (Google drive API)(上傳進度偵聽器未觸發(fā)(Google 驅動器 API))
Save file in specific folder with Google Drive SDK(使用 Google Drive SDK 將文件保存在特定文件夾中)
Google Drive Android API - Invalid DriveId and Null ResourceId(Google Drive Android API - 無效的 DriveId 和 Null ResourceId)
Google drive api services account view uploaded files to google drive using java(谷歌驅動api服務賬戶查看上傳文件到谷歌驅動使用java)
Google Drive service account returns 403 usageLimits(Google Drive 服務帳號返回 403 usageLimits)
com.google.api.client.json.jackson.JacksonFactory; missing in Google Drive example(com.google.api.client.json.jackson.JacksonFactory;Google Drive 示例中缺少)
主站蜘蛛池模板: 亚洲欧美日韩一区二区 | 国产精品视频yy9299一区 | 国产欧美精品区一区二区三区 | 欧美在线网站 | 男人av在线| 成人亚洲综合 | 欧美在线观看一区二区 | 欧美成人a∨高清免费观看 欧美日韩中 | 91av免费版 | 欧美日韩专区 | 国产精品国产三级国产aⅴ无密码 | 波多野结衣中文视频 | 韩日在线| 日韩精品 | 久草新视频 | 夜夜精品浪潮av一区二区三区 | 欧美一区二区大片 | 亚洲精品一 | 午夜国产在线 | 国产精品第2页 | 亚洲国产精品久久久久秋霞不卡 | 高清人人天天夜夜曰狠狠狠狠 | 不卡一区二区三区四区 | 久久精品国产99国产精品 | 一二三在线视频 | 日韩精品一区在线 | 亚洲精久 | 成人免费小视频 | 欧美一区二区三区久久精品视 | 久久久久黄色 | 91麻豆蜜桃一区二区三区 | 精品三级在线观看 | 久久久久精 | 成人一区二区视频 | 日韩欧美在| 亚洲精品久久久一区二区三区 | 亚洲网站在线观看 | 一区日韩 | av手机在线 | 午夜99| 瑞克和莫蒂第五季在线观看 |