storesafe / cordova-sqlite-storage

A Cordova/PhoneGap plugin to open and use sqlite databases on Android, iOS and Windows with HTML5/Web SQL API
Other
2.15k stars 716 forks source link

Version 0.7.11-dev Not Installing on Intel XDK #339

Closed writeosahon closed 8 years ago

writeosahon commented 9 years ago

hello @brodybits . Thanks for this plugin. I have been using it in my project for some months now (about 8 months) without issues. However, the latest update (0.7.11-dev) refused to install and build with my app. I am using Intel XDK with Cordova Android CLI 4.1.2 . Unfortunately, the Intel XDK doesn't provide a detailed log, it just indicates that it could not install your plugin. To test that the problem was from the latest update, I downloaded the previous version (0.7.10) from npm and my app was successfully built. Please, can you look into this. The changelog for this update just says "removed native Android lib from jar". I have no idea what exactly that means or why it should cause build errors. I appreciate the effort.

Thanks.

RyanESCO commented 9 years ago

I'm also having the same issue building in Intel XDK as @writeosahon. "Error: Plugin sqlitePlugin failed to install."

brodycj commented 9 years ago

Can you guys report which host OS (i.e. OSX, Windows, or Linux) you see this on?

RyanESCO commented 9 years ago

I'm using Windows 7.

writeosahon commented 9 years ago

@brodybits I'm using Windows 8.1.

brodycj commented 9 years ago

Please try it again. I just added the native Android libraries that were missing.

writeosahon commented 9 years ago

@brodybits Hello. I just tried the plugin again and your additions fixed it. The plugin now installs and builds correctly. Thanks for this.

ultralisk- commented 9 years ago

Running into a similar issue. Using AppGyver build services, the apk builds however upon opening, the app crashes immediately, logcat shows it can't find libsqlc-native-driver.so

Making AppGyver build using 1720b7f, the app works as expected.

I tried again using 2960afa above, app builds but crashes with the same error.

brodycj commented 9 years ago

@writeosahon happy to hear, thanks!

brodycj commented 9 years ago

@ultralisk- the native library is there in 2960afa, please try it with a fresh, new project. If it still does not work please post your sample app code and the logcat output thanks.

ultralisk- commented 9 years ago

Thanks for replying @brodybits. I've created a new test project using the appgyver supersonic/steroids default template, the new app crashes too when opened.

Code here: https://github.com/ultralisk-/steroidssqltest/blob/master/app/example/views/getting-started.html

For the Cordova plugin, I specify the 2960afa commit to build against

[
    {"source":"https://github.com/brodysoft/Cordova-SQLitePlugin.git#2960afa1b7d7475718f30f3c3fdb0cd09f110ab9"}
]

Here's the logcat when the app is opened

09-11 23:30:08.037: I/Timeline(1293): Timeline: Activity_launch_request id:com.sqltest.app time:12297491 09-11 23:30:08.037: I/ActivityManager(601): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.sqltest.app/com.appgyver.runtime.standalone.chromium.MainActivity (has extras)} from uid 10069 on display 0 09-11 23:30:08.043: V/WindowManager(601): addAppToken: AppWindowToken{979ce72 token=Token{366abf7d ActivityRecord{9b1f1d4 u0 com.sqltest.app/com.appgyver.runtime.standalone.chromium.MainActivity t701}}} to stack=1 task=701 at 0 09-11 23:30:08.046: V/WindowManager(601): Adding window Window{5265740 u0 Starting com.sqltest.app} at 9 of 14 (after Window{12f2035c u0 com.hello.scanner.test/com.appgyver.runtime.scanner.chromium.ScannedChromiumApplicationActivity}) 09-11 23:30:08.113: I/ActivityManager(601): Start proc 32091:com.sqltest.app/u0a108 for activity com.sqltest.app/com.appgyver.runtime.standalone.chromium.MainActivity 09-11 23:30:08.952: E/AndroidRuntime(32091): Process: com.sqltest.app, PID: 32091 09-11 23:30:08.952: E/AndroidRuntime(32091): java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.sqltest.app-1/base.apk"],nativeLibraryDirectories=[/data/app/com.sqltest.app-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libsqlc-native-driver.so" 09-11 23:30:08.954: W/ActivityManager(601): Force finishing activity 1 com.sqltest.app/com.appgyver.runtime.standalone.chromium.MainActivity 09-11 23:30:09.261: I/WindowManager(601): Screenshot max retries 4 of Token{366abf7d ActivityRecord{9b1f1d4 u0 com.sqltest.app/com.appgyver.runtime.standalone.chromium.MainActivity t701 f}} appWin=Window{5265740 u0 Starting com.sqltest.app} drawState=4 09-11 23:30:09.304: W/PackageManager(800): Failure retrieving resources for com.sqltest.app: Resource ID #0x0 09-11 23:30:09.762: W/ActivityManager(601): Activity pause timeout for ActivityRecord{9b1f1d4 u0 com.sqltest.app/com.appgyver.runtime.standalone.chromium.MainActivity t701 f} 09-11 23:30:14.688: I/ActivityManager(601): Process com.sqltest.app (pid 32091) has died

brodycj commented 9 years ago

@ultralisk- this is very strange. It seems to look for the native library in /data/app/com.sqltest.app-1/lib/arm but normally an ARM native library is in either armeabi or armeabi-v7a lib subdirectory.

Please raise a new issue since this issue is about a problem with the Intel XDK, which affected multiple people until I made the change. Please put all details, including which version worked, which version did not work, and the logcat output. I will have to research this one and cannot promise when I will have an answer. Until then you can continue to use 1720b7f and please report if you encounter any more issues.

brodycj commented 8 years ago

Intel XDK is no longer supported by this version since it does not honor the before_plugin_install hook.The supported solution is to use litehelpers / Cordova-sqlite-evcore-extbuild-free (available with GPL or commercial license options) or litehelpers / Cordova-sqlite-legacy-build-support (limited testing, limited updates).