Java SQLite数据未存储在Android数据库中

Java SQLite数据未存储在Android数据库中,java,android,sqlite,Java,Android,Sqlite,我正在尝试将数据存储在SQLite数据库中,但我不知道为什么数据不存储在表中。我检查了100次我的数据库名、列名,在网上搜索,我找不到背后的原因。请有人帮助 代码 wisks.java String url = "http://programmingly.com/bvn/test/ws/listQuotes.php"; ListView lv; ImageView ivv; AQuery aQuery; ProgressDialog progressDialog; JSONObject json

我正在尝试将数据存储在SQLite数据库中,但我不知道为什么数据不存储在表中。我检查了100次我的数据库名、列名,在网上搜索,我找不到背后的原因。请有人帮助 代码 wisks.java

String url = "http://programmingly.com/bvn/test/ws/listQuotes.php";
ListView lv;
ImageView ivv;
AQuery aQuery;
ProgressDialog progressDialog;
JSONObject jsonObject;
ArrayList<String> al;
List<String> items;
String path;
SQLiteDatabase db;
Cursor c;
ArrayList<String> arryli = new ArrayList<String>();

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Log.d("vips", "onCreate()Log..");
    setContentView(R.layout.activity_wishes);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

    aQuery = new AQuery(this);
    progressDialog = new ProgressDialog(this);
    progressDialog.setMessage("loading...");
    getMyQuotes();
    //My SQLiteHelper Class
    MyHelper helper = new MyHelper(getApplicationContext());
    db = helper.getWritableDatabase();

    lv = (ListView) findViewById(R.id.listView);
    lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            if (!isNetworkConnected()) {
                Intent data = new Intent(Wishes.this, MyWish.class);
                data.putExtra("str", items.get(position));
                startActivity(data);
            } else {
                Intent mydata = new Intent(Wishes.this, MyWish.class);
                mydata.putExtra("str", arryli.get(position));
                startActivity(mydata);
            }


        }
    });
}
private boolean isNetworkConnected() {
    ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
    return cm.getActiveNetworkInfo() != null;
}

    public void getMyQuotes() {
    aQuery.progress(progressDialog).ajax(url, JSONObject.class, new AjaxCallback<JSONObject>() {
        @Override
        public void callback(String url, JSONObject object, AjaxStatus status) {

            if (object != null) {
                String quotos = object.optString("quote_data");
                String msg = object.optString("msg");
             try {
                    JSONArray jsonArray = new JSONArray(quotos);
                    al = new ArrayList<String>();
                    for (int i = 0; i < jsonArray.length(); i++) {
                        jsonObject = jsonArray.getJSONObject(i);
                        String str = jsonObject.getString("quote");
                        arryli.add(str);
                        //DataStore
                        ContentValues cv = new ContentValues();
                        cv.put("WishName",str);
                        db.insert("Wish",null,cv);
                        Log.d("DATA", "Data Stored" + cv);
                    }


                  CustomeAdapter mycustomeAdapter = new CustomeAdapter(arryli,Wishes.this);
                      mycustomeAdapter.notifyDataSetChanged();
                    lv.setAdapter(mycustomeAdapter);



                } catch (JSONException e) {
                    Toast.makeText(getApplicationContext(), "Server is busy Reciving data..", Toast.LENGTH_LONG).show();
                }
               // saveMyData();


            } else {

                //SimpleCursorAdapter sd = new SimpleCursorAdapter(getApplicationContext(), R.layout.single_row,c, new String[]{"msg"}, new int[]{R.id.tv_wishdata});
                //lv.setAdapter(sd);
               //String query = "Select"+myHelper.MESSAGE+"from"+myHelper.TABLE_NAME;
                // db.execSQL(query);
                //String query = "select * from wishes ";
                //Toast.makeText(getApplicationContext(),""+query,Toast.LENGTH_LONG).show();
               // String query = "Select"+myHelper.MESSAGE+"from"+myHelper.TABLE_NAME;
                //SQLiteDatabase database;
              //  MyHelper myHelper1=new MyHelper(Wishes.this);
                //db = myHelper1.getReadableDatabase();
                //Cursor cursor = db.rawQuery(query, null);
                //Cursor cursor = db.rawQuery("select rowid _id,* from"+myHelper1.TABLE_NAME+"", null);

                //Toast.makeText(getApplicationContext(),""+cursor,Toast.LENGTH_LONG).show();
                /*if(cursor!=null)
                {
                    cursor.moveToFirst();
                    Toast.makeText(Wishes.this, ""+cursor.getString(1), Toast.LENGTH_SHORT).show();
                }*/
这是我的日志

2-09 16:59:48.424 701-1306/? I/Icing: doRemovePackageData com.tdi.wish.wishes
02-09 17:02:26.716 18007-18007/? D/DATA: Data Storedkmaiv aaauaanc akaj
02-09 17:02:26.720 18007-18007/? D/DATA: Data Storedabc de jfia a aiuan
02-09 17:08:34.552 21492-21492/? D/DATA: Data Storedname=kmaiv aaauaanc akaj
02-09 17:08:34.556 21492-21492/? D/DATA: Data Storedname=abc de jfia a aiuan
02-09 17:10:35.420 22664-22664/? D/DATA: Data Storedname=kmaiv aaauaanc akaj
02-09 17:10:35.424 22664-22664/? D/DATA: Data Storedname=abc de jfia a aiuan
02-09 17:16:04.348 25914-25914/? D/DATA: Data StoredWishName=kmaiv aaauaanc akaj
02-09 17:16:04.356 25914-25914/? D/DATA: Data StoredWishName=abc de jfia a aiuan
我在代码中找不到任何错误。我不知道为什么不存储数据

这是我的数据库截图


请有人帮助

单击“数据”选项卡(查看您的屏幕截图)查看您的表数据,因为您当前正在查看其结构(列信息)。我已签出,但找不到。您是否可以确认在执行写入操作后正在打开数据库?是的问题已解决…现在数据存储在数据库中
2-09 16:59:48.424 701-1306/? I/Icing: doRemovePackageData com.tdi.wish.wishes
02-09 17:02:26.716 18007-18007/? D/DATA: Data Storedkmaiv aaauaanc akaj
02-09 17:02:26.720 18007-18007/? D/DATA: Data Storedabc de jfia a aiuan
02-09 17:08:34.552 21492-21492/? D/DATA: Data Storedname=kmaiv aaauaanc akaj
02-09 17:08:34.556 21492-21492/? D/DATA: Data Storedname=abc de jfia a aiuan
02-09 17:10:35.420 22664-22664/? D/DATA: Data Storedname=kmaiv aaauaanc akaj
02-09 17:10:35.424 22664-22664/? D/DATA: Data Storedname=abc de jfia a aiuan
02-09 17:16:04.348 25914-25914/? D/DATA: Data StoredWishName=kmaiv aaauaanc akaj
02-09 17:16:04.356 25914-25914/? D/DATA: Data StoredWishName=abc de jfia a aiuan