mardi 31 mars 2015

Android, Sudden error with com.facebook, cannot resolve all symbols

I was developing application imported from Eclipse with facebook library. For two months everything was ok, today I opened Android Studio and suddenly all facebook library cannot be solved... I don't remember that I did something what could cause this. I updated SDk Manager, deleted and install again facebook library, but still no change.


gradle:



apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.name.app"
minSdkVersion 19
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'com.android.support:recyclerview-v7:21.0.3'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
}


Errors:



Error:(33) No resource identifier found for attribute 'fetch_user_info' in package 'com.name.app'
Error:Execution failed for task ':app:processDebugResources'.com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Beata\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1


in LoginActivity all these symbols cannot be solved:



import com.facebook.Session;
import com.facebook.SessionState;
import com.facebook.UiLifecycleHelper;
import com.facebook.model.GraphUser;
import com.facebook.widget.LoginButton;


If I comment all code connected to facebook, the rest app works fine. What could cause this problem? How can I fix this?


Aucun commentaire:

Enregistrer un commentaire