• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I copied and imported a package works on first computer but not the second computer

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My project works fine on my desktop computer at home. I made a copy of the project and placed it in a holding folder, from there I imported it into my laptop workspace. The program runs fine in the emulator on the desktop but when I try to run it on the laptop if quits. Below is the LogCat info. I've been at this all night and have tried everything that I can think of and more. Any thoughts? Also this application uses some sql code to create, interact, etc, with a database table. As I said though it works fine at the source.


12-12 04:52:20.561: E/Trace(704): error opening trace file: No such file or directory (2)
12-12 04:52:21.121: E/SQLiteLog(704): (1) near "autoincrement": syntax error
12-12 04:52:21.131: D/AndroidRuntime(704): Shutting down VM
12-12 04:52:21.131: W/dalvikvm(704): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
12-12 04:52:21.141: E/AndroidRuntime(704): FATAL EXCEPTION: main
12-12 04:52:21.141: E/AndroidRuntime(704): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dwhudson.assignmnet9/com.dwhudson.assignmnet9.Assignmnet9Activity}: android.database.sqlite.SQLiteException: near "autoincrement": syntax error (code 1): , while compiling: Create Table Words (WordId integerprimary key autoincrement, Word text);
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.ActivityThread.access$600(ActivityThread.java:130)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.os.Handler.dispatchMessage(Handler.java:99)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.os.Looper.loop(Looper.java:137)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.ActivityThread.main(ActivityThread.java:4745)
12-12 04:52:21.141: E/AndroidRuntime(704): at java.lang.reflect.Method.invokeNative(Native Method)
12-12 04:52:21.141: E/AndroidRuntime(704): at java.lang.reflect.Method.invoke(Method.java:511)
12-12 04:52:21.141: E/AndroidRuntime(704): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
12-12 04:52:21.141: E/AndroidRuntime(704): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-12 04:52:21.141: E/AndroidRuntime(704): at dalvik.system.NativeStart.main(Native Method)
12-12 04:52:21.141: E/AndroidRuntime(704): Caused by: android.database.sqlite.SQLiteException: near "autoincrement": syntax error (code 1): , while compiling: Create Table Words (WordId integerprimary key autoincrement, Word text);
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:882)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:493)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1663)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1594)
12-12 04:52:21.141: E/AndroidRuntime(704): at com.dwhudson.assignmnet9.DatabaseHelper.onCreate(DatabaseHelper.java:23)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:252)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
12-12 04:52:21.141: E/AndroidRuntime(704): at com.dwhudson.assignmnet9.Assignmnet9Activity.onCreate(Assignmnet9Activity.java:48)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.Activity.performCreate(Activity.java:5008)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
12-12 04:52:21.141: E/AndroidRuntime(704): ... 11 more
12-12 04:57:21.262: I/Process(704): Sending signal. PID: 704 SIG: 9
 
Tom Mordon
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I traced my code to where it was referring to in log cat, I had been up all night so having a fresh look at it later helped.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic