There might be a reason that your table is already created.... try a new test app with this code (worked for me)
make a Test app with only one button which create a table
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button btn = (Button) findViewById(R.id.button1);
btn.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
SQLiteDatabase objConnection=openOrCreateDatabase("database_name",MODE_PRIVATE,null);
objConnection.execSQL("Create Table IF NOT EXISTS table_name(id INTEGER primary Key AUTOINCREMENT, name Varchar(200))");
objConnection.close();
Toast.makeText(getApplicationContext(), "db created", Toast.LENGTH_SHORT).show();
}
});
}