android - ClassNotFoundException: Didn't find class on path: DexPathList -
i trying implement facebook login functionality on app . implementing code step step , testing on device .
till havenot put provide or activity got error after implementing code in manifest file , activity_main.xml
06-13 10:52:21.240 13451-13451/com.example.administrator.facebooklogin e/androidruntime﹕ fatal exception: main process: com.example.administrator.facebooklogin, pid: 13451 java.lang.runtimeexception: unable start activity componentinfo{com.example.administrator.facebooklogin/com.example.administrator.facebooklogin.mainactivity}: android.view.inflateexception: binary xml file line #12: error inflating class provider @ android.app.activitythread.performlaunchactivity(activitythread.java:2429) @ android.app.activitythread.handlelaunchactivity(activitythread.java:2493) @ android.app.activitythread.access$800(activitythread.java:166) @ android.app.activitythread$h.handlemessage(activitythread.java:1283) @ android.os.handler.dispatchmessage(handler.java:102) @ android.os.looper.loop(looper.java:136) @ android.app.activitythread.main(activitythread.java:5584) @ java.lang.reflect.method.invokenative(native method) @ java.lang.reflect.method.invoke(method.java:515) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1268) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:1084) @ dalvik.system.nativestart.main(native method) caused by: android.view.inflateexception: binary xml file line #12: error inflating class provider @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:714) @ android.view.layoutinflater.rinflate(layoutinflater.java:762) @ android.view.layoutinflater.inflate(layoutinflater.java:499) @ android.view.layoutinflater.inflate(layoutinflater.java:398) @ android.view.layoutinflater.inflate(layoutinflater.java:354) @ com.android.internal.policy.impl.phonewindow.setcontentview(phonewindow.java:331) @ android.app.activity.setcontentview(activity.java:2018) @ com.example.administrator.facebooklogin.mainactivity.oncreate(mainactivity.java:14) @ android.app.activity.performcreate(activity.java:5442) @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1094) @ android.app.activitythread.performlaunchactivity(activitythread.java:2393) at android.app.activitythread.handlelaunchactivity(activitythread.java:2493) at android.app.activitythread.access$800(activitythread.java:166) at android.app.activitythread$h.handlemessage(activitythread.java:1283) at android.os.handler.dispatchmessage(handler.java:102) at android.os.looper.loop(looper.java:136) at android.app.activitythread.main(activitythread.java:5584) at java.lang.reflect.method.invokenative(native method) at java.lang.reflect.method.invoke(method.java:515) at com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1268) at com.android.internal.os.zygoteinit.main(zygoteinit.java:1084) at dalvik.system.nativestart.main(native method) caused by: java.lang.classnotfoundexception: didn't find class "android.view.provider" on path: dexpathlist[[zip file "/data/app/com.example.administrator.facebooklogin-9.apk"],nativelibrarydirectories=[/data/app-lib/com.example.administrator.facebooklogin-9, /vendor/lib, /system/lib]] @ dalvik.system.basedexclassloader.findclass(basedexclassloader.java:56) @ java.lang.classloader.loadclass(classloader.java:497) @ java.lang.classloader.loadclass(classloader.java:457) @ android.view.layoutinflater.createview(layoutinflater.java:566) @ android.view.layoutinflater.oncreateview(layoutinflater.java:659) @ com.android.internal.policy.impl.phonelayoutinflater.oncreateview(phonelayoutinflater.java:66) @ android.view.layoutinflater.oncreateview(layoutinflater.java:676) @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:701) at android.view.layoutinflater.rinflate(layoutinflater.java:762) at android.view.layoutinflater.inflate(layoutinflater.java:499) at android.view.layoutinflater.inflate(layoutinflater.java:398) at android.view.layoutinflater.inflate(layoutinflater.java:354) at com.android.internal.policy.impl.phonewindow.setcontentview(phonewindow.java:331) at android.app.activity.setcontentview(activity.java:2018) at com.example.administrator.facebooklogin.mainactivity.oncreate(mainactivity.java:14) at android.app.activity.performcreate(activity.java:5442) at android.app.instrumentation.callactivityoncreate(instrumentation.java:1094) at android.app.activitythread.performlaunchactivity(activitythread.java:2393) at android.app.activitythread.handlelaunchactivity(activitythread.java:2493) at android.app.activitythread.access$800(activitythread.java:166) at android.app.activitythread$h.handlemessage(activitythread.java:1283) at android.os.handler.dispatchmessage(handler.java:102) at android.os.looper.loop(looper.java:136) at android.app.activitythread.main(activitythread.java:5584) at java.lang.reflect.method.invokenative(native method) at java.lang.reflect.method.invoke(method.java:515) at com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1268) at com.android.internal.os.zygoteinit.main(zygoteinit.java:1084) at dalvik.system.nativestart.main(native method)
androidmanifest.xml
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.administrator.facebooklogin" > <uses-permission android:name="android.permission.camera" /> <uses-permission android:name="android.permission.vibrate" /> <uses-permission android:name="android.permission.bluetooth" /> <uses-permission android:name="android.permission.bluetooth_admin" /> <uses-permission android:name="android.permission.system_alert_window" /> <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.network" /> <uses-permission android:name="android.permission.get_accounts" /> <uses-permission android:name="android.permission.use_credentials" /> <uses-permission android:name="android.permission.access_network_state" /> <uses-permission android:name="android.permission.access_network_state" /> <uses-permission android:name="android.permission.read_phone_state" /> <uses-permission android:name="android.permission.get_tasks" /> <uses-permission android:name="android.permission.call_phone" /> <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="com.google.android.providers.gsf.permission.read_gservices" /> <!-- external storage caching. --> <uses-permission android:name="android.permission.write_external_storage" /> <!-- location --> <uses-permission android:name="android.permission.access_coarse_location" /> <uses-permission android:name="android.permission.access_fine_location" /> <uses-permission android:name="org.aviktech.parkender.permission.c2d_message" /> <uses-permission android:name="com.google.android.c2dm.permission.receive" /> <uses-feature android:name="android.hardware.bluetooth_le" android:required="true" /> <uses-feature android:name="android.hardware.camera" android:required="false" /> <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" /> <permission android:name="org.aviktech.parkender.permission.maps_receive" android:protectionlevel="signature" /> <application android:allowbackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" > <activity android:name=".mainactivity" android:label="@string/app_name" > android:windowsoftinputmode="adjustnothing" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <uses-sdk android:minsdkversion="22" android:targetsdkversion="22" /> <meta-data android:name="com.facebook.sdk.applicationid" android:value="@string/app_id" /> </application> </manifest>
activity_main.xml
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" android:paddingbottom="@dimen/activity_vertical_margin" tools:context=".mainactivity"> <textview android:text="@string/hello_world" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </relativelayout>
my string.xml
<resources> <string name="app_name">facebooklogin</string> <string name="hello_world">hello world!</string> <string name="action_settings">settings</string> </resources>
change manifest file to:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.administrator.facebooklogin" > <uses-sdk android:minsdkversion="22" android:targetsdkversion="22" /> <uses-permission android:name="android.permission.camera" /> <uses-permission android:name="android.permission.vibrate" /> <uses-permission android:name="android.permission.bluetooth" /> <uses-permission android:name="android.permission.bluetooth_admin" /> <uses-permission android:name="android.permission.system_alert_window" /> <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.network" /> <uses-permission android:name="android.permission.get_accounts" /> <uses-permission android:name="android.permission.use_credentials" /> <uses-permission android:name="android.permission.access_network_state" /> <uses-permission android:name="android.permission.access_network_state" /> <uses-permission android:name="android.permission.read_phone_state" /> <uses-permission android:name="android.permission.get_tasks" /> <uses-permission android:name="android.permission.call_phone" /> <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="com.google.android.providers.gsf.permission.read_gservices" /> <!-- external storage caching. --> <uses-permission android:name="android.permission.write_external_storage" /> <!-- location --> <uses-permission android:name="android.permission.access_coarse_location" /> <uses-permission android:name="android.permission.access_fine_location" /> <uses-permission android:name="org.aviktech.parkender.permission.c2d_message" /> <uses-permission android:name="com.google.android.c2dm.permission.receive" /> <uses-feature android:name="android.hardware.bluetooth_le" android:required="true" /> <uses-feature android:name="android.hardware.camera" android:required="false" /> <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" /> <permission android:name="org.aviktech.parkender.permission.maps_receive" android:protectionlevel="signature" /> <application android:allowbackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" > <activity android:name=".mainactivity" android:label="@string/app_name" > android:windowsoftinputmode="adjustnothing" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <meta-data android:name="com.facebook.sdk.applicationid" android:value="@string/app_id" /> </application> </manifest>
Comments
Post a Comment