无法保存在dbflow里面?

时间:2017-04-26 08:50:18

标签: java android

我有Bdflow数据库,但无法保存在里面看到这些iamage     [在此处输入图像说明] [1]       [1]:https://i.stack.imgur.com/rcQtm.png 没有明显的理由,虽然一切都很好,但我不知道,是什么原因引起了这个问题? 拜托,帮帮我

    package com.example.hamoda.bbflowonetomany;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;
import com.raizlabs.android.dbflow.config.FlowConfig;
import com.raizlabs.android.dbflow.config.FlowManager;
import com.raizlabs.android.dbflow.sql.language.SQLite;
import java.util.List;
public class MainActivity extends AppCompatActivity{
    @Override
    protected void onCreate(Bundle savedInstanceState){

      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      FlowManager.init(new FlowConfig.Builder(this).build());
        // -- Create organizat
        User us = new User();
        us.setId(1);
        us.save();
    }
}



    package com.example.hamoda.bbflowonetomany;
import com.raizlabs.android.dbflow.annotation.Column;
import com.raizlabs.android.dbflow.annotation.ForeignKey;
import com.raizlabs.android.dbflow.annotation.OneToMany;
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
import com.raizlabs.android.dbflow.annotation.Table;
import com.raizlabs.android.dbflow.sql.language.SQLite;
import com.raizlabs.android.dbflow.structure.BaseModel;
import java.lang.reflect.Field;
import java.util.List;


@Table(database = MyDatabase.class)
public class User extends BaseModel {
    @Column
    @PrimaryKey
    int id;
    @Column
    String name;

    public void setId(int id) {
        this.id = id;
    }
    public int getId() {
        return id;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getName() {
        return name;
    }
}



    04-26 09:42:25.751 745-1009/? E/Watchdog: !@Sync 2615 [٠٤-٢٦ ٠٩:٤٢:٢٥.٧٥٦]
04-26 09:42:46.711 1322-31345/? E/ctxmgr: [BaseServerTask]Failed network request due to no network connectivity.
04-26 09:42:46.711 1322-31345/? E/ctxmgr: [SyncServerInterestRecordsOperation]Failure response from WriteInterestRecord. StatusCode = 1
04-26 09:42:55.750 745-1009/? E/Watchdog: !@Sync 2616 [٠٤-٢٦ ٠٩:٤٢:٥٥.٧٥٧]
04-26 09:43:25.749 745-1009/? E/Watchdog: !@Sync 2617 [٠٤-٢٦ ٠٩:٤٣:٢٥.٧٥٨]
04-26 09:43:43.146 17703-17703/? E/MtpServerJNI: server is null in send_object_removed
04-26 09:43:49.342 745-777/? I/PowerManagerService: [PWL] Off : 1755s ago
04-26 09:43:55.758 745-1009/? E/Watchdog: !@Sync 2618 [٠٤-٢٦ ٠٩:٤٣:٥٥.٧٥٩]
04-26 09:44:25.748 745-1009/? E/Watchdog: !@Sync 2619 [٠٤-٢٦ ٠٩:٤٤:٢٥.٧٦٠]
04-26 09:44:55.757 745-1009/? E/Watchdog: !@Sync 2620 [٠٤-٢٦ ٠٩:٤٤:٥٥.٧٦١]
04-26 09:45:25.756 745-1009/? E/Watchdog: !@Sync 2621 [٠٤-٢٦ ٠٩:٤٥:٢٥.٧٦٢]
04-26 09:45:55.756 745-1009/? E/Watchdog: !@Sync 2622 [٠٤-٢٦ ٠٩:٤٥:٥٥.٧٦٣]
04-26 09:46:04.334 745-777/? I/PowerManagerService: [PWL] Off : 1890s ago
04-26 09:46:25.755 745-1009/? E/Watchdog: !@Sync 2623 [٠٤-٢٦ ٠٩:٤٦:٢٥.٧٦٥]
04-26 09:46:55.754 745-1009/? E/Watchdog: !@Sync 2624 [٠٤-٢٦ ٠٩:٤٦:٥٥.٧٦٦]
01-01 00:00:00.000 0-0/? E/Internal: device '4200b6bdd36e8200' not found



    04-26 09:36:25.739 745-1009/? E/Watchdog: !@Sync 2603 [٠٤-٢٦ ٠٩:٣٦:٢٥.٧٤٢]
04-26 09:36:32.636 1322-31721/? E/ctxmgr: [BaseServerTask]Failed network request due to no network connectivity.
04-26 09:36:32.636 1322-31721/? E/ctxmgr: [SyncServerInterestRecordsOperation]Failure response from WriteInterestRecord. StatusCode = 1
04-26 09:36:55.739 745-1009/? E/Watchdog: !@Sync 2604 [٠٤-٢٦ ٠٩:٣٦:٥٥.٧٤٤]
04-26 09:37:03.196 876-876/? I/KeyguardEffectViewController: *** don't update sliding image ***
04-26 09:37:25.738 745-1009/? E/Watchdog: !@Sync 2605 [٠٤-٢٦ ٠٩:٣٧:٢٥.٧٤٥]
04-26 09:37:34.336 745-777/? I/PowerManagerService: [PWL] Off : 1380s ago
04-26 09:37:55.737 745-1009/? E/Watchdog: !@Sync 2606 [٠٤-٢٦ ٠٩:٣٧:٥٥.٧٤٦]
04-26 09:38:25.747 745-1009/? E/Watchdog: !@Sync 2607 [٠٤-٢٦ ٠٩:٣٨:٢٥.٧٤٧]
04-26 09:38:42.883 17703-17703/? E/MtpServerJNI: server is null in send_object_removed
04-26 09:38:55.746 745-1009/? E/Watchdog: !@Sync 2608 [٠٤-٢٦ ٠٩:٣٨:٥٥.٧٤٨]
04-26 09:39:25.745 745-1009/? E/Watchdog: !@Sync 2609 [٠٤-٢٦ ٠٩:٣٩:٢٥.٧٤٩]
04-26 09:39:34.333 745-777/? I/PowerManagerService: [PWL] Off : 1500s ago
04-26 09:39:55.744 745-1009/? E/Watchdog: !@Sync 2610 [٠٤-٢٦ ٠٩:٣٩:٥٥.٧٥٠]
04-26 09:40:25.744 745-1009/? E/Watchdog: !@Sync 2611 [٠٤-٢٦ ٠٩:٤٠:٢٥.٧٥٢]
04-26 09:40:33.972 1322-31721/? E/ctxmgr: [BaseServerTask]Failed network request due to no network connectivity.
04-26 09:40:33.972 1322-31721/? E/ctxmgr: [SyncServerInterestRecordsOperation]Failure response from WriteInterestRecord. StatusCode = 1
04-26 09:40:55.743 745-1009/? E/Watchdog: !@Sync 2612 [٠٤-٢٦ ٠٩:٤٠:٥٥.٧٥٣]
04-26 09:41:25.752 745-1009/? E/Watchdog: !@Sync 2613 [٠٤-٢٦ ٠٩:٤١:٢٥.٧٥٤]
04-26 09:41:39.345 745-777/? I/PowerManagerService: [PWL] Off : 1625s ago
04-26 09:41:55.751 745-1009/? E/Watchdog: !@Sync 2614 [٠٤-٢٦ ٠٩:٤١:٥٥.٧٥٥]

0 个答案:

没有答案