android.content.res.Resources$NotFoundException: Resource ID #0x0 -
i following steps fetch data linkedin. getting error:
04-25 15:19:09.516 3078-3078/app.plusconnect.com.linkedindummy e/androidruntime﹕ fatal exception: main android.content.res.resources$notfoundexception: resource id #0x0
public class mainactivity extends actionbaractivity { //declaration socialauthadapter adapter; button linkedin_button; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); adapter = new socialauthadapter(new responselistener()); linkedin_button = (button)findviewbyid(r.id.submitbutton); linkedin_button.setbackgroundresource(r.mipmap.linkedin); linkedin_button.setonclicklistener(new view.onclicklistener() { public void onclick(view v) { adapter.authorize(mainactivity.this, provider.linkedin); } }); } public class responselistener implements dialoglistener { @override public void oncomplete(bundle bundle) { adapter.getuserprofileasync(new profiledatalistener()); } @override public void onerror(socialautherror socialautherror) { } @override public void oncancel() { } @override public void onback() { } } public class profiledatalistener implements socialauthlistener<profile> { @override public void onexecute(string s, profile profile) { log.d("custom-ui", "receiving data"); profile profilemap = profile; log.d("custom-ui", "validate id = " + profilemap.getvalidatedid()); log.d("custom-ui", "first name = " + profilemap.getfirstname()); log.d("custom-ui", "last name = " + profilemap.getlastname()); log.d("custom-ui", "email = " + profilemap.getemail()); log.d("custom-ui", "country = " + profilemap.getcountry()); log.d("custom-ui", "language = " + profilemap.getlanguage()); log.d("custom-ui", "location = " + profilemap.getlocation()); log.d("custom-ui", "profile image url = " + profilemap.getprofileimageurl()); } @override public void onerror(socialautherror socialautherror) { } } }
this layout file
<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:id="@+id/textmessage" android:padding="20dp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerhorizontal="true" android:layout_centervertical="true" android:text="test connect application fetch profile details linkedin account."/> <!-- submit button --> <button android:id="@+id/submitbutton" android:layout_width="200dp" android:layout_height="40dp" android:layout_marginbottom="20dp" android:background="@android:color/holo_blue_dark" android:text="fetch linkedin" android:textcolor="@android:color/white" android:layout_alignparentbottom="true" android:layout_centerhorizontal="true"/>
i getting following error in logcat:
04-25 15:19:09.456 3078-3078/app.plusconnect.com.linkedindummy w/resourcetype﹕ no package identifier when getting value resource number 0x00000000 04-25 15:19:09.477 3078-3078/app.plusconnect.com.linkedindummy w/dalvikvm﹕ threadid=1: thread exiting uncaught exception (group=0x409c01f8) 04-25 15:19:09.516 3078-3078/app.plusconnect.com.linkedindummy e/androidruntime﹕ fatal exception: main android.content.res.resources$notfoundexception: resource id #0x0 @ android.content.res.resources.getvalue(resources.java:1018) @ android.content.res.resources.getdrawable(resources.java:663) @ org.brickred.socialauth.android.socialauthdialog.setuptitle(socialauthdialog.java:191) @ org.brickred.socialauth.android.socialauthdialog.oncreate(socialauthdialog.java:146) @ android.app.dialog.dispatchoncreate(dialog.java:353) @ android.app.dialog.show(dialog.java:257) @ org.brickred.socialauth.android.socialauthadapter$4$1.run(socialauthadapter.java:649) @ android.os.handler.handlecallback(handler.java:605) @ android.os.handler.dispatchmessage(handler.java:92) @ android.os.looper.loop(looper.java:137) @ android.app.activitythread.main(activitythread.java:4424) @ java.lang.reflect.method.invokenative(native method) @ java.lang.reflect.method.invoke(method.java:511) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:784) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:551) @ dalvik.system.nativestart.main(native method)
where problem? can please?
socialauth
requires image in drawable
folder every service want integrate.
you don't have these images, , socialauth
crash when try load image. resolve issue put image (e.g. linkedin.png, twitter.png, facebook.png) every service want use drawable
folder.
Comments
Post a Comment