简体   繁体   中英

Facebook login in android application is not working

Am working on fb login in android application but i have an issue when is add sdk in gradle after after sync it show error

enter code here
 android {
compileSdkVersion 22
buildToolsVersion "23.0.1"

repositories {
    mavenCentral()
}
defaultConfig {
    applicationId "com.dogsbree"
    minSdkVersion 15
    targetSdkVersion 21
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
sourceSets { main { jni.srcDirs = ['src/main/jni', 'src/main/jni/'] } }
}

 dependencies {
compile 'com.facebook.android:facebook-android-sdk:4.11.0'
compile files('libs/universal-image-loader-1.9.3-with-sources.jar')
compile 'com.android.support:support-v4:22.2.1'
compile 'com.android.support:appcompat-v7:22.2.1'
compile files('libs/android-async-http-1.4.4.jar')
compile files('libs/httpmime-4.2.1.jar')

}

It show error like this

enter code here
 Error:Execution failed for task ':app:mergeDebugResources'.
 > Crunching Cruncher com_facebook_tooltip_black_background.9.png failed, 

It may happens because fake png files. You can use this command to check out fake pngs.

 cd <YOUR_PROJECT/res/> && find . -name *.png | xargs pngcheck

And then,use ImageEditor(Ex, Pinta) to open fake pngs and re-save them to png.

or

Rename your image file, Image file should not contain numbers

Good luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM