Tuesday, March 26, 2019

android - Unable to get provider com.facebook.internal.FacebookInitProvider: java.lang.ClassNotFoundException

I am trying to share a photo from my application to facebook. I have added the Facebook SDK and done the initial setup. But when I run the application its crashing and I am getting the following exception.



Here is my logcat:




java.lang.RuntimeException: Unable to get provider com.facebook.internal.FacebookInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.facebook.internal.FacebookInitProvider" on path: DexPathList[[zip file "/data/app/com.ignite.a01hw909350.kolamdemo-2/base.apk", zip file "/data/app/com.ignite.a01hw909350.kolamdemo-2/split_lib_slice_1_apk.apk"],nativeLibraryDirectories=[/data/app/com.ignite.a01hw909350.kolamdemo-2/lib/arm64, /data/app/com.ignite.a01hw909350.kolamdemo-2/base.apk!/lib/arm64-v8a, /data/app/com.ignite.a01hw909350.kolamdemo-2/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]
at android.app.ActivityThread.installProvider(ActivityThread.java:5267)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4859)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4799)
at android.app.ActivityThread.access$1600(ActivityThread.java:168)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1434)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5609)

at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.internal.FacebookInitProvider" on path: DexPathList[[zip file "/data/app/com.ignite.a01hw909350.kolamdemo-2/base.apk", zip file "/data/app/com.ignite.a01hw909350.kolamdemo-2/split_lib_slice_1_apk.apk"],nativeLibraryDirectories=[/data/app/com.ignite.a01hw909350.kolamdemo-2/lib/arm64, /data/app/com.ignite.a01hw909350.kolamdemo-2/base.apk!/lib/arm64-v8a, /data/app/com.ignite.a01hw909350.kolamdemo-2/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.ActivityThread.installProvider(ActivityThread.java:5252)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4859) 
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4799) 

at android.app.ActivityThread.access$1600(ActivityThread.java:168) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1434) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:148) 
at android.app.ActivityThread.main(ActivityThread.java:5609) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687) 
Suppressed: java.lang.ClassNotFoundException: com.facebook.internal.FacebookInitProvider
at java.lang.Class.classForName(Native Method)

at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 12 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available


Here is my Manifest.xml




android:name=".AppController"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">



android:name=".ARCameraActivity"
android:configChanges="orientation|screenSize"
android:screenOrientation="fullSensor" />
android:name=".RegistrationActivity"
android:screenOrientation="portrait" />
android:name=".LoginActivity"
android:screenOrientation="portrait" />

android:name=".SplashActivity"
android:screenOrientation="portrait">







android:name=".MenuActivity"
android:screenOrientation="portrait" />
android:name=".ScanAndDrawActivity"
android:screenOrientation="portrait" />
android:name=".GalleryActivity"
android:screenOrientation="portrait" />
android:name=".PdfKolamActivity"

android:screenOrientation="portrait" />

android:name=".BluetoothService"
android:enabled="true"
android:exported="true">






android:name=".MyScheduleReceiver"
android:enabled="true">






android:name=".BotDialogActivity"
android:launchMode="singleInstance"
android:noHistory="true"
android:theme="@style/Theme.AppCompat.Light.Translucent" />



android:name=".MyStartServiceReceiver" android:exported="true"/>


android:name=".services.AlarmService"
android:enabled="true">





android:name=".BootReceiver"

android:enabled="true">





android:name="com.facebook.FacebookContentProvider"
android:exported="true"/>




Here is my build.gradle:



apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {

applicationId "com.ignite.a01hw909350.kolamdemo"
minSdkVersion 17
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
aaptOptions {
noCompress 'KARMarker'
noCompress 'armodel'
}
repositories {
jcenter()
maven()

}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile project(':KudanAR1')
compile project(':eventbus-3.0.0')

compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.volley:volley:1.0.0'
compile 'com.scottyab:secure-preferences-lib:0.1.4'
compile 'com.jrummyapps:animated-svg-view:1.0.1'
compile 'me.zhanghai.android.materialprogressbar:library:1.3.0'
compile 'io.palaima:smoothbluetooth:0.1.0'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.afollestad.material-dialogs:core:0.9.3.0'
compile 'com.flurgle:camerakit:0.9.13'

compile 'com.github.zhukic:sectioned-recyclerview:1.0.0'
compile 'com.android.support:support-vector-drawable:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.prolificinteractive:material-calendarview:1.4.3'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:design:25.3.1'
compile 'com.github.barteksc:android-pdf-viewer:2.4.0'
compile 'org.rajawali3d:rajawali:1.1.668@aar'
compile 'com.tapadoo.android:alerter:1.0.8'
compile 'com.google.android.gms:play-services-location:10.0.1'

compile 'uk.co.chrisjenx:calligraphy:2.3.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
testCompile 'junit:junit:4.12'
}


Where is the problem coming from?

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...