I had created a Phonegap android project in which I am trying to read a QRCode.For that I had included the library project Of BarcodeScanner from here https://github.com/wildabeast/BarcodeScanner .
But while I am trying to add this library to my PhoneGap Project , Initially it shows green symbol but after that it turns in red cross.
I think because of that I am getting this log in Logcat :
05-1512:48:37.489:D/DroidGap(863):onMessage(onPageFinished,file:///android_asset/www/index.html)
05-15 12:48:37.749: D/CordovaNetworkManager(863): Connection Type: 3g
05-15 12:48:37.749: D/DroidGap(863): onMessage(networkconnection,3g)
05-15 12:48:37.758: D/CordovaNetworkManager(863): Connection Type: 3g
05-15 12:48:37.768: D/DroidGap(863): onMessage(spinner,stop)
05-15 12:48:38.138: D/dalvikvm(863): GC_FOR_ALLOC freed 222K, 4% free 8166K/8455K, paused 40ms, total 43ms
05-15 12:48:39.579: D/DroidGap(863): onMessage(spinner,stop)
05-15 12:48:42.718: I/Choreographer(863): Skipped 30 frames! The application may be doing too much work on its main thread.
05-15 12:48:44.508: D/CordovaLog(863): Uncaught module cordova/plugin/BarcodeScanner not found
05-15 12:48:44.508: E/Web Console(863): Uncaught module cordova/plugin/BarcodeScanner not found at file:///android_asset/www/cordova-2.6.0.js:50
So I got stuck here.Any suggestion ?
Related
I've created an application in React Native that works fine in iOS. I've copied the code over to the Android portion of it, and separated out the platform-specific components. When I hit a certain component, the app crashes with an "Unfortunately has stopped".
There are no logs, no error in the console, nothing. What do I look for and where can I look? Logs? Somewhere in code?
In ~/genymotion-log/Google Nexus 6<...>-logcat.txt, I see the following:
05-15 23:50:14.379 D/OpenGLRenderer( 620): Use EGL_SWAP_BEHAVIOR_PRESERVED: true
05-15 23:50:14.380 D/Atlas ( 620): Validating map...
05-15 23:50:14.429 I/OpenGLRenderer( 620): Initialized EGL, version 1.4
05-15 23:50:14.429 D/ ( 620): HostConnection::get() New Host Connection established 0xaf31ca40, tid 1876
05-15 23:50:14.463 D/OpenGLRenderer( 620): Enabling debug mode 0
05-15 23:50:14.489 W/EGL_emulation( 620): eglSurfaceAttrib not implemented
05-15 23:50:14.490 W/OpenGLRenderer( 620): Failed to set EGL_SWAP_BEHAVIOR on surface 0x9e45dfc0, error=EGL_SUCCESS
05-15 23:50:14.490 W/EGL_emulation( 941): eglSurfaceAttrib not implemented
05-15 23:50:14.490 W/OpenGLRenderer( 941): Failed to set EGL_SWAP_BEHAVIOR on surface 0xb43e44a0, error=EGL_SUCCESS
05-15 23:50:14.952 I/ActivityManager( 620): Killing 1492:com.android.onetimeinitializer/u0a10 (adj 15): empty #17
05-15 23:50:15.219 W/OpenGLRenderer( 941): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
05-15 23:50:15.440 W/ResourceType( 724): No package identifier when getting value for resource number 0x00000000
05-15 23:50:15.442 W/PackageManager( 724): Failure retrieving resources for com.bidsmart: Resource ID #0x0
05-15 23:50:18.400 W/AudioTrack( 620): AUDIO_OUTPUT_FLAG_FAST denied by client
05-15 23:50:18.424 I/Process ( 1805): Sending signal. PID: 1805 SIG: 9
05-15 23:50:18.463 D/OpenGLRenderer( 620): endAllStagingAnimators on 0xa1a6f780 (RippleDrawable) with handle 0xaf3be470
05-15 23:50:18.468 I/ActivityManager( 620): Process com.bidsmart (pid 1805) has died
05-15 23:50:18.472 W/InputMethodManagerService( 620): Got RemoteException sending setActive(false) notification to pid 1805 uid 10061
No fix, but the reason is I'm pushing too much data from the server to the client. Once I ran adb logcat, I got this:
java.lang.OutOfMemoryError: Failed to allocate a 2470012 byte allocation with 48508 free bytes and 47KB until OOM.
Turns out I'm pushing my images over and over to the client until it breaks. iOS can handle it but RN can't.
Link to StackOverflow related thread: Android:java.lang.OutOfMemoryError: Failed to allocate a 23970828 byte allocation with 2097152 free bytes and 2MB until OOM
This is interesting and weird issue.
First I created Cordova project locally. I'm not using Bd.
using
cordova create test com.test.project.story "Test"
Which worked successfully!
Then I added android platform, using
cordova platform add android
Worked successfully.
Then I built the project using
cordova build
Worked, again.
I opened the project from Eclipse and ran it on emulator.
Worked properly.
Then I thought of adding some plugins in my project using
cordova plugin add org.apache.cordova.file
cordova plugin add org.apache.cordova.media
Removed the android platform and added the platform again. Then built and ran the project on emulator.
The screen was stuck on Connecting to device forever.
I rechecked if I was using the correct cordova.js for android platform.
It is correct, and it says
// Platform: android
// 3.5.0
Checked ADB log and there are a lot of suspicious things going on.
D/CordovaWebViewClient( 1581): onPageFinished(file:///android_asset/www/index.html)
D/CordovaActivity( 1581): onMessage(onPageFinished,file:///android_asset/www/index.html)
D/CordovaActivity( 1581): onMessage(spinner,stop)
D/TilesManager( 1581): new EGLContext from framework: 2a1a2a10
D/GLWebViewState( 1581): Reinit shader
D/dalvikvm( 270): GC_CONCURRENT freed 322K, 46% free 9831K/17991K, paused 813ms+21ms, total 2252ms
D/dalvikvm( 270): WAIT_FOR_CONCURRENT_GC blocked 906ms
D/GLWebViewState( 1581): Reinit transferQueue
W/ApplicationContext( 1581): Unable to create external files directory
D/ ( 1581): HostConnection::get() New Host Connection established 0x4a5f8558, tid 1605
E/PluginManager( 1581): Uncaught exception from plugin
E/PluginManager( 1581): java.lang.NullPointerException
E/PluginManager( 1581): at org.apache.cordova.file.FileUtils.requestAllPaths(FileUtils.java:866)
E/PluginManager( 1581): at org.apache.cordova.file.FileUtils.execute(FileUtils.java:348)
E/PluginManager( 1581): at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:65)
E/PluginManager( 1581): at org.apache.cordova.PluginManager.execHelper(PluginManager.java:242)
E/PluginManager( 1581): at org.apache.cordova.PluginManager.exec(PluginManager.java:227)
E/PluginManager( 1581): at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
E/PluginManager( 1581): at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:227)
E/PluginManager( 1581): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:655)
E/PluginManager( 1581): at android.os.Handler.dispatchMessage(Handler.java:99)
E/PluginManager( 1581): at android.os.Looper.loop(Looper.java:137)
E/PluginManager( 1581): at android.app.ActivityThread.main(ActivityThread.java:4745)
E/PluginManager( 1581): at java.lang.reflect.Method.invokeNative(Native Method)
E/PluginManager( 1581): at java.lang.reflect.Method.invoke(Method.java:511)
E/PluginManager( 1581): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/PluginManager( 1581): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/PluginManager( 1581): at dalvik.system.NativeStart.main(Native Method)
D/dalvikvm( 270): GC_FOR_ALLOC freed 593K, 48% free 9509K/17991K, paused 275ms, total 280ms
I/dalvikvm-heap( 270): Grow heap (frag case) to 10.559MB for 1286224-byte allocation
D/dalvikvm( 270): GC_FOR_ALLOC freed 2K, 41% free 10763K/17991K, paused 182ms, total 186ms
D/dalvikvm( 270): GC_CONCURRENT freed 61K, 38% free 11284K/17991K, paused 41ms+11ms, total 304ms
D/CordovaActivity( 1581): onMessage(spinner,stop)
D/dalvikvm( 270): GC_CONCURRENT freed 2676K, 43% free 10293K/17991K, paused 16ms+29ms, total 130ms
D/CordovaLog( 1581): file:///android_asset/www/cordova.js: Line 1154 : deviceready has not fired after 5 seconds.
I/Web Console( 1581): deviceready has not fired after 5 seconds. at file:///android_asset/www/cordova.js:1154
D/CordovaLog( 1581): file:///android_asset/www/cordova.js: Line 1147 : Channel not fired: onFileSystemPathsReady
I/Web Console( 1581): Channel not fired: onFileSystemPathsReady at file:///android_asset/www/cordova.js:1147
E/ThrottleService( 149): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
D/dalvikvm( 251): GC_CONCURRENT freed 384K, 9% free 6556K/7175K, paused 7ms+5ms, total 67ms
D/dalvikvm( 251): GC_CONCURRENT freed 384K, 9% free 6556K/7175K, paused 6ms+13ms, total 62ms
I/EventLogService( 240): Aggregate from 1403981475023 (log), 1403981475023 (data)
E/ThrottleService( 149): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
What's going on here?
UPDATE:
Works fine on iOS.
I ran into the same issue.
What worked for me was using a different version of the File plugin found here:
https://github.com/onflapp/cordova-plugin-file
Related topic: Cordova File plugin never becomes ready in Android
for me it got solved by adding cordova.js in index.html( though its not required in ripple)
<script src="cordova.js"></script>
I ran into the same and resolved using apache official dev build File plugin:
https://github.com/apache/cordova-plugin-file/
Funny enough cordova release 1.3.1-dev is more stable then official release 1.2.0 ...
By now a newer version of the file plugin has been released. You should no longer experience the issue with the updated version (and there is thus no longer a need to downgrade).
I had a similar issue. deviceReady event was not firing (ionic app on android). Worked after I removed the file plugin v1.2 and then added v1.1 instead.
I have installed ubuntu 12.04(64bit) and intelliJ 11.1.2 and Android SDK (2.3.3 with google api) and when I try to run my app on a real device from intelliJ it won't run it. Actually I can see my device in running device dialog box but I only get following error:
06-24 22:02:10.370: DEBUG/dalvikvm(12081): GC_EXPLICIT freed 204K, 38% free 5743K/9223K, external 0K/512K, paused 79ms
06-24 22:03:24.372: DEBUG/AndroidRuntime(14169): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
06-24 22:03:24.372: INFO/AndroidRuntime(14169): Heap size: -Xmx32m
06-24 22:03:24.372: DEBUG/AndroidRuntime(14169): CheckJNI is OFF
06-24 22:03:24.372: DEBUG/dalvikvm(14169): creating instr width table
06-24 22:03:24.603: DEBUG/AndroidRuntime(14169): Calling main entry com.android.commands.pm.Pm
06-24 22:03:24.663: DEBUG/dalvikvm(13730): GC_EXPLICIT freed 10K, 51% free 2686K/5379K, external 0K/0K, paused 31ms
06-24 22:03:24.663: WARN/ActivityManager(172): No content provider found for:
06-24 22:03:24.673: DEBUG/PackageParser(172): Scanning package: /data/app/vmdl-795727220.tmp
06-24 22:03:24.673: WARN/ActivityManager(172): No content provider found for:
06-24 22:03:24.793: DEBUG/dalvikvm(172): GC_EXPLICIT freed 361K, 56% free 5933K/13255K, external 35K/547K, paused 82ms
06-24 22:03:24.823: DEBUG/AndroidRuntime(14169): Shutting down VM
06-24 22:03:24.823: DEBUG/dalvikvm(14169): GC_CONCURRENT freed 215K, 71% free 306K/1024K, external 0K/0K, paused 1ms+0ms
but in other side I can run the same application using eclipse with the same android sdk configuration.
I think something is not fine with intelliJ or I mis-config something on intelliJ
my java SDK :
open-java-amd64 1.6
sun-java-1.6 32bit
I've been developing an NDK app for quite some time and it's been working well. However, today the app randomly decided to not start anymore, after I compiled it after making some nominal change. It's caused by a cryptic problem with loading the app's main library. Here's some log output:
08-11 18:38:11.220 D/dalvikvm( 1237): Added shared lib /mnt/asec/com.audia.rta-1/lib/libqtandroid.so 0x40513bd8
08-11 18:38:11.220 D/dalvikvm( 1237): No JNI_OnLoad found in /mnt/asec/com.audia.rta-1/lib/libqtandroid.so 0x40513bd8, skipping init
08-11 18:38:11.220 D/dalvikvm( 1237): Trying to load lib /mnt/asec/com.audia.rta-1/lib/librta.so 0x40513bd8
08-11 18:38:11.260 D/AndroidRuntime( 1237): Shutting down VM
08-11 18:38:11.260 W/dalvikvm( 1237): threadid=1: thread exiting with uncaught exception (group=0x40015560)
08-11 18:38:11.260 E/AndroidRuntime( 1237): FATAL EXCEPTION: main
08-11 18:38:11.260 E/AndroidRuntime( 1237): java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1311]: 67 cannot locate '_ZNSaIcEC1Ev'...
08-11 18:38:11.260 E/AndroidRuntime( 1237):
08-11 18:38:11.260 E/AndroidRuntime( 1237): at java.lang.Runtime.loadLibrary(Runtime.java:434)
08-11 18:38:11.260 E/AndroidRuntime( 1237): at java.lang.System.loadLibrary(System.java:554)
08-11 18:38:11.260 E/AndroidRuntime( 1237): at com.audia.rta.RTA.onCreate(RTA.java:139)
According to some Google results, _ZNSaIcEC1Ev is part of libstdc++. I've checked, and it gets linked in the build process, and g++ is being used for linking.
Oddly enough, reverting to an older apk of the app fixes the problem, but compiling an old revision and installing that doesn't fix the problem. Everything in my build system is checked into version control, and I've done several clean builds. All my builds were working today and then they just stopped working. I didn't upgrade or install anything; it happened while I was in the middle of testing new code. What happened?
Update: Building from a freshly checked out copy doesn't fix the problem.
Update 2: Is there any way I can track down the link to that symbol, maybe with objdump? Maybe this could provide some clues.
I ended up compiling everything with a fresh NDK install, and it worked. It's as if the old one was corrupted somehow, though I have no idea how.
It was also an upgrade from r5b to r6, so maybe it's related to the NDK version.
I have this peculiar issue where my app crashes with SIGSEGV error in my camera module occasionally. Using the Camera.PreviewCallback implementation the onPreviewFrame method does gets called around 8-10 times,before getting crashed with log trace as below :
07-22 12:37:34.981 5777-5777/com.example.surveyapp V/surfaceChanged﹕ entered
07-22 12:37:37.834 5777-5777/com.example.surveyapp V/surfaceChanged﹕ entered
07-22 12:37:40.056 5777-5777/com.example.surveyapp D/ProgressBar﹕ updateDrawableBounds: left = 0
07-22 12:37:40.056 5777-5777/com.example.surveyapp D/ProgressBar﹕ updateDrawableBounds: top = 0
07-22 12:37:40.056 5777-5777/com.example.surveyapp D/ProgressBar﹕ updateDrawableBounds: right = 64
07-22 12:37:40.056 5777-5777/com.example.surveyapp D/ProgressBar﹕ updateDrawableBounds: bottom = 64
07-22 12:37:40.126 5777-5777/com.example.surveyapp E/MainActivity﹕ onPreviewFrame
07-22 12:37:40.227 5777-5777/com.example.surveyapp E/MainActivity﹕ onPreviewFrame
07-22 12:37:40.387 5777-6254/com.example.surveyapp D/dalvikvm﹕ **GC_FOR_ALLOC freed 4059K, 28% free 12685K/17596K, paused 37ms, total 37ms**
07-22 12:37:40.387 5777-5777/com.example.surveyapp E/MainActivity﹕ onPreviewFrame
07-22 12:37:40.467 5777-5777/com.example.surveyapp E/MainActivity﹕ onPreviewFrame
07-22 12:37:40.647 5777-5788/com.example.surveyapp D/dalvikvm﹕ **GC_FOR_ALLOC freed 1364K, 31% free 12223K/17596K, paused 53ms, total 53ms**
07-22 12:37:40.647 5777-5786/com.example.surveyapp A/libc﹕ **Fatal signal 11 (SIGSEGV) at 0xd2044d4c (code=1), thread 5786 (FinalizerDaemon)**
This behaviour does not occur all the time,but whenever I login from my app and go into this Camera Module ,this error occurs.If I directly enter camera module from my DashBoard page this error does not occurs or If i run this camera module as standalone application no error occurs.
Note : I am also using native C code for encryption purpose in this app