Resources$NotFoundException is thrown by Integrating Facebook-android-sdk-3.0 -
i'm trying integrate facebook within app. clicked on fbphoto
throws error android.content.res.resources$notfoundexception
. know throws error proper resource not founding @ runtime.
found out error thrown @ facebook.authorize(this, new string[] { "email", "publish_stream"}, new dialoglistener() {}
. root cause still missing.
fbphoto.setonclicklistener(new view.onclicklistener() { @override public void onclick(view arg0) { // todo auto-generated method stub logintofacebook(); } }); public void logintofacebook() { if(!facebook.issessionvalid()) { facebook.authorize(this, new string[] { "email", "publish_stream"}, new dialoglistener() { }); }
02-08 02:57:58.236: e/androidruntime(1582): fatal exception: main 02-08 02:57:58.236: e/androidruntime(1582): android.content.res.resources$notfoundexception: string resource id #0x7f050011 02-08 02:57:58.236: e/androidruntime(1582): @ android.content.res.resources.gettext(resources.java:201) 02-08 02:57:58.236: e/androidruntime(1582): @ android.content.res.resources.getstring(resources.java:254) 02-08 02:57:58.236: e/androidruntime(1582): @ android.content.context.getstring(context.java:183) 02-08 02:57:58.236: e/androidruntime(1582): @ com.facebook.widget.webdialog.oncreate(webdialog.java:188) 02-08 02:57:58.236: e/androidruntime(1582): @ android.app.dialog.dispatchoncreate(dialog.java:307) 02-08 02:57:58.236: e/androidruntime(1582): @ android.app.dialog.show(dialog.java:225) 02-08 02:57:58.236: e/androidruntime(1582): @ com.facebook.authorizationclient$webviewauthhandler.tryauthorize(authorizationclient.java:462) 02-08 02:57:58.236: e/androidruntime(1582): @ com.facebook.authorizationclient.trycurrenthandler(authorizationclient.java:210) 02-08 02:57:58.236: e/androidruntime(1582): @ com.facebook.authorizationclient.trynexthandler(authorizationclient.java:189) 02-08 02:57:58.236: e/androidruntime(1582): @ com.facebook.authorizationclient.authorize(authorizationclient.java:117) 02-08 02:57:58.236: e/androidruntime(1582): @ com.facebook.authorizationclient.startorcontinueauth(authorizationclient.java:98) 02-08 02:57:58.236: e/androidruntime(1582): @ com.facebook.session.trylegacyauth(session.java:1096) 02-08 02:57:58.236: e/androidruntime(1582): @ com.facebook.session.authorize(session.java:893) 02-08 02:57:58.236: e/androidruntime(1582): @ com.facebook.session.open(session.java:957) 02-08 02:57:58.236: e/androidruntime(1582): @ com.facebook.session.openforpublish(session.java:415) 02-08 02:57:58.236: e/androidruntime(1582): @ com.facebook.android.facebook.opensession(facebook.java:319) 02-08 02:57:58.236: e/androidruntime(1582): @ com.facebook.android.facebook.authorize(facebook.java:313) 02-08 02:57:58.236: e/androidruntime(1582): @ com.facebook.android.facebook.authorize(facebook.java:149) 02-08 02:57:58.236: e/androidruntime(1582): @ com.example.splashscreen.secondscreen.logintofacebook(secondscreen.java:110) 02-08 02:57:58.236: e/androidruntime(1582): @ com.example.splashscreen.secondscreen$1.onclick(secondscreen.java:73) 02-08 02:57:58.236: e/androidruntime(1582): @ android.view.view.performclick(view.java:2485) 02-08 02:57:58.236: e/androidruntime(1582): @ android.view.view$performclick.run(view.java:9080) 02-08 02:57:58.236: e/androidruntime(1582): @ android.os.handler.handlecallback(handler.java:587) 02-08 02:57:58.236: e/androidruntime(1582): @ android.os.handler.dispatchmessage(handler.java:92) 02-08 02:57:58.236: e/androidruntime(1582): @ android.os.looper.loop(looper.java:123) 02-08 02:57:58.236: e/androidruntime(1582): @ android.app.activitythread.main(activitythread.java:3683) 02-08 02:57:58.236: e/androidruntime(1582): @ java.lang.reflect.method.invokenative(native method) 02-08 02:57:58.236: e/androidruntime(1582): @ java.lang.reflect.method.invoke(method.java:507) 02-08 02:57:58.236: e/androidruntime(1582): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:839) 02-08 02:57:58.236: e/androidruntime(1582): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:597) 02-08 02:57:58.236: e/androidruntime(1582): @ dalvik.system.nativestart.main(native method)
any help appreciated!!
from stacktrace, error caused line :
spinner.setmessage(getcontext().getstring(r.string.com_facebook_loading));
source code here
the resource correctly defined in res/values/string.xml
obviously, error not in facebook-android-sdk.
i guess there probem project setup. can follow guide setup project properly.
android facebook-android-sdk android-resources
No comments:
Post a Comment