- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在使用这个库 https://github.com/mikepenz/MaterialDrawer
当我尝试运行我的项目时,出现以下错误:
错误:
Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
如果我尝试使用 jdk1.7
Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_45\bin\java.exe'' finished with non-zero exit value 2
这是我的build.gradle
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.test"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.android.support:recyclerview-v7:+'
compile 'com.google.android.gms:play-services:7.5.0'
compile 'com.google.code.gson:gson:2.3'
compile 'com.mcxiaoke.volley:library:1.0.+'
compile fileTree(dir: 'libs/httpclient', include: ['*.jar'])
compile 'com.afollestad:material-dialogs:0.7.6.0'
compile 'com.blunderer:materialdesignlibrary:2.0.0'
compile 'com.github.navasmdc:MaterialDesign:1.5@aar'
//https://github.com/mikepenz
compile('com.mikepenz:materialdrawer:3.1.2@aar') {
transitive = true
}
compile('com.mikepenz:aboutlibraries:5.0.7@aar') {
transitive = true
}
compile('com.crashlytics.sdk.android:crashlytics:2.4.0@aar') {
transitive = true;
}
}
我也尝试了这些解决方案,但它不起作用:
defaultConfig {
...
multiDexEnabled = true
}
和
dependencies {
...
compile 'com.android.tools.build:gradle:1.1.2'
...
}
最佳答案
您的问题应该通过指定 -
来解决defaultConfig {
// Enabling multidex support.
multiDexEnabled true
}
您可以在 65K Method Limit 阅读更多相关信息
关于java - 错误 :Execution failed for task ':app:dexDebug' . .. 使用 android studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31420913/
我有一个问题,大约 2 天我无法解决。我分析了几乎所有关于这个错误的问题,但我无法处理它。 这是我的树: MyAppRoot -MyApp -libs -jar4.jar
我正在使用 Gradle 构建我的应用程序,并添加了几个库,如 Play Services 和 ChartBoost。我还设置了multiDexEnabled true在我的安卓build.gradl
如果我只是构建我的项目,它会说构建成功。但是,如果我运行我的项目,它会说构建失败。是这样说的 > :app:preDexDebug trouble processing "javax/xml/bind
我想启动我的应用程序“app”,我在构建 gradle 时遇到错误: Error:Execution failed for task ':app:dexDebug'. com.android.ide.
我的gradle执行失败,并显示以下错误消息。我在SO上搜索了许多其他答案,建议这样做: dexOptions { preDexLibraries = false } 有人
在libs中是一个* .jar文件。 同步:OK 制作项目:OK 清洁:确定 运行:错误 错误: 错误:任务':app:dexDebug'的执行失败。 com.android.ide.common.p
在尝试运行我的项目时,出现以下错误: Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.P
当我将 targetSDK 版本从 21 更改为 23 时,我目前遇到了问题。 更改并构建 gradle 后,当我尝试运行应用程序时出现错误 Error:Execution failed for ta
我最近尝试在我的应用程序上测试本地后端支持,但遇到了一些 gradle 构建问题。以下是我收到的错误: Error:Execution failed for task ':app:dexDebug'.
我刚刚将 baseGameUtils 导入到我的 Android 游戏中,以便添加 Google Play 排行榜,但是,当我按下播放按钮时,我收到此错误:“错误:任务 ':app:dexDebug'
这是我的 build.gradle 文件。 apply plugin: 'com.android.application' android { compileSdkVersion 20
Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.internal.LoggedErrorExcept
我在 Android Studio 中处理一个包含多个库的项目。我正在使用 App:dexdebug 大约两天,并尝试了所有可能的解决方案。我知道这是因为一些重复的依赖关系,但我不确定我在哪里插入了重
我的 Android Studio 项目有问题,它编译正常,但我不知道我做了什么破坏了它。 Error:Execution failed for task ':app:dexDebug'. com.a
昨天,当我尝试调试我的应用程序并在我的设备上运行它时,Gradle 控制台在 :mobile:dexDebug 之后立即开始显示此错误: AGPBI: {"kind":"SIMPLE","text":
您好,我的应用程序运行有问题。我搜索了相同的主题但不明白。我没有同名的类(class)。感谢您的帮助。这个问题可能会重复,但我想向您展示我的日志和依赖项。 再次更新build.gradle和messa
我有 3 个正在构建的模块。 A(一个没有依赖的android库) B(依赖于 A 的 android 库) C(依赖于 B 和 A 的 android 应用程序) 首先,我只想在 C 中声明 B 并
我知道以前曾问过这个问题,但仍然没有得到答案。该代码运行正常,但是当我尝试将其与Firebase集成时,我开始遇到此错误。 错误:任务':app:dexDebug'的执行失败。 com.android
> apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "
我正在尝试将“ Material 设计”集成到我的应用程序中,但我遇到了 appcompat 问题。当我创建新应用程序(没有任何更改)时,会出现此错误,并且所有应用程序中都出现相同的问题,其中我已包含
我是一名优秀的程序员,十分优秀!