2016-11-16 162 views
0

我從png轉換九補丁後得到這個錯誤。我看到你以前的答案在同一個問題上,但沒有得到結果幫助我。由於九補丁導致的錯誤

它我的錯誤日誌:

Error:java.lang.RuntimeException: Some file crunching failed, see logs for details  
Error:Execution failed for task ':app:mergeDebugResources'. 
Error: java.lang.RuntimeException: Some file crunching failed, see logs for details 

,從這裏是我的gradle產出:

apply plugin: 'com.android.application' android { 
compileSdkVersion 24 
buildToolsVersion "24.0.3" 
defaultConfig { 
    applicationId "kliff.communitydesigns" 
    minSdkVersion 19 
    targetSdkVersion 24 
    versionCode 1 
    versionName "1.0" 
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
} dependencies { 
compile fileTree(include: ['*.jar'], dir: 'libs') 
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
    exclude group: 'com.android.support', module: 'support-annotations' 
}) 
compile 'com.android.support:appcompat-v7:24.2.1' 
compile 'com.android.support:cardview-v7:24.2.1' 
compile 'com.android.support:recyclerview-v7:24.2.1' 
compile 'com.android.support:design:24.2.1' 
compile 'com.android.volley:volley:1.0.0' 
compile 'com.android.support:support-v4:24.2.1' 

compile 'com.squareup.picasso:picasso:2.4.0' 
compile 'de.hdodenhof:circleimageview:2.1.0' 

} 
+0

參考http://stackoverflow.com/questions/30764604/execution-failed-for-task-appmergedebugresources-crunching-cruncher-png-fa – sasikumar

+0

因爲我添加abc.9.png它的創建問題沒有它我的項目運行完美無瑕。但它的簡單形象。我想要9個補丁。 –

+0

感謝兄弟我已經解決了這個錯誤。由於我的自定義9補丁感謝您的建議。 –

回答

0

這個問題出現的可能是你正在創建自己9patch ..結賬以下link並創建自己的9補丁

Canvas and Drawables

+0

謝謝....我從上週有這個問題,現在我通過考慮你的答案來解決它... –