You can follow the instructions in this link
1. We need to install node.js
2. In your favorite terminal, to create a basic Cordova app in Eclipse:
3.
npm install -g cordova
4.
npm install -g plugman
5.
cordova create helloWorldCordova
6.
cd helloWorldCordova /
7. cordova -d platform add android
8. cordova build
9. After that, go to eclipse and import the project just created using “new Android project from existing code”. You have now a basic Cordova app working.
If you don’t have cordova, follow the 4 first steps of the previous part. We are going to use again the terminal, creating a new project, adding different plugins, the source code and changing one library.
1. Go to the terminal
cordova create
todo-lite com.couchbase.TodoLite TodoLite
cd todo-lite
2.
Adding the plugins
cordova plugin add https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin.git
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
cordova plugin add https://github.com/apache/cordova-plugin-inappbrowser.git
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information.git
3.
Adding the source code
rd /s /q www
git clone https://github.com/couchbaselabs/TodoLite-PhoneGap.git www
4. For android platform
cordova -d platform add android
cordova build
5. Go to eclipse and import the project just created using “new Android project from existing code”.
6. If you run it like this, an error should appear with the library “td_collator_so.jar” using some native code. To fix the problem, follow these steps that you can find on the mobile couchbase documentation starting with eclipse :
7. Download http://cl.ly/Pr1r/td_collator_so.jar.
8. Rename the downloaded td_collator_so.jar file to td_collator_so.zip.
9. Decompress the td_collator_so.zip file.
10. Copy the 3 folders in the libs folder in your project and delete the td_collator_so.jar.
11. Your app should run now
Some links which can help:
· http://codingsquare.blogspot.in/2013/08/creating-cordova-3-android-project.html
· http://codingsquare.blogspot.co.uk/2013/09/adding-plugins-to-your-cordova-android.html
· http://docs.couchbase.com/couchbase-lite/cbl-android/cbl-android-1.0b2/#adding-a-jar-file-dependency
--
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 mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/51761590-353b-4fd4-be7b-3770a1a12bfe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.