Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
添加库后出错';蓝牙:AndroidBluetoothLibrary:1.0.1-SNAPSHOT';_Android_Build_Bluetooth_Dependencies_Android Support Library - Fatal编程技术网

添加库后出错';蓝牙:AndroidBluetoothLibrary:1.0.1-SNAPSHOT';

添加库后出错';蓝牙:AndroidBluetoothLibrary:1.0.1-SNAPSHOT';,android,build,bluetooth,dependencies,android-support-library,Android,Build,Bluetooth,Dependencies,Android Support Library,我已经添加了这个库,但是当我想要构建用于调试的项目时,它会显示如下错误 Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException:java.util.zip.ZipException: duplicate entry: android/support/v4/util/DebugUtils

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

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

但对我不起作用

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

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile ('com.journeyapps:zxing-android-embedded:3.2.0@aar') {
        exclude group: 'com.android.support', module: 'support-v4'
}
compile ('com.google.zxing:core:3.2.1'){
    exclude group: 'com.android.support', module: 'support-v4'
}
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile ('com.ramimartin.bluetooth:AndroidBluetoothLibrary:1.0.1-SNAPSHOT') {
    exclude group: 'com.android.support', module: 'support-v4'
}
}
感谢您的建议。

gradel 默认配置{ ... 明斯克版本14 targetSdkVersion 21

        // Enabling multidex support.
        multiDexEnabled true
    }
dependencies {
  compile 'com.android.support:multidex:1.0.0'
}
显示

    <?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>

        // Enabling multidex support.
        multiDexEnabled true
    }
dependencies {
  compile 'com.android.support:multidex:1.0.0'
}
    <?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>