• 9
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

Iam following MVVM tutorial and when adding Room dependency

1- I got this this error in compile:

Note: Failed to read get kotlin metadata for [Ljava.lang.Object;@54d771f9

Note: Failed to read get kotlin metadata for [Ljava.lang.Object;@4c00a268

Note: Failed to read get kotlin metadata for [Ljava.lang.Object;@42104314

Note: Failed to read get kotlin metadata for [Ljava.lang.Object;@203b72ad

2- also this: (SOLVED)

error: cannot find symbol class of

when adding this code in MainActivity:

public class MainActivity extends AppCompatActivity {
private NoteViewModel noteViewModel;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    //error is here in the ViewModelProviders.of
    noteViewModel = new ViewModelProviders.of(this).get(NoteViewModel.class);
    noteViewModel.getAllNotes().observe(this, notes -> {
        //update RecyclerView
        Toast.makeText(MainActivity.this, "onChanged", Toast.LENGTH_SHORT).show();
    });
 }
}
  • build.gradle(project):

    repositories {
     google()
     jcenter()
     maven { url "https://kotlin.bintray.com/kotlinx/" }
    }
    
    
    
    allprojects {
     repositories {
      google()
     jcenter()
     maven { url "https://kotlin.bintray.com/kotlinx/" }
     }
    }
    
  • build.gradle(app):

    room_version = "2.1.0-alpha06"
    
    implementation "androidx.room:room-runtime:$room_version"
    annotationProcessor "androidx.room:room-compiler:$room_version"
    

The 2.1.0-alpha04 gets rid of these errors, but compiler puts out warnings about "mCallbacks in RoomDatabase has been deprecated" in a few places.

I am following the exact same tutorial on YouTube and have run into the same errors: "Note: Failed to read get kotlin metadata..." errors.

I've tried "2.1.0-alpha06", "2.1.0-alpha05" versions of the room dependencies along with the "maven { url "https://kotlin.bintray.com/kotlinx/" dependency....again same errors.

Hoping for a better answer that cleans these errors up.

  • 0
Reply Report