我的項目工作完美,直到我重新導入它。該gradle未能建立。
這是問題,我不知道如何解決它。使用Android Studio和Facebook SDK 4.0.1生成Gradle項目
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
C:\Users\RahmaD\Desktop\wiwan\ProjectNearByclicklong6(13)semifinal\ProjectNearB
clicklong6\ProjectNearByclicklong\ProjectNearBy\app\build\intermediates\exploded aar\com.facebook.android\facebook\4.0.1\res\drawable-hdpi-v4\com_facebook_tooltip_black_topnub.png ERROR: Unable to open PNG file
C:\Users\RahmaD\Desktop\wiwan\ProjectNearByclicklong6 (13)semifinal\ProjectNearByclicklong6\ProjectNearByclicklong\ProjectNearBy\app\ uild\intermediates\exploded-aar\com.google.android.gms\play-services-base\6.5.87\res\drawable-mdpi\ic_plusone_tall_off_client.png ERROR: Unable to open PNG file
C:\Users\RahmaD\Desktop\wiwan\ProjectNearByclicklong6 (13)semifinal\ProjectNearByclicklong6\ProjectNearByclicklong\ProjectNearBy\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\6.5.87\res\drawable-xhdpi\common_signin_btn_text_focus_light.9.png ERROR: Unable to open PNG file
C:\Users\RahmaD\Desktop\wiwan\ProjectNearByclicklong6 (13)semifinal\ProjectNearByclicklong6\ProjectNearByclicklong\ProjectNearBy\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\6.5.87\res\drawable-hdpi\ic_plusone_small_off_client.png ERROR: Unable to open PNG file
C:\Users\RahmaD\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe s -i
C:\Users\RahmaD\Desktop\wiwan\ProjectNearByclicklong6 (13)semifinal\ProjectNearByclicklong6\ProjectNearByclicklong\ProjectNearBy\app\build\intermediates\exploded-aar\com.facebook.android\facebook\4.0.1\res\drawable-hdpi-v4\com_facebook_tooltip_black_topnub.png -o
C:\Users\RahmaD\Desktop\wiwan\ProjectNearByclicklong6 (13)semifinal\ProjectNearByclicklong6\ProjectNearByclicklong\ProjectNearBy\app\build\intermediates\res\debug\drawable-hdpi-v4\com_facebook_tooltip_black_topnub.png
C:\Users\RahmaD\Desktop\wiwan\ProjectNearByclicklong6 (13)semifinal\ProjectNearByclicklong6\ProjectNearByclicklong\ProjectNearBy\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-location\6.5.87\res\drawable-hdpi\powered_by_google_dark.png ERROR: Unable to open PNG file
C:\Users\RahmaD\Desktop\wiwan\ProjectNearByclicklong6 (13)semifinal\ProjectNearByclicklong6\ProjectNearByclicklong\ProjectNearBy\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\6.5.87\res\drawable-hdpi\common_full_open_on_phone.png ERROR: Unable to open PNG file
Error:Failed to run command:
Error:Execution failed for task ':app:mergeDebugResources'.
> Error: Failed to run command:
C:\Users\RahmaD\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe s -i
C:\Users\RahmaD\Desktop\wiwan\ProjectNearByclicklong6 (13)semifinal\ProjectNearByclicklong6\ProjectNearByclicklong\ProjectNearBy\app\build\intermediates\exploded-aar\com.facebook.android\facebook\4.0.1\res\drawable-hdpi-v4\com_facebook_tooltip_black_topnub.png -o C:\Users\RahmaD\Desktop\wiwan\ProjectNearByclicklong6 (13)semifinal\ProjectNearByclicklong6\ProjectNearByclicklong\ProjectNearBy\app\build\intermediates\res\debug\drawable-hdpi-v4\com_facebook_tooltip_black_topnub.png
Error Code:42
Output:
C:\Users\RahmaD\Desktop\wiwan\ProjectNearByclicklong6 (13)semifinal\ProjectNearByclicklong6\ProjectNearByclicklong\ProjectNearBy\app\build\intermediates\exploded-aar\com.facebook.android\facebook\4.0.1\res\drawable-hdpi-v4\com_facebook_tooltip_black_topnub.png ERROR: Unable to open PNG file C:\Users\RahmaD\Desktop\wiwan\ProjectNearByclicklong6 (13)semifinal\ProjectNearByclicklong6\ProjectNearByclicklong\ProjectNearBy\app\build\intermediates\exploded-aar\com.facebook.android\facebook\4.0.1\res\drawable-hdpi-v4\com_facebook_tooltip_black_topnub.png ERROR: Unable to open PNG file
:app:mergeDebugResources FAILED 42
Error Code:
Output: Information:BUILD FAILED
Information:2 errors
Information:0 warnings
這是我的gradle這個文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.nearby.satoripop.projectnearby"
minSdkVersion 9
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services-location:6.5.87'
compile project(':StaggeredGridView-master')
compile files('libs/httpmime-4.2.6.jar')
compile project(':facebook')
compile files('libs/android-async-http-1.4.6.jar')
}
我是affraid有同樣的問題而產生的apk
請問你能顯示你的gradle文件嗎? – Yurets
可能重複,無論如何檢查答案。 1. http://stackoverflow.com/questions/28564094/libpng-error-at-appmergedebugresources-gradle-error-42 2.http://stackoverflow.com/questions/23359572/android-studio-execution-failed-for -task-appmergedebugresources-if-project – Yurets