maven - Android Studio - Cannot resolve symbol FacebookContentProvider -
i'm using facebook sdk 3.22.0 maven. building android sdk version 15. i'm using android studio 1.1.0 gradle.
in androidmanifest.xml i'm trying use facebookcontentprovider, every time try, issue cannot resolve symbol facebookcontentprovider. ideas on how solve this?
the specific line i'm having issue is:
<provider android:authorities="com.facebook.app.facebookcontentprovider1234" android:name="com.facebook.facebookcontentprovider" android:exported="true"/>
here's androidmanifest.xml:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.whatever" android:versioncode="100" android:versionname="1.0" > <uses-sdk android:minsdkversion="11" android:targetsdkversion="11" /> <uses-permission android:name="android.permission.internet"/> <uses-permission android:name="android.permission.access_network_state"/> <uses-permission android:name="android.permission.read_external_storage"/> <uses-permission android:name="android.permission.write_external_storage"/> <uses-permission android:name="android.permission.wake_lock"/> <uses-permission android:name="android.permission.microphone"/> <uses-permission android:name="android.permission.record_audio" /> <application android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme"> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> <meta-data android:name="com.facebook.sdk.applicationid" android:value="@string/facebook_app_id"/> <activity android:name="com.whatever.mainactivity" android:label="@string/app_name" android:screenorientation="portrait"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name="com.google.android.gms.ads.adactivity" android:configchanges="keyboard|keyboardhidden|orientation|screenlayout|uimode" android:theme="@android:style/theme.translucent" /> <activity android:name="com.facebook.loginactivity" android:theme="@android:style/theme.translucent.notitlebar" android:label="@string/app_name" /> <activity android:name="com.whatever.friends" android:screenorientation="portrait" /> <activity android:name="com.whatever.recent" android:screenorientation="portrait"> </activity> <provider android:authorities="com.facebook.app.facebookcontentprovider1234" android:name="com.facebook.facebookcontentprovider" android:exported="true"/> </application>
here's build.gradle:
apply plugin: 'com.android.application' dependencies { compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1' compile('org.apache.httpcomponents:httpmime:4.3') { exclude module: "httpclient" } compile 'com.google.android.gms:play-services:6.5.87' compile 'com.facebook.android:facebook-android-sdk:3.22.0' } android { compilesdkversion 15 buildtoolsversion "21.1.2" defaultconfig { applicationid "com.whatever" minsdkversion 15 targetsdkversion 15 } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.txt' } } packagingoptions { exclude 'meta-inf/license.txt' exclude 'meta-inf/notice.txt' exclude 'meta-inf/license' exclude 'meta-inf/notice' exclude 'meta-inf/dependencies' } productflavors { } }
unfortunately can't use facebookcontentprovider
facebook sdk version 3.22.0 since introduced version 4.0.0 can see on github:
you have 2 solutions:
- update facebook sdk version 4.0.0 or higher
use
nativeappcallcontentprovider
this:<provider android:name="com.facebook.nativeappcallcontentprovider" android:authorities="com.facebook.app.nativeappcallcontentprovider1234" android:exported="true" />
you can find more information
nativeappcallcontentprovider
here: https://developers.facebook.com/docs/reference/android/3.5/class/nativeappcallcontentprovider/
Comments
Post a Comment