Phonegap Android facebook plugin crashes - android

I am getting the error below when I try to login through facebook plugin for Android.
The app basically crashes "stopped", Any ideas will be appreciated.
ERROR/AndroidRuntime(2008): FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to resume activity {xxx/com.facebook.LoginActivity}: android.content.res.Resources$NotFoundException: String resource ID #0x7f060012
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2742)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2771)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2235)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5039)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x7f060012
at android.content.res.Resources.getText(Resources.java:230)
at android.content.res.Resources.getString(Resources.java:314)
at android.content.Context.getString(Context.java:327)
at com.facebook.widget.WebDialog.onCreate(WebDialog.java:189)
at android.app.Dialog.dispatchOnCreate(Dialog.java:355)
at android.app.Dialog.show(Dialog.java:260)
at com.facebook.AuthorizationClient$WebViewAuthHandler.tryAuthorize(AuthorizationClient.java:471)
at com.facebook.AuthorizationClient.tryCurrentHandler(AuthorizationClient.java:214)
at com.facebook.AuthorizationClient.tryNextHandler(AuthorizationClient.java:193)
at com.facebook.AuthorizationClient.authorize(AuthorizationClient.java:121)
at com.facebook.AuthorizationClient.startOrContinueAuth(AuthorizationClient.java:102)
at com.facebook.LoginActivity.onResume(LoginActivity.java:113)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1185)
at android.app.Activity.performResume(Activity.java:5182)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2732)
... 12 more

i kinda resolved it, i deleted the app_id string. turns out facebook plugin doesn't use that.

Related

Error APK when built with key store

My app run very good when built test but when build it with keystore and run my app it force close and show error
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException
at tuannt.appweather.f.f.a(Unknown Source)
at tuannt.appweather.e.a.a(Unknown Source)
at tuannt.appweather.e.a.onPostExecute(Unknown Source)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5162)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:744)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
What happened with my apk?

Cordova hello world app crashing

I am new in Android Development. I am working on cordova platform
I have created a sample hello world app and getting this error when i am trying to open it in genymotion. ALthough the app compile succesfully but when i run it in genymotion it just shows the prompt with text "Unfortunately "APP" has stopped."
The Error log shows.
01-12 08:16:04.867 2073-2073/com.technoserves.crudnew D/dalvikvm﹕ Late-enabling CheckJNI
01-12 08:16:06.107 2073-2073/com.technoserves.crudnew W/dalvikvm﹕ Unable to resolve superclass of Lcom/technoserves/crudnew/CordovaApp; (14)
01-12 08:16:06.119 2073-2073/com.technoserves.crudnew W/dalvikvm﹕ Link of class 'Lcom/technoserves/crudnew/CordovaApp;' failed
01-12 08:16:06.135 2073-2073/com.technoserves.crudnew D/AndroidRuntime﹕ Shutting down VM
01-12 08:16:06.135 2073-2073/com.technoserves.crudnew W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0xa6142908)
01-12 08:16:06.155 2073-2073/com.technoserves.crudnew E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.technoserves.crudnew/com.technoserves.crudnew.CordovaApp}: java.lang.ClassNotFoundException: Didn't find class "com.technoserves.crudnew.CordovaApp" on path: /data/app/com.technoserves.crudnew-1.apk
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.technoserves.crudnew.CordovaApp" on path: /data/app/com.technoserves.crudnew-1.apk
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
            at android.app.ActivityThread.access$600(ActivityThread.java:141)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:5041)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
            at dalvik.system.NativeStart.main(Native Method)
01-12 08:16:22.399 2073-2073/com.technoserves.crudnew I/Process﹕ Sending signal. PID: 2073 SIG: 9
I have updated my cordova to resolve but still same error however a few days ago it was working fine and i have build some apps.
First download Cordova jar file from following link:
http://www.java2s.com/Code/JarDownload/cordova/cordova-1.8.1.jar.zip
after that extract the folder and put cordova-1.8.1 inside your libs folder of project in eclipse
And right click on your project--> properties and Select Android from left pane and scroll to bottom remove the cordova library if added.
then clean and build your project.

Having issues integrating Scandit SDK into my app

Decided to use Scandit SDK to get the barcode scanning feature in my app. Unfortunately, since I'm relatively new to Android development and Java in general I've run into a few issues that I can't seem to work out. The demo that Scandit provided doesn't give any errors(runs fine) but crashes when I try to start it up (pressing a button from one activity is meant to start it up). I've tried reading the logcat and googling a solution to the problems but I'm not getting the right solutions. Does anyone have an idea of what I'm doing wrong?
Logcat is provided below:
10-08 23:30:00.807 21563-21563/com.kwesimbia.management D/AndroidRuntime? Shutting down VM
10-08 23:30:00.807 21563-21563/com.kwesimbia.management W/dalvikvm? threadid=1: thread exiting with uncaught exception (group=0x40aa4228)
10-08 23:30:00.817 21563-21563/com.kwesimbia.management E/AndroidRuntime? FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:3082)
at android.view.View.performClick(View.java:3549)
at android.view.View$PerformClick.run(View.java:14393)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3077)
at android.view.View.performClick(View.java:3549)
at android.view.View$PerformClick.run(View.java:14393)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: com.kwesimbia.management.ScanditSDKDemoSimple
at com.kwesimbia.management.Activity_D.initiateCodeScan(Activity_D.java:63)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3077)
at android.view.View.performClick(View.java:3549)
at android.view.View$PerformClick.run(View.java:14393)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
10-08 23:30:00.817 32726-587/? E/EmbeddedLogger? App crashed!
Process: com.kwesimbia.management
10-08 23:30:00.817 32726-587/? E/EmbeddedLogger? App crashed!
Package: com.kwesimbia.management v1 (1.0)
10-08 23:30:00.817 32726-587/? E/EmbeddedLogger?
Application Label: firstapp
10-08 23:30:00.827 32726-587/? W/ActivityManager?
Force finishing activity com.kwesimbia.management/.Activity_D
I came across this problem as well, my solution was to extract the library files and put them as their files in the lib folder
The library basically isn't being exported with it
EDIT
So I checked out my project, basically I did these things:
In the libs folder I have a new folder called armeabi and inside that I have libscanditsdk-android-3.3.1.so
Then in my build path I have also referenced the jar file that they provide:
<classpathentry exported="true" kind="lib" path="C:/GIT/Android/FwayScannerProject/FwayScanner/libs/scanditsdk-barcodepicker-android-3.3.1.jar"/>

Spinner on an ActionBar issue on a Dialog Activity

Hi I have an activity that shows a dialog form an standard layout.
android:theme="#android:style/Theme.Holo.Light.Dialog"/>
I was trying to add a simple spinner to the actionbar but I am having issues and error in the line getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST).
When I change my theme to a common activity it works perfect.
This are the errors showed by the logcat:
3114-3114/org.PeteProto E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.PeteProto/org.PeteProto.Detail}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5039)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at org.PeteProto.Detail.onCreate(Detail.java:30)
at android.app.Activity.performCreate(Activity.java:5104)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
... 11 more

Project compiles successfully, but I get exception about missing drawable

I had my project running in Eclipse, I tried converting it to Android Studio. However, I also downloaded (via github) the latest HoloEverywhere library, and updated contrib/ with ActionBarSherlock library ( I use them both ).
Everything compiles successfully, but when starting the first activity, I get the following exceptions:
06-18 10:57:22.611 2190-2190/com.wasp.androidbg E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wasp.androidbg/com.wasp.androidbg.StartScreen}: android.content.res.Resources$NotFoundException: File res/drawable/list_selector_holo_light.xml from drawable resource ID #0x7f02013f
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5039)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/list_selector_holo_light.xml from drawable resource ID #0x7f02013f
at org.holoeverywhere.drawable.DrawableCompat.loadDrawable(DrawableCompat.java:138)
at org.holoeverywhere.drawable.DrawableCompat.getDrawable(DrawableCompat.java:107)
at org.holoeverywhere.widget.ListView.setSelector(ListView.java:964)
at com.wasp.androidbg.StartScreen.onCreate(StartScreen.java:76)
at android.app.Activity.performCreate(Activity.java:5104)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
... 11 more
Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1c/d=0x0 a=2 r=0x7f090011}
at org.holoeverywhere.drawable.DrawableCompat.loadDrawable(DrawableCompat.java:128)
at org.holoeverywhere.drawable.DrawableCompat.getDrawable(DrawableCompat.java:107)
at org.holoeverywhere.drawable.StateListDrawable.inflate(StateListDrawable.java:194)
at org.holoeverywhere.drawable.DrawableCompat.createFromXmlInner(DrawableCompat.java:87)
at org.holoeverywhere.drawable.DrawableCompat.createFromXml(DrawableCompat.java:63)
at org.holoeverywhere.drawable.DrawableCompat.loadDrawable(DrawableCompat.java:135)
... 17 more
06-18 11:04:20.118 2257-2257/com.wasp.androidbg D/dalvikvm: Not late-enabling CheckJNI (already on)
06-18 11:04:20.347 2257-2257/com.wasp.androidbg E/Trace: error opening trace file: No such file or directory (2)
I don't have any custom themes (yet). I double checked the .apk file, and the file exists, but is named abs__list_selector_holo_light.xml - it does have prefix abs__.
I searched but there are no configurations in HoloEverywhere, which use this prefix, or any way to configure it.
Any help appreciated!

Categories

Resources