每当我运行、制作或清理项目时,
Error:Execution failed for task ':app:mergeDebugResources'.> -1发出此错误消息。
我检查了我的资源文件几次,没有致命的错误。只有png图标和xml文件。
我不知道“-1”是什么意思。
在我的主要java文件中,存在“无法解决符号R”错误。
我的应用程序昨晚发布得很好,但当我今天早上醒来运行android工作室时,它失败了。
我该怎么办?
这是我的秤
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.exapmle.rantalk"
minSdkVersion 21
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.1.1'
compile 'com.android.support:design:24.1.1'
compile 'com.android.support:cardview-v7:24.1.1'
compile 'com.android.support:recyclerview-v7:24.1.1'
compile 'com.android.support:support-v4:24.1.1'
compile 'com.android.support:support-v13:24.1.1'}在下面,我添加了我的整个gradle输出,谢谢。
执行任务:app:generateDebugSources,:app:generateDebugAndroidTestSources,:app:mockableAndroidJar,:app:prepareDebugUnitTestDependencies,:app:compileDebugSources,:app:compileDebugAndroidTestSources,:app:compileDebugUnitTestSources
按需配置是一项孵化器功能。增量式java编译是一个孵化器特性。::app:预构建最新版:app:preDebugBuild最新版:app:checkDebugManifest :app:preReleaseBuild最新版:app:prepareComAndroidSupportAnimatedVectorDrawable2411Library最新版:app:prepareComAndroidSupportCardviewV72411Library最新版:app:prepareComAndroidSupportCardviewV72411Library最新版:app:prepareComAndroidSupportDesign2411Library最新版:app:prepareComAndroidSupportRecyclerviewV72411Library -TO-DATE :app:prepareComAndroidSupportSupportV42411Library TO-DATE :app:prepareComAndroidSupportSupportVectorDrawable2411Library TO-DATE:app:preReleaseBuild最新版:app:prepareComAndroidSupportCardviewV72411Library UP:app:prepareComAndroidSupportDesign2411Library:app:prepareComAndroidSupportRecyclerviewV72411Library TO-DATE :app:prepareComAndroidSupportSupportV132411Library -TO-DATE:app:prepareComAndroidSupportSupportV42411Library TO-DATE:app:prepareComAndroidSupportSupportVectorDrawable2411Library TO-DATE :app:compileDebugAidl最新:app:generateDebugBuildConfig最新:app:mergeDebugShaders最新:app:编译程序mergeDebugShaders最新更新:app:generateDebugAsset最新:app:mergeDebugAssets TO-DATE :app:generateDebugResValues UP-DATE :app:generateDebugResources UP-DATE:app:mergeDebugAssets UP:generateDebugResValues UP-DATE:app:generateDebugResources UP-DATE :app:mergeDebugResources
失败:生成失败,出现异常。
构建失败
总时间: 7.62秒
发布于 2016-08-03 05:14:19
:app:mergeDebugResources可能是由于资源文件出现问题而引发的,请检查您的绘图/资源中是否有数字或名称中的上限
发布于 2016-08-03 07:06:54
现在我发现我的styles.xml文件有问题.我删除了样式并重新制作,现在我的应用程序开始工作了。谢谢你的评论伙计们。
https://stackoverflow.com/questions/38734431
复制相似问题