Hi @james,
couchbase-lite-java does not run on Android.
Reasons:
1. couchbase-lite-java contains Context class that may not work on Android.
2. couchbase-lite-java depends on couchbase-lite-java-native which contains
native SQLite and Collators which might work on Android even if they are
compiled for Android architecture.
>From the log message, I think reason 1 causes problem.
Thanks,
Hideki
On Tuesday, August 25, 2015 at 9:35:33 PM UTC-7, James Nocentini wrote:
>
> I'm seeing the same error when using J2ObjC in the hope to write the
> models of an application with couchbase-lite-java and reuse them on iOS and
> Android with J2ObjC.
>
> I think the problem may come from the fact that I'm creating the couchbase
> lite manager in a pure java app but running on Android.
>
> @Erwan, you said the manager in your case was created using
> couchbase-lite-java-core. So it looks like the same probelm. Did you
> manager to solve the issue?
>
> @Hideki, I get the same error. `08-26 00:28:32.565
> 3599-3599/com.couchbase.j2objcsampleandroidapp
> W/System.errīšjava.io.IOException: Unable to create directory for:
> /data/data/com.couchbase.lite.test/files/cblite`.
> I'm not sure why the test package `com.couchbase.lite.test` appears on
> that line in LogCat.
>
> James
>
> On Wednesday, 20 May 2015 06:57:23 UTC+4, Erwan Koffi wrote:
>>
>> Hello,
>>
>> I am currently trying to use couchbase lite for android while using
>> libgdx framework to have a fancy synchronized database between laptop and
>> phone. Unfortunatly, I'm getting one error.
>>
>> Couchbase lite version is 1.0.4-28.
>>
>> In my main build.gradle, I have:
>>
>> dependencies {
>> ...
>> compile "com.couchbase.lite:couchbase-lite-android:$couchbaseVersion"
>> }
>>
>>
>> For the android project:
>>
>> android {
>> buildToolsVersion "22.0.1"
>> compileSdkVersion 22
>> sourceSets {
>> main {
>> manifest.srcFile 'AndroidManifest.xml'
>> java.srcDirs = ['src']
>> aidl.srcDirs = ['src']
>> renderscript.srcDirs = ['src']
>> res.srcDirs = ['res']
>> assets.srcDirs = ['assets']
>> }
>>
>> instrumentTest.setRoot('tests')
>> }
>>
>> packagingOptions {
>> exclude 'META-INF/ASL2.0'
>> exclude 'META-INF/LICENSE'
>> exclude 'META-INF/NOTICE'
>> }
>> }
>>
>>
>> And finally my Manifest:
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <manifest xmlns:android="http://schemas.android.com/apk/res/android"
>> package="com.btsit.game.android"
>> android:versionCode="1"
>> android:versionName="1.0" >
>>
>> <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="22" />
>>
>> <application
>> android:allowBackup="true"
>> android:icon="@drawable/ic_launcher"
>> android:label="@string/app_name"
>> android:theme="@style/GdxTheme" >
>> <activity
>> android:name="com.btsit.game.android.AndroidLauncher"
>> android:label="@string/app_name"
>> android:screenOrientation="landscape"
>>
>> android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
>> <intent-filter>
>> <action android:name="android.intent.action.MAIN" />
>> <category android:name="android.intent.category.LAUNCHER" />
>> </intent-filter>
>> </activity>
>> </application>
>>
>> </manifest>
>>
>>
>> When trying to create manager, I have an io exception:
>>
>>> Caused by: java.io.IOException: Unable to create directory for:
>>> /data/data/com.couchbase.lite.test/files/cblite
>>> at com.couchbase.lite.Manager.<init>(Manager.java:129)
>>
>>
>> Context is retrieved in AndroidApplication with:
>>
>> new AndroidContext(this)
>>
>>
>> Manager is created using couchbase-lite-java-core in an another project.
>>
>> This error may only occurs on simulator, as my testing phone is quite old
>> I can't test the app on it :(.
>>
>> Does someone have any idea?
>>
>
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/66568948-dafe-49b3-9292-8e9c600fdb4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.