我在我的drawable-directory中添加了一些格式为* .png的图片,并将其与布局链接。但是每次我尝试构建它时,都会出现一个错误
“ ...粉碎Crunsher ... png失败”
以下是控制台的输出:
app:mergeDebugResources
AAPT out(1561599) : No Delegate set : lost message:Done
AAPT out(12956469) : No Delegate set : lost message:Done
AAPT out(20612543) : No Delegate set : lost message:Crunching C:\Dev\StudioProjects\test\android\app\src\main\res\drawable\bt_meeting_focused.png
AAPT out(11030156) : No Delegate set : lost message:Crunching C:\Dev\StudioProjects\test\android\app\src\main\res\mipmap-mdpi\ic_launcher.png
AAPT out(11030156) : No Delegate set : lost message:Crunching single PNG file: C:\Dev\StudioProjects\test\android\app\src\main\res\mipmap- mdpi\ic_launcher.png
AAPT out(11030156) : No Delegate set : lost message: Output file: C:\Dev\StudioProjects\test\android\app\build\intermediates\res\debug\mipmap-mdpi-v4\ic_launcher.png
AAPT out(11030156) : No Delegate set : lost message:Done
AAPT err(11030156): libpng error: Not a PNG file
AAPT out(20612543) : No Delegate set : lost message:Crunching single PNG file: C:\Dev\StudioProjects\test\android\app\src\main\res\drawable\bt_meeting_focused.png
AAPT out(20612543) : No Delegate set : lost message: Output file: C:\Dev\StudioProjects\test\android\app\build\intermediates\res\debug\drawable\b t_meeting_focused.png
AAPT out(20612543) : No Delegate set : lost message:Done
AAPT err(20612543): libpng error: Not a PNG file
AAPT err(1561599): libpng error: Not a PNG file
AAPT err(12956469): libpng error: Not a PNG file
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Crunching Cruncher uhr.png failed, see logs
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or -- debug option to get more log output.
BUILD FAILED
Total time: 14.598 secs
Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources]
Configuration on demand is an incubating feature.
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportSupportV42220Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
AAPT out(14080484) : No Delegate set : lost message:Done
AAPT out(9206750) : No Delegate set : lost message:Done
AAPT out(25360025) : No Delegate set : lost message:Done
AAPT err(25360025): libpng error: Not a PNG file
AAPT err(14080484): libpng error: Not a PNG file
AAPT out(6423170) : No Delegate set : lost message:Crunching C:\Dev\StudioProjects\test\android\app\src\main\res\drawable\anfrage_senden_.png
AAPT err(6423170): libpng error: Not a PNG file
AAPT out(6423170) : No Delegate set : lost message:Crunching single PNG file: C:\Dev\StudioProjects\test\android\app\src\main\res\drawable\anfrage_senden_.png
AAPT out(6423170) : No Delegate set : lost message: Output file: C:\Dev\StudioProjects\test\android\app\build\intermediates\res\debug\drawable\a nfrage_senden_.png
AAPT out(6423170) : No Delegate set : lost message:Done
AAPT err(9206750): libpng error: Not a PNG file
Process list not empty
:app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Crunching Cruncher uhr.png failed, see logs
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or -- debug option to get more log output.
BUILD FAILED
Total time: 4.325 secs
我试图清理项目,重新生成它,并通过“ gradlew clean build --refresh-dependencies”刷新依赖项,但没有任何效果。我已经检查了build.gradle文件中的依赖项,但似乎没有任何东西会导致错误。
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
compileOptions.encoding = 'windows-1251'
defaultConfig {
applicationId "com.example.benutzer.test"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.android.support:support-v4:22.2.0'
}
您有什么主意,错误的根源是什么?文件路径也不太长,每次不超过256个符号,那也不是问题:/
先感谢您 :)