问题
The Project Structure dialog in 0.3.1 has changed completely - I cannot figure out how to import the Facebook SDK using the new structure. Facebook's import instructions has not been updated. If anyone coul provide assistance please that would be much appreciated.
Update: Screenshot of errors after applying @plastiv's suggestion
回答1:
Edit next file and re-sync project (Sync project with gradle files button or restart idea).
MyProject\MyApp\build.gradle
repositories {
mavenCentral()
maven {
url 'https://github.com/Goddchen/mvn-repo/raw/master/'
}
}
dependencies {
compile 'com.facebook.android:facebook:3.5.2'
}
As you can see this is not official @aar library bundle, until Facebook uploads its SDK to mavenCentral we can use this temp solution from the community.
回答2:
You need to install 'Android support repository' from Android SDK manager
来源:https://stackoverflow.com/questions/19831230/import-facebook-sdk-for-android-studio-0-3-1