Save it as resource in raw folder, load it as resource then try to copy it into app path. It does not need to be inside /databases folder. It can be anywhere (SDcard not recommended) Thats how you ship external SQLiteDatabase. Google it how to ship external sqlite database android, there is sample codes (on one blog, i cant remember), but they must be modified based on your app requirements. They are just good for start.
On Jul 4, 2:08 am, "hectordu...@yahoo.com" <hectordu...@yahoo.com> wrote: > Mark, > yes, i agree, the process is not right ... > may you share with me a link which help me including my database into > the apk file ? > thanks in advance. > > On 3 jul, 17:59, Mark Murphy <mmur...@commonsware.com> wrote: > > > > > > > > > On Sun, Jul 3, 2011 at 6:43 PM, hectordu...@yahoo.com > > > <hectordu...@yahoo.com> wrote: > > > I am trying to install my first ;-( Android application into a Samsung > > > tab phone device but it does not start; i wonder if i am missig > > > something in the process: > > > > 1- Appl needs a pre-existing sqlite database, which i have installed > > > (eclipse+DDS+pull) into my development environment ... so, it is > > > installed under data/data/MYAPPL/databases/myDB.db > > > > 2- the appl runs fine into the emulator > > > > 3- i have conected my phone device, start adb and have seen my device: > > > ./adb kill-server > > > ./adb start-server > > > ./adb devices > > > > 4- i have installed (with sucess) my apk: > > > ./adb install -l workspace/myAppl.apk > > > > DOES THE APK FILE INCLUDES THE DB ? > > > Not based on anything you have described here. You manually copied the > > database to the device in step #1. That does not put the database > > inside of the APK file, any more than copying a file to a Windows PC > > automatically puts it inside an .MSI file. > > > > 5- disconnect my device: > > > ./adb kill-server > > > + unpluged > > > > BUT, THE APPLICATION DOES NOT START: > > > ... "application has stopped unexpectedly ..." > > > > I think the problem is related with the database; maybe it does not > > > exist, but i am tryin to see waths going on ... may somebody help me ? > > > Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine > > LogCat and look at the stack trace associated with your error message. > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > > Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en