gpt4 book ai didi

java - 流程应用程序执行失败 :dexDebug after adding BaseGameUtils

转载 作者:太空宇宙 更新时间:2023-11-04 13:24:30 26 4
gpt4 key购买 nike

我刚刚将 baseGameUtils 导入到我的 Android 游戏中,以便添加 Google Play 排行榜,但是,当我按下播放按钮时,我收到此错误:“错误:任务 ':app:dexDebug' 执行失败”。

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'' finished with non-zero exit value 2`

我尝试按照这两页的说明进行操作:Stackoverflow question 1 , Stackoverflow question 2 。我尝试在 basegameutils build.gradle 中将 google 支持库设置为 22.2.1 和 8.1.0,但随后我在该库的 .java 文件中缺少依赖项。
我没有主意,需要帮助。谢谢大家。

应用程序:build.gradle:

apply plugin: 'com.android.application'


android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "com.honeycomb.touchtycube"
minSdkVersion 14
targetSdkVersion 22
versionCode 11
versionName "1.1.6"

}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
//compile project(':facebook');


compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.google.android.gms:play-services-ads:8.1.0'
compile 'com.google.android.gms:play-services-games:8.1.0'
compile project(':BaseGameUtils')

//compile project(':libs:basegameutils')
//compile 'com.purplebrain.adbuddiz.sdk:AdBuddiz-Java:3.0.15'
compile files('src/main/java/com/honeycomb/touchtycube/testapp/libs/AdBuddiz-3.0.15.jar')

}

repositories {
maven {
url 'http://repository.adbuddiz.com/maven'
}
}

BaseBuildUtils:build_gradle:

apply plugin: 'com.android.library'


buildscript {
repositories {
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}


}

dependencies {
// Set defaults so that BaseGameUtils can be used outside of BasicSamples
if (!hasProperty('appcompat_library_version')) {
ext.appcompat_library_version = '20.0.+'
}
if (!hasProperty('support_library_version')) {
ext.support_library_version = '20.0.+'
}
if (!hasProperty('gms_library_version')) {
ext.gms_library_version = '7.8.0'
}
compile "com.android.support:appcompat-v7:${appcompat_library_version}"
compile "com.android.support:support-v4:${support_library_version}"
compile "com.google.android.gms:play-services-games:${gms_library_version}"
compile "com.google.android.gms:play-services-plus:${gms_library_version}"
compile "com.google.android.gms:play-services-appstate:${gms_library_version}"
}

android {
// Set defaults so that BaseGameUtils can be used outside of BasicSamples
if (!hasProperty('android_compile_version')) {
ext.android_compile_version = 20
}
if (!hasProperty('android_version')) {
ext.android_version = '20'
}

compileSdkVersion android_compile_version
buildToolsVersion android_version
}

编辑:我可以执行“make Project”而不会出现任何错误,错误仅在我执行“run app”时出现(或者我猜它在技术上是“run 'configuration'”)。

最佳答案

检查一次编程规则。还要添加您的 gradle 构建文件。

关于java - 流程应用程序执行失败 :dexDebug after adding BaseGameUtils,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32796515/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com