antoniolg/Kotlin-for-Android-Developers

Database Error

Closed this issue · 2 comments

Hello, I got a database error and the screen is empty when I first run this app.
Log‘s here : E/SQLiteLog: (1) near "org": syntax error

It's a bug in Anko 0.10.1. Use 0.10.0 for now.

If that's the case, close this issue. Otherwise give me a little more info. The example uploaded in this repo is working.

Sorry, I update some versions. My versions below
ext.support_version = '25.3.1'
ext.kotlin_version = '1.1.3-2'
ext.anko_version = '0.10.1'

And I remove the "AUTOINCREMENT " and it works fine now, Thanks!

    println("ForecastDbHelper onCreate DayForecast")
    db.createTable(DayForecastTable.NAME, true,
            DayForecastTable.ID to INTEGER + PRIMARY_KEY,
            DayForecastTable.DATE to INTEGER,
            DayForecastTable.DESCRIPTION to TEXT,
            DayForecastTable.HIGH to INTEGER,
            DayForecastTable.LOW to INTEGER,
            DayForecastTable.ICON_URL to TEXT,
            DayForecastTable.CITY_ID to INTEGER)