gpt4 book ai didi

android - 任务 ':mergeDebugResources' 执行失败。这是什么以及如何解决?

转载 作者:行者123 更新时间:2023-11-29 01:36:53 25 4
gpt4 key购买 nike

当我尝试运行该项目时,它显示了这个错误。

这些名字都是有效的,但这个错误仍然让我恼火!

这是错误:

Error:Execution failed for task ':mergeDebugResources'.
> /Users/hammadnasir/AndroidstudioProjects/DuaThePowerfulWeapon/res/drawable-hdpi/dua_when_leaving_mosque.JPG: Error: Invalid file name: must contain only lowercase letters and digits ([a-z0-9_.])

这是我的 build.gradle 文件:

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
}
}

allprojects {
repositories {
mavenCentral()
}
}

apply plugin: 'android'

android {
compileSdkVersion 19
buildToolsVersion "19.1.0"

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')
}
}

我尝试并搜索了很多,但我仍然无法解决这个错误!!!

请帮助我!

我们将不胜感激所有帮助。

提前致谢。

最佳答案

错误信息表明:

.../res/drawable-hdpi/dua_when_leaving_mosque.JPG:错误:无效文件名:必须仅包含小写字母和数字([a-z0-9_.])

指示的文件名有大写字母(.JPG)。

将文件从 dua_when_leaving_mosque.JPG 重命名为 dua_when_leaving_mosque.jpg

关于android - 任务 ':mergeDebugResources' 执行失败。这是什么以及如何解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27411715/

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