Closed cesine closed 11 years ago
05-01 13:06:30.704: E/TDDatabase(15661): Exception in TDRouter
05-01 13:06:30.704: E/TDDatabase(15661): java.lang.reflect.InvocationTargetException
05-01 13:06:30.704: E/TDDatabase(15661): at java.lang.reflect.Method.invokeNative(Native Method)
05-01 13:06:30.704: E/TDDatabase(15661): at java.lang.reflect.Method.invoke(Method.java:511)
05-01 13:06:30.704: E/TDDatabase(15661): at com.couchbase.touchdb.router.TDRouter.start(TDRouter.java:390)
05-01 13:06:30.704: E/TDDatabase(15661): at com.couchbase.touchdb.ektorp.TouchDBHttpClient.executeRequest(TouchDBHttpClient.java:191)
05-01 13:06:30.704: E/TDDatabase(15661): at com.couchbase.touchdb.ektorp.TouchDBHttpClient.put(TouchDBHttpClient.java:135)
05-01 13:06:30.704: E/TDDatabase(15661): at org.ektorp.http.RestTemplate.put(RestTemplate.java:39)
05-01 13:06:30.704: E/TDDatabase(15661): at org.ektorp.impl.StdCouchDbInstance.createDatabase(StdCouchDbInstance.java:51)
05-01 13:06:30.704: E/TDDatabase(15661): at org.ektorp.impl.StdCouchDbInstance.createDatabase(StdCouchDbInstance.java:43)
05-01 13:06:30.704: E/TDDatabase(15661): at org.ektorp.impl.StdCouchDbConnector.createDatabaseIfNotExists(StdCouchDbConnector.java:387)
05-01 13:06:30.704: E/TDDatabase(15661): at org.ektorp.impl.StdCouchDbInstance.createConnector(StdCouchDbInstance.java:103)
05-01 13:06:30.704: E/TDDatabase(15661): at ca.ilanguage.oprime.offline.activity.HTML5ReplicatingActivity$2.doInBackground(HTML5ReplicatingActivity.java:369)
05-01 13:06:30.704: E/TDDatabase(15661): at org.ektorp.android.util.EktorpAsyncTask.doInBackground(EktorpAsyncTask.java:29)
05-01 13:06:30.704: E/TDDatabase(15661): at org.ektorp.android.util.EktorpAsyncTask.doInBackground(EktorpAsyncTask.java:21)
05-01 13:06:30.704: E/TDDatabase(15661): at android.os.AsyncTask$2.call(AsyncTask.java:287)
05-01 13:06:30.704: E/TDDatabase(15661): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
05-01 13:06:30.704: E/TDDatabase(15661): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
05-01 13:06:30.704: E/TDDatabase(15661): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
05-01 13:06:30.704: E/TDDatabase(15661): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
05-01 13:06:30.704: E/TDDatabase(15661): at java.lang.Thread.run(Thread.java:856)
05-01 13:06:30.704: E/TDDatabase(15661): Caused by: java.lang.ExceptionInInitializerError
05-01 13:06:30.704: E/TDDatabase(15661): at com.couchbase.touchdb.TDDatabase.open(TDDatabase.java:235)
05-01 13:06:30.704: E/TDDatabase(15661): at com.couchbase.touchdb.router.TDRouter.do_PUT_Database(TDRouter.java:654)
05-01 13:06:30.704: E/TDDatabase(15661): ... 19 more
05-01 13:06:30.704: E/TDDatabase(15661): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load com_couchbase_touchdb_TDCollateJSON from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.example.android.secure-1.apk,libraryPath=/data/app-lib/com.example.android.secure-1]: findLibrary returned null
05-01 13:06:30.704: E/TDDatabase(15661): at java.lang.Runtime.loadLibrary(Runtime.java:365)
05-01 13:06:30.704: E/TDDatabase(15661): at java.lang.System.loadLibrary(System.java:535)
05-01 13:06:30.704: E/TDDatabase(15661): at com.couchbase.touchdb.TDCollateJSON.<clinit>(TDCollateJSON.java:28)
05-01 13:06:30.704: E/TDDatabase(15661): ... 21 more
05-01 13:06:30.754: E/example(15661): DbAccessException in background
05-01 13:06:30.754: E/example(15661): org.ektorp.DbAccessException: com.couchbase.touchdb.ektorp.TouchDBHttpResponse@4277e5e0
05-01 13:06:30.754: E/example(15661): URI: touchdb:///tablet-gina_cook-prod/
05-01 13:06:30.754: E/example(15661): Response Body:
05-01 13:06:30.754: E/example(15661): null
05-01 13:06:30.754: E/example(15661): at org.ektorp.http.StdResponseHandler.createDbAccessException(StdResponseHandler.java:44)
05-01 13:06:30.754: E/example(15661): at org.ektorp.http.StdResponseHandler.error(StdResponseHandler.java:62)
05-01 13:06:30.754: E/example(15661): at org.ektorp.http.RestTemplate.handleVoidResponse(RestTemplate.java:98)
05-01 13:06:30.754: E/example(15661): at org.ektorp.http.RestTemplate.put(RestTemplate.java:39)
05-01 13:06:30.754: E/example(15661): at org.ektorp.impl.StdCouchDbInstance.createDatabase(StdCouchDbInstance.java:51)
05-01 13:06:30.754: E/example(15661): at org.ektorp.impl.StdCouchDbInstance.createDatabase(StdCouchDbInstance.java:43)
05-01 13:06:30.754: E/example(15661): at org.ektorp.impl.StdCouchDbConnector.createDatabaseIfNotExists(StdCouchDbConnector.java:387)
05-01 13:06:30.754: E/example(15661): at org.ektorp.impl.StdCouchDbInstance.createConnector(StdCouchDbInstance.java:103)
05-01 13:06:30.754: E/example(15661): at ca.ilanguage.oprime.offline.activity.HTML5ReplicatingActivity$2.doInBackground(HTML5ReplicatingActivity.java:369)
05-01 13:06:30.754: E/example(15661): at org.ektorp.android.util.EktorpAsyncTask.doInBackground(EktorpAsyncTask.java:29)
05-01 13:06:30.754: E/example(15661): at org.ektorp.android.util.EktorpAsyncTask.doInBackground(EktorpAsyncTask.java:21)
05-01 13:06:30.754: E/example(15661): at android.os.AsyncTask$2.call(AsyncTask.java:287)
05-01 13:06:30.754: E/example(15661): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
05-01 13:06:30.754: E/example(15661): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
05-01 13:06:30.754: E/example(15661): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
05-01 13:06:30.754: E/example(15661): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
05-01 13:06:30.754: E/example(15661): at java.lang.Thread.run(Thread.java:856)
I modified the Android.mk file to use armebi-v7a and then ran ndk-build and now the native lib is working on Nexus 7 (4.2)
panini:TouchDB-Android cesine$ ~/android-ndk-r8e/ndk-build
Compile++ thumb : com_couchbase_touchdb_TDCollateJSON <= com_couchbase_touchdb_TDCollateJSON.cpp
StaticLibrary : libstdc++.a
SharedLibrary : libcom_couchbase_touchdb_TDCollateJSON.so
Install : libcom_couchbase_touchdb_TDCollateJSON.so => libs/armeabi-v7a/libcom_couchbase_touchdb_TDCollateJSON.so
Compile++ x86 : com_couchbase_touchdb_TDCollateJSON <= com_couchbase_touchdb_TDCollateJSON.cpp
SharedLibrary : libcom_couchbase_touchdb_TDCollateJSON.so
Install : libcom_couchbase_touchdb_TDCollateJSON.so => libs/x86/libcom_couchbase_touchdb_TDCollateJSON.so
Compile++ mips : com_couchbase_touchdb_TDCollateJSON <= com_couchbase_touchdb_TDCollateJSON.cpp
SharedLibrary : libcom_couchbase_touchdb_TDCollateJSON.so
Install : libcom_couchbase_touchdb_TDCollateJSON.so => libs/mips/libcom_couchbase_touchdb_TDCollateJSON.so
panini:TouchDB-Android cesine$ git status -s
M jni/Application.mk
D libs/armeabi/libcom_couchbase_touchdb_TDCollateJSON.so
M libs/mips/libcom_couchbase_touchdb_TDCollateJSON.so
M libs/x86/libcom_couchbase_touchdb_TDCollateJSON.so
M obj/local/mips/libcom_couchbase_touchdb_TDCollateJSON.so
M obj/local/mips/objs/com_couchbase_touchdb_TDCollateJSON/com_couchbase_touchdb_TDCollateJSON.o
M obj/local/mips/objs/com_couchbase_touchdb_TDCollateJSON/com_couchbase_touchdb_TDCollateJSON.o.d
M obj/local/x86/libcom_couchbase_touchdb_TDCollateJSON.so
M obj/local/x86/objs/com_couchbase_touchdb_TDCollateJSON/com_couchbase_touchdb_TDCollateJSON.o
M obj/local/x86/objs/com_couchbase_touchdb_TDCollateJSON/com_couchbase_touchdb_TDCollateJSON.o.d
?? libs/armeabi-v7a/
?? obj/local/armeabi-v7a/