请帮我!
这里有错误说:
错误:任务':app:mergeDebugResources'的执行失败.
错误:java.util.concurrent.ExecutionException:com.android.ide.common.process.ProcessException:
我的应用程序是:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
packagingOptions {
exclude 'META-INF/NOTICE' // will not include NOTICE file
exclude 'META-INF/LICENSE' // will not include LICENSE file
}
defaultConfig {
applicationId "com.aku.ec2ainun.stepondesign"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: …
Run Code Online (Sandbox Code Playgroud) 我正在测试9补丁图像.
在一切正常之前,我将drawable
文件重命名ic_button_beat_box_default.png
为ic_button_beat_box_default.9.png
,然后我得到错误:
某些文件崩溃失败,请参阅日志以获取详细信息
.然后我重新命名,它正常工作.那怎么会这样呢?
完整的错误是:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Some file crunching failed, see logs for details
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeDebugResources'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
...
Caused by: java.lang.RuntimeException: Some file crunching failed, see logs for details
at com.android.builder.png.QueuedCruncher.waitForAll(QueuedCruncher.java:260)
at com.android.builder.png.QueuedCruncher.end(QueuedCruncher.java:280)
at …
Run Code Online (Sandbox Code Playgroud) 目前我正在使用Android Studio 2.1,当我运行我的应用程序时,它向我显示Message Gradle Build中的一些错误,说明如下
Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:prepareDebugUnitTestDependencies, :app:mockableAndroidJar, :app:generateDebugAndroidTestSources, :app:assembleDebug]
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72221Library
:app:prepareComAndroidSupportDesign2221Library
:app:prepareComAndroidSupportSupportV42221Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
AAPT err(Facade for 114461397): libpng error: Read Error
*Error:Execution failed for task ':app:mergeDebugResources'.
> Some file crunching failed, see logs for details*
Information:BUILD FAILED
Information:Total time: 24.87 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
Run Code Online (Sandbox Code Playgroud)
我试过清理和重建它,但它没有用.这个问题的答案也不起作用.任何帮助将不胜感激,谢谢.
更新: 这是日志输出
* Exception …
Run Code Online (Sandbox Code Playgroud) 我刚刚安装了android studio,并且有一个错误,我不知道如何修复
我可以从Android Studio和cmd进行gradle构建.但这个问题只是在詹金斯的建设中出现.这个问题并没有出现在Mac Jenkins设置中,而是出现在我的Windows设置中.
以下是我的gradle设置.
:应用:mergeBetaDebugResources
AAPT: \\?\C:\Windows\System32\config\systemprofile\.android\build-cache\671e94b2d47b0ef7a24e43f8814a29b911cc4872\output\res\drawable-ldrtl-mdpi\abc_ic_ab_back_mtrl_am_alpha.png ERROR: Unable to open PNG file
AAPT: \\?\C:\Windows\System32\config\systemprofile\.android\build-cache\7dc509eb0db17265925a5800b67445547ef97697\output\res\drawable-hdpi\common_google_signin_btn_text_dark_disabled.9.png ERROR: Unable to open PNG file
AAPT: \\?\C:\Windows\System32\config\systemprofile\.android\build-cache\671e94b2d47b0ef7a24e43f8814a29b911cc4872\output\res\drawable-ldrtl-xxxhdpi\abc_ic_menu_copy_mtrl_am_alpha.png ERROR: Unable to open PNG file
Error: Some file crunching failed, see logs for details
:app:mergeBetaDebugResources FAILED
Run Code Online (Sandbox Code Playgroud) 由于此构建错误,我无法在项目中添加9patch png :
信息:Gradle任务[:app:assembleDebug]错误:某些文件崩溃失败,请参阅日志以获取详细信息错误:任务':app:mergeDebugResources'的执行失败.
错误:某些文件崩溃失败,请参阅日志以获取详细信息信息:BUILD FAILED信息:总时间:11.955秒信息:2错误信息:0警告信息:在控制台中查看完整输出
事实:我已经添加了一个完美运行的,另一个是使用相同的方法,相同的边界和东西,但造成构建错误.
我试过了:
额外wtf:
此外,错误说"看日志"
因为它不是在logcat中肯定的.
如果可以的话请帮忙.这让我疯狂.我真的很感兴趣为什么我要用图像导入花半天时间.
java android nine-patch android-studio android-gradle-plugin