ไม่สามารถส่งข้อมูลไปยัง firebase ใน Android

ฉันกำลังพยายามส่งข้อมูลโดยใช้ firebase แต่มีข้อความว่า DynamiteModule: Local module descriptor class for com.google.firebase.auth ไม่พบ นี่คือรหัสของฉัน ฉันตรวจสอบแล้ว แต่ปัญหาของฉันไม่เหมือนกับปัญหาอื่นๆ

 protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Firebase.setAndroidContext(this);
    setContentView(R.layout.activity_main);
    Toast.makeText(this, "heee", Toast.LENGTH_SHORT).show();

    firebaseAuth = FirebaseAuth.getInstance();

    buttonSave = (Button) findViewById(R.id.button);
    editTextName = (EditText) findViewById(R.id.editTextName);
    //editTextAddress = (EditText) findViewById(R.id.editTextAddress);

    textViewPersons = (TextView) findViewById(R.id.textViewPersons);

    firebaseAuth.getCurrentUser();


    buttonSave.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            //Creating firebase object
            Firebase ref = new Firebase(Config.FIREBASE_URL);

            //Getting values to store
            String name = editTextName.getText().toString().trim();
           // String address = editTextAddress.getText().toString().trim();

            //Creating Person object
            Person person = new Person();

            //Adding values
            person.setName(name);
            //person.setAddress(address);

            //Storing values to firebase
            ref.child("Person").setValue(person);
        }
    });
}

ฉันติดอยู่ ช่วยด้วย!!


person DonJon    schedule 06.09.2016    source แหล่งที่มา
comment
โปรดตรวจสอบแท็บกฎในคอนโซล firebase ของฐานข้อมูลแอปพลิเคชันของคุณ '   -  person Vishal Patoliya ツ    schedule 06.09.2016
comment
และวางไว้ที่นี่   -  person Vishal Patoliya ツ    schedule 06.09.2016
comment
คุณได้เข้าฐานดับเพลิงแล้ว คุณต้องเข้ารับการอ้างอิง เช่น Firebase myFirebaseRef = new Firebase(URL);   -  person Vickyexpert    schedule 06.09.2016
comment
เข้าใจประเด็นของฉันไหม?   -  person Vishal Patoliya ツ    schedule 06.09.2016
comment
ไม่ใช่ความคิดที่ดีที่จะผสม Firebase SDK 2.5.X, Firebase.setAndroidContext() เดิมกับ SDK 9.X.X, FirebaseAuth.getInstance() ใหม่ เปลี่ยนไปใช้ SDK ใหม่เท่านั้น   -  person Bob Snyder    schedule 06.09.2016


คำตอบ (2)


ตรวจสอบ "กฎ" ในคอนโซลของ firebase จากนั้นในฐานข้อมูล และเปลี่ยนเป็นสิ่งนี้: {

"กฎ": {

".read": true,

".write":true

}

} มันควรจะแก้ปัญหาได้

person Prateek Paliwal    schedule 09.09.2016
comment
โอ้พระเจ้า..ในที่สุด! ขอบคุณ! - person Aziz; 13.10.2020

ตรวจสอบเวอร์ชันบริการ Google Play ของคุณ - มีแนวโน้มว่าจะต่ำกว่าข้อกำหนด (ซึ่งเมื่อเร็ว ๆ นี้ทำให้ฉันไม่ทันเปลี่ยนมาใช้ API ใหม่)

ดูเพิ่มเติม: Android Firebase DynamiteModule: ไม่สามารถโหลดตัวอธิบายโมดูล

person JamieB    schedule 06.09.2016