E/SQLiteLog: (1) no such table: HOSPITALS
<p>It creates an error. I have a database named Hospitals.sqlite in the assets folder. I tried doing <a href="https://stackoverflow.com/questions/13481356/no-such-table-found-in-sqlite">this</a> but still it does not work. I also tried uninstalling and reinstalling the app on my phone.  I also tried adding the piece of codes on my onCreate() and onUpgrade(), the commented part.</p>

<p>DBHandler</p>

<pre><code>public class DBHandler extends SQLiteOpenHelper {
    // Database Version
    private static final int DATABASE_VERSION = 2;
    // Database Name
    private static final String DATABASE_NAME = "Hospitals";
    // Contacts table name
    private static final String HOSPITALS = "HOSPITALS";
    // Shops Table Columns names
    private static final String hospitalName = "HospitalName";
    private static final String latitude = "Latitude";
    private static final String longitude = "Longitude";

    public DBHandler(Context context) {
        super(context, DATABASE_NAME, null, DATABASE_VERSION);
    }

    public List&lt;String&gt; getHospName() {
        List&lt;String&gt; hospName = new ArrayList&lt;&gt;();
        // Select All Query
        String selectQuery = "SELECT * FROM " + HOSPITALS;
        SQLiteDatabase db = this.getWritableDatabase();
        Cursor cursor = db.rawQuery(selectQuery, null);
        // looping through all rows and adding to list
        if (cursor.moveToFirst()) {
            do {
                HospitalNodes hospitals = new HospitalNodes();
                hospitals.setHospital(cursor.getString(0));
                // Adding contact to list
                hospName.add(hospitals.getHospital());
            } while (cursor.moveToNext());
        }
        return hospName;
    }

    public List&lt;Float&gt; getLat() {
        List&lt;Float&gt; hospLat = new ArrayList&lt;&gt;();
        // Select All Query
        String selectQuery = "SELECT * FROM " + HOSPITALS;
        SQLiteDatabase db = this.getWritableDatabase();
        Cursor cursor = db.rawQuery(selectQuery, null);
        // looping through all rows and adding to list
        if (cursor.moveToFirst()) {
            do {
                HospitalNodes hospitals = new HospitalNodes();
                hospitals.setLatitude(Integer.parseInt(cursor.getString(1)));
                // Adding contact to list
                hospLat.add(hospitals.getLatitude());
            } while (cursor.moveToNext());
        }
        return hospLat;
    }

    public List&lt;Float&gt; getLong() {
        List&lt;Float&gt; hospLong = new ArrayList&lt;&gt;();
        // Select All Query
        String selectQuery = "SELECT * FROM " + HOSPITALS;
        SQLiteDatabase db = this.getWritableDatabase();
        Cursor cursor = db.rawQuery(selectQuery, null);
        // looping through all rows and adding to list
        if (cursor.moveToFirst()) {
            do {
                HospitalNodes hospitals = new HospitalNodes();
                hospitals.setLongitude(Integer.parseInt(cursor.getString(2)));
                // Adding contact to list
                hospLong.add(hospitals.getLongitude());
            } while (cursor.moveToNext());
        }
        return hospLong;
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        /*String CREATE_HOSPITALS_TABLE = "CREATE TABLE " + HOSPITALS + "(Location varchar2(255), "
        + hospitalName + " varchar2(255), ServiceCapability varchar2(255), Class varchar2(255), Type varchar2(255), "
         + latitude + " numeric(15,5)" + longitude + " numeric(15,5));";
        db.execSQL(CREATE_HOSPITALS_TABLE);*/
    }
    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        /*db.execSQL("DROP TABLE IF EXISTS " + HOSPITALS);
        onCreate(db);*/
    }
}
</code></pre>

<p>Hospital Nodes</p>

<pre><code>public class HospitalNodes {
    private String hospital;
    private float latitude;
    private float longitude;

    public HospitalNodes() {
    }

    public HospitalNodes(String hospital, float latitude, float longitude) {
        this.hospital = hospital;
        this.latitude = latitude;
        this.longitude = longitude;
    }

    public void setHospital(String hospital) {
        this.hospital = hospital;
    }

    public void setLatitude(float latitude) {
        this.latitude = latitude;
    }

    public void setLongitude(float longitude) {
        this.longitude = longitude;
    }

    public String getHospital() {
        return hospital;
    }

    public float getLatitude() {
        return latitude;
    }

    public float getLongitude() {
        return longitude;
    }
}
</code></pre>

<p>Main Activity</p>

<pre><code>public void getAllHospitals(){
    DBHandler hosp = new DBHandler(this);
    List&lt;String&gt; hospName = hosp.getHospName();
    List&lt;Float&gt; hospLat = hosp.getLat();
    List&lt;Float&gt; hospLong = hosp.getLong();
    List&lt;Marker&gt; markers = new ArrayList&lt;&gt;();
    ArrayList&lt;OverlayItem&gt; anotherOverlayItemArray = new ArrayList&lt;&gt;();

    for(int i = 0; i &lt; hospName.size(); i++)
        anotherOverlayItemArray.add(new OverlayItem("Road", "Nodes", new GeoPoint(hospLat.get(i), hospLong.get(i))));

    ItemizedIconOverlay&lt;OverlayItem&gt; anotherItemizedIconOverlay
            = new ItemizedIconOverlay&lt;OverlayItem&gt;(
            this, anotherOverlayItemArray, null);
    map.getOverlays().add(anotherItemizedIconOverlay);
}
</code></pre>