Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Try:i doesn´t under stand what you mean with tag![]()
public class HelloWorld {
public static void main(String[] args) {
// Prints "Hello, World" to the terminal window.
System.out.println("Hello, World");
}
}
public class DatabaseHelper extends SQLiteOpenHelper {
public static final String DATABASE_NAME ="Zalgiris Kaunas";
public static final String TABLE_NAME = "Zalgiris_table";
public static final String COL_1 = "ID";
public static final String COL_2 = "NAME";
public static final String COL_3 = "LASTNAME";
public static final String COL_4 = "AGE";
public static final String COL_5 = "BIRTHDATE";
public static final String COL_6 = "HEIGHT";
public static final String COL_7 = "WEIGHT";
public static final String COL_8 = "SKILL_LVL";
public static final String COL_9 = "POSITION_FIRST";
public static final String COL_10 = "POSITION_SECOND";
public DatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, 1);
SQLiteDatabase db = this.getWritableDatabase();
}
@Override
public void onCreate(SQLiteDatabase db)
{
db.execSQL("create table" + DATABASE_NAME + "(ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT, LASTNAME TEXT, AGE INTEGER, BIRTHDATE INTEGER, HEIGHT INTEGER, WEIGHT INTEGER, SKILL_LVL INTEGER, POSITION_FIRST TEXT, POSITION_SECOND TEXT)");
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS "+ TABLE_NAME);
onCreate(db);
}
}

db.execSQL("create table" + DATABASE_NAME + "(ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT, LASTNAME TEXT, AGE INTEGER, BIRTHDATE INTEGER, HEIGHT INTEGER, WEIGHT INTEGER, SKILL_LVL INTEGER, POSITION_FIRST TEXT, POSITION_SECOND TEXT)");
db.execSQL("create table " + TABLE_NAME + "(ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT, LASTNAME TEXT, AGE INTEGER, BIRTHDATE INTEGER, HEIGHT INTEGER, WEIGHT INTEGER, SKILL_LVL INTEGER, POSITION_FIRST TEXT, POSITION_SECOND TEXT)");


You also need a space between the table name and the next part of the SQL queryIts still not workong...
--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.egids.lklmanager, PID: 2739
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.egids.lklmanager/com.example.egids.lklmanager.MainActivity}: android.database.sqlite.SQLiteException: near "Kaunas": syntax error (code 1): , while compiling: create table Zalgiris Kaunas(ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT, LASTNAME TEXT, AGE INTEGER, BIRTHDATE INTEGER, HEIGHT INTEGER, WEIGHT INTEGER, SKILL_LVL INTEGER, POSITION_FIRST TEXT, POSITION_SECOND TEXT)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: android.database.sqlite.SQLiteException: near "Kaunas": syntax error (code 1): , while compiling: create table Zalgiris Kaunas(ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT, LASTNAME TEXT, AGE INTEGER, BIRTHDATE INTEGER, HEIGHT INTEGER, WEIGHT INTEGER, SKILL_LVL INTEGER, POSITION_FIRST TEXT, POSITION_SECOND TEXT)
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1677)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1608)
at com.example.egids.lklmanager.DatabaseHelper.onCreate(DatabaseHelper.java:40)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:251)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)
at com.example.egids.lklmanager.DatabaseHelper.<init>(DatabaseHelper.java:34)
at com.example.egids.lklmanager.MainActivity.onCreate(MainActivity.java:17)
at android.app.Activity.performCreate(Activity.java:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Application terminated.
I.e. ("create table " + TABLE_NAME + " (Its still not workong...
--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.egids.lklmanager, PID: 2739
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.egids.lklmanager/com.example.egids.lklmanager.MainActivity}: android.database.sqlite.SQLiteException: near "Kaunas": syntax error (code 1): , while compiling: create table Zalgiris Kaunas(ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT, LASTNAME TEXT, AGE INTEGER, BIRTHDATE INTEGER, HEIGHT INTEGER, WEIGHT INTEGER, SKILL_LVL INTEGER, POSITION_FIRST TEXT, POSITION_SECOND TEXT)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: android.database.sqlite.SQLiteException: near "Kaunas": syntax error (code 1): , while compiling: create table Zalgiris Kaunas(ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT, LASTNAME TEXT, AGE INTEGER, BIRTHDATE INTEGER, HEIGHT INTEGER, WEIGHT INTEGER, SKILL_LVL INTEGER, POSITION_FIRST TEXT, POSITION_SECOND TEXT)
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1677)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1608)
at com.example.egids.lklmanager.DatabaseHelper.onCreate(DatabaseHelper.java:40)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:251)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)
at com.example.egids.lklmanager.DatabaseHelper.<init>(DatabaseHelper.java:34)
at com.example.egids.lklmanager.MainActivity.onCreate(MainActivity.java:17)
at android.app.Activity.performCreate(Activity.java:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Application terminated.