- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
您好,有类似的错误,例如重复输入。
失败:构建失败,出现异常。
出了什么问题:任务“:eBooks:packageAllDebugClassesForMultiDex”执行失败。
java.util.zip.ZipException: duplicate entry: android/support/annotation/AttrRes.class
尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。
构建失败
总时间:1分46.13秒
apply plugin: 'com.android.application'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':ui-reader')
compile "com.android.support:support-v4:23.1.1"
compile "com.android.support:support-v13:20.0.0"
compile files('libs/Flurry_3.2.1.jar')
}
android {
compileSdkVersion 21
buildToolsVersion "20.0.0"
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
}
defaultConfig {
// Enabling multidex support.
multiDexEnabled true
}
lintOptions {
abortOnError false
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
谁能告诉我如何在 jar 文件中找到重复类文件的位置以及如何获得如下输出
com.squareup.okhttp:okhttp:1.6.0| | | +--- com.intellij:annotations:+ -> 12.0
最佳答案
我能够通过包含 aviary-sdk 库在测试项目中重现它。我不需要 multi-dex,也没有研究不同的 SDK 版本,这对我来说似乎有点神秘。
如果你没有 multi-dex,你会得到经典的“multiple dex files define...”错误,这意味着你在你的构建中包含了相同的符号不止一次,这是你不允许的做。
这些问题可能需要一点调查;这就是 gradle dependencies
任务非常方便的地方。如果您进入模块的目录(不是顶级目录)并运行此任务:
../gradlew dependencies
你得到:
compile - Classpath for compiling the main sources.
+--- com.aviary.android.feather.sdk:aviary-sdk:3.4.3.351
| \--- com.aviary.android.feather.sdk:sdk-library:3.5.1
| +--- it.sephiroth.android.library.hlistviewanimations:hlistviewanimations-library:1.0.1
| | +--- it.sephiroth.android.library.horizontallistview:hlistview:1.2.2
| | | \--- com.android.support:support-v4:19.1.+ -> 21.0.3
| | | \--- com.android.support:support-annotations:21.0.3
| | \--- com.nineoldandroids:library:2.4.0
| +--- com.nineoldandroids:library:2.4.0
| +--- it.sephiroth.android.library.disklruimagecache:DiskLruImageCache:1.0.2
| | +--- org.apache.commons:commons-io:1.3.2
| | \--- com.jakewharton:disklrucache:2.0.2
| +--- com.aviary.android.feather.sdk:cds-library:3.2.4
| | +--- com.aviary.android.feather.sdk:common-library:3.1.2 -> 3.1.8.1
| | | +--- org.apache.commons:commons-lang3:3.3.2
| | | +--- com.squareup.okhttp:okhttp-urlconnection:1.6.0
| | | | \--- com.squareup.okhttp:okhttp:1.6.0
| | | +--- com.squareup.okhttp:okhttp:1.6.0
| | | +--- com.intellij:annotations:+ -> 12.0
| | | \--- commons-io:commons-io:2.4
| | \--- com.android.support:support-v4:19.+ -> 21.0.3 (*)
| +--- it.sephiroth.android.library.disklrumulticache:disklrumulticache:1.0.2
| | +--- org.apache.commons:commons-io:1.3.2
| | \--- com.jakewharton:disklrucache:2.0.2
| +--- it.sephiroth.android.library.picasso:picasso:2.3.3.2
| | +--- com.squareup.okhttp:okhttp-urlconnection:1.6.0 (*)
| | +--- com.squareup.okhttp:okhttp:1.6.0
| | \--- com.intellij:annotations:12.0
| +--- com.android.support:support-v4:19.+ -> 21.0.3 (*)
| +--- it.sephiroth.android.exif:android-exif-extended:1.0.2
| | +--- org.apache.commons:commons-lang3:3.3.2
| | \--- org.apache.commons:commons-io:1.3.2
| +--- it.sephiroth.android.library.imagezoom:imagezoom:1.0.5
| | \--- it.sephiroth.android.library.easing:android-easing:1.0.3
| +--- com.aviary.android.feather.sdk:receipt-library:2.0.2
| | +--- com.aviary.android.feather.sdk:common-library:3.1.2 -> 3.1.8.1 (*)
| | +--- it.sephiroth.android.library.ab:ab-test:2.0.3
| | \--- com.android.support:support-v4:19.+ -> 21.0.3 (*)
| +--- com.aviary.android.feather.sdk:common-library:3.1.2 -> 3.1.8.1 (*)
| +--- it.sephiroth.android.library.horizontallistview:hlistview:1.2.2 (*)
| +--- it.sephiroth.android.library.fork.listviewanimations:listviewanimations-library-core:2.6.1
| | \--- com.nineoldandroids:library:2.4.0
| +--- com.aviary.android.feather.sdk:tracking-library:3.0.1
| | \--- com.aviary.android.feather.sdk:common-library:3.1.8.1 (*)
| \--- com.aviary.android.feather.sdk:headless-library:3.4.002000000
| \--- com.aviary.android.feather.sdk:common-library:3.1.2 -> 3.1.8.1 (*)
如果你仔细观察,你会看到两者:
commons-io:commons-io:2.4
和
org.apache.commons:commons-io:1.3.2
在那里,我没有确认,但我假设是相同类的不同包装,其中包括 org/apache/commons/io/CopyUtils.class
。
如果您通过以下方式排除 commons-io
:
compile ('com.aviary.android.feather.sdk:aviary-sdk:3.4.3.351') {
exclude group: 'commons-io'
}
它将构建。我没有试过运行它,所以我不知道运行时是否会丢失符号;如果有,您可以尝试更彻底地处理从依赖项中排除的内容,或者您可以重新打包依赖项以修复错误,或者联系其作者。
关于Android Studio 更新到 1.0 破坏了 MultiDex,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27436641/
我正在尝试完成撤消/重做。我正在使用loadFromJSON(...)从我存储在数组中的 Canvas 状态重新构建 Canvas 。基本上,我的想法是破坏现有的 Canvas 并重新构建 Canva
在某些情况下,我有一个在 iframe 中打开的网页。当它被加载到那个 iframe 中时,我需要它将窗口位置设置为资源以下载文件(所有这些都是为了更新 GreaseMonkey 脚本......所有
当我创建 Intent 时: Intent in = new Intent(this, myclass.class); this.startActivity(in); 我创建了一个新的 Intent
我正在我本地版本的 Wordpress 网站上为 Wordpress 创建新的短代码。 在 functions.php 中,我添加了例如: function shortTest() { re
我正在为机械网站制作 JavaScript 闪卡游戏。因为我想将方程写在卡片上,所以我需要使用 delta(Δ) 符号。 一张卡片可能有:一侧是“功率方程”,另一侧是“P=W/Δt”。如果卡片从第一面
我编写了以下代码: document.addEventListener("DOMContentLoaded", ()=>{ let menu = document.querySelector(
我的浏览器同步工作正常,但我仍然很难处理之前的 html 的缓存。即使选中了 Chrome 的“禁用缓存”,甚至在隐身模式下也是如此! 要加载页面更改,我总是必须“清除缓存并硬重新加载”。 我想知道,
我注意到每次打开和关闭(通过单击菜单项或单击菜单外的某个区域)时,上下文菜单 ( Ext.menu.Menu ) s 不会从 DOM 中删除,它们只是以某种方式变得不可见。 如何改变这个? 最佳答案
给定依赖记录类型: Record FinPath : Type := mkPath { fp_head : S i; fp_tail
在 Husdon/Jenkins 中,我可以在构建被破坏时设置通知,以向进行破坏构建的 checkin 的用户发送电子邮件。如何在 Teamcity 中执行此操作? 我知道个人用户可以通过 Teamc
我注意到每次打开和关闭(通过单击菜单项或单击菜单外的某个区域)时,上下文菜单 ( Ext.menu.Menu ) s 不会从 DOM 中删除,它们只是以某种方式变得不可见。 如何改变这个? 最佳答案
使用 MIMEMultipart('alternative') 发送 html 和 pain-text 时 将 html 转换为文本时,html 的 anchor 换行 http://127.0.0.
每当我的应用程序最小化时,我都会启动一个服务,该服务向我的 HTTP 服务器发送拉取请求以检查通知,当应用程序恢复时,服务将被终止(以及计划的可运行项)。一切正常,直到我决定终止该应用程序(将其从正在
我意识到该框架处于 alpha 阶段,但正在实现 jQuery Mobile破坏了我的omniauth 身份验证。当我尝试登录时,一旦我尝试点击/auth/twitter Controller ,jQ
我对 Angular 比较陌生,经过几个小时的调试,我发现添加 jquery 时存在一些不兼容性。该指令在没有 jquery 的情况下工作正常,但在使用 jquery 时会中断:/ 这是一个 plnk
我发现,因为我正在处理的所有表单都有一个包含“name =“submit””属性的提交按钮,所以当我单击应该触发表单提交的链接时,触发器提交会中断. 有谁知道我该如何解决这个问题。 下面的 JQuer
我遇到了一个问题:/我得到了一个 CSS 东西,它使悬停时背景位置发生变化。但是当我在 javascript 中运行一个改变悬停的函数后,CSS 停止工作。 这是函数: function tree()
谁能给出一个完整的例子来说明 qooxdoo 1.6 中的 dispose 和 destruct 是如何工作的? ,我在 qooxdoo 演示或文档中找不到任何好的示例。 谢谢你的建议。 最佳答案 处
我对 JFormattedTextField 有疑问(我将它用作我们所有文本字段的基类)。 今天我尝试向该字段的文档添加一个文档过滤器,它工作得很好,但前提是它没有设置格式化程序工厂。 问题是,当设置
我有一个点击事件 $('#ship_Move').click(function (event) { event.stopPropagation();
我是一名优秀的程序员,十分优秀!