添加库'com.ramimartin.bluetooth:AndroidBluetoothLibrary:1.0.1-SNAPSHOT'后出错

时间:2016-02-24 07:06:36

标签: android build bluetooth dependencies android-support-library

我已经添加了这个库但是当我想构建用于调试的项目时,它会显示如下所示的错误

Coordinate Mapper

我试过像

这样的一切
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException:java.util.zip.ZipException: duplicate entry: android/support/v4/util/DebugUtils.class

multiDexEnabled true

dexOptions {
    javaMaxHeapSize "3g" //specify the heap size for the dex process
}

但对我不起作用。

这是我的build.gradle文件依赖项

exclude group: 'com.android.support', module: 'support-v4'

感谢您的所有建议。

1 个答案:

答案 0 :(得分:0)

格拉德尔          defaultConfig {             ...             minSdkVersion 14             targetSdkVersion 21             ...

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.android.multidex.myapplication">
    <application
        ...
        android:name="android.support.multidex.MultiDexApplication">
        ...
    </application>
</manifest>

清单

function showFileSize() {
    var input, file;

    // (Can't use `typeof FileReader === "function"` because apparently
    // it comes back as "object" on some browsers. So just see if it's there
    // at all.)
    if (!window.FileReader) {
        bodyAppend("p", "The file API isn't supported on this browser yet.");
        return;
    }

    input = document.getElementById('fileinput');
    if (!input) {
        bodyAppend("p", "Um, couldn't find the fileinput element.");
    }
    else if (!input.files) {
        bodyAppend("p", "This browser doesn't seem to support the `files` property of file inputs.");
    }
    else if (!input.files[0]) {
        bodyAppend("p", "Please select a file before clicking 'Load'");
    }
    else {
        file = input.files[0];
        // YOUR VALIDATION HERE USING file.size
        bodyAppend("p", "File " + file.name + " is " + file.size + " bytes in size");
    }
}

但我有这个错误 错误:任务':app:transformClassesWithJarMergingForDebug'的执行失败。

  

com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:android / support / v4 / util / DebugUtils.class

从中获取 Error:Execution failed for task ':app:transformClassesWithDexForDebug'