当我尝试运行我的应用程序时,我面临着这样的错误: -
apply plugin: 'com.android.application'android {
compileSdkVersion 23
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "android.catalyst.com.jsonarray"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}}dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'}
。另一个问题就是这样: -
错误:任务':app:packageDebug'执行失败。
在APK META-INF / LICENSE.txt中复制的重复文件 文件1:D:\ andriod App \ JsonArray \ app \ libs \ commons-logging-1.2.jar 文件2:D:\ andriod App \ JsonArray \ app \ libs \ commons-codec-1.9.jar
{{1}}
答案 0 :(得分:2)
您应该将以下代码添加到您的gradle文件中:
$("#slider-heatresist").slider({
orientation: "vertical", //Add this
slide: function (event, ui) {
var value1 = (ui.value * 225 / 100).toFixed();
var value2 = (ui.value * 225 / 100).toFixed();
filter.sl7_min = value1;
filter.sl7_max = value2;
filterItems();
if (ui.value == 0)
value1 = "Keine Auswahl";
$("#heat_resistance").val(value1);
},
create: function (event, ui) {
$("#heat_resistance").val("Keine Auswahl");
}
});//7
编辑:
android {
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
从libs文件夹中删除jar(commons-logging和commons-codec)并添加此gradle依赖项。
感谢。
答案 1 :(得分:2)
您可以在gradle文件中添加此代码:
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}