简体   繁体   中英

Android Studio not recognizing Facebook SDK

In build.gradle:

compile 'com.facebook.android:facebook-android-sdk:[4,5)'

In my code:

import com.facebook.AccessToken;
import com.facebook.AccessTokenTracker;
import com.facebook.login.LoginManager;

I don't think this was an issue before, but all of the sudden today it's saying "cannot resolve symbol" for all of the import statements and so lots of things in my code are now wrongly marked as errors, even though when I run my app it works fine. What could be causing this?

工具> android>使用gradle文件同步项目文件

Try this:

Ctrl+Shift+Alt+S->selectApp->Dependandies->select"+"->moduledependandies->choose facebooksdk

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