我添加
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Task 3</h1>
<p>This is my Traffic Light script</p>
<img id = "light" src="Red Traffic light.jpg">
<button type="button" onclick="changeLights()">Change Lights</button>
<script>
var list = [
"Red Traffic light.jpg",
"Red & Yellow Traffic light.jpg",
"Green Traffic light.jpg",
"Yellow Traffic light.jpg"
];
var index = 0;
function changeLights() {
index = index + !
if (index == list.length - 1) {
index = 0;
}
var image = document.getElementById("light");
image.src=list[index];
</script>
在我的build.gradle文件中,然后显示重复条目错误:
compile 'com.github.PhilJay:MPAndroidChart:v2.2.3'
我尝试使用此方法:[java.util.zip.ZipException: duplicate entry
但它也显示错误。
我的应用build.gradle:
1 2 Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'. > java.util.zip.ZipException: duplicate entry: com/github/mikephil/charting/highlight/Highlight.class
请帮帮我......
答案 0 :(得分:0)
在gradle中使用这样的multiDexEnabled true
。删除=之间的标志。清理或重新启动项目。我正在使用类似的库。我也遇到了这个问题。
defaultConfig {
applicationId "package.xxxx"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}