I am just doing Signup activity to learn Room. Here, the Database is created but table is not created.
Thank you for helping.
Sqlite Manager chrome extension shows this when I open UserDatabase.
select \* from LoginDetails;
**no such table: LoginDetails**

This is my model class with Room Entity
 LoginDetails.java

```
@Entity(tableName = "LoginDetails")
public class LoginDetails implements Serializable {
    @PrimaryKey(autoGenerate = true)
    private int id;

@ColumnInfo(name = "Email")
private String email;

@ColumnInfo(name = "Password")
private String password;

public LoginDetails(String email, String password) {
    this.email = email;
    this.password = password;
}
public LoginDetails(){

}

@NonNull
public int getId() {
    return id;
}

public void setId(@NonNull int id) {
    this.id = id;
}

public String getEmail() {
    return email;
}

public void setEmail(String email) {
    this.email = email;
}

public String getPassword() {
    return password;
}

public void setPassword(String password) {
    this.password = password;
}
}

```

This is my SignupAcitvity.java

```
SignupAcitvity.java
public class SignUpActivity extends AppCompatActivity {
    private EditText edtEmail;
    private EditText edtPassword;
    private EditText edtConfirmPassword;

    private Button btnRegister;
    private LoginDao loginDao;
    public static UserDatabase userDatabase;

    private static final String TAG = "SignUpActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sign_up);

        edtEmail = findViewById(R.id.registerEmail);
        edtPassword = findViewById(R.id.registerPassword);
        edtConfirmPassword = findViewById(R.id.confirmPassword);
        btnRegister = findViewById(R.id.registerButton);

        userDatabase = Room.databaseBuilder(this, UserDatabase.class, "UserDatabase")
                .allowMainThreadQueries()
                .build();
        loginDao = userDatabase.getLoginDao();

        btnRegister.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (!isEmpty()) {
                    if (android.util.Patterns.EMAIL_ADDRESS.matcher(edtEmail.getText().toString()).matches()) {
                        if (TextUtils.equals(edtPassword.getText().toString().trim(), edtConfirmPassword.getText().toString().trim())) {
                            new Handler().postDelayed(new Runnable() {
                                @Override
                                public void run() {
                                    Log.d(TAG, "email & password = " + edtEmail.getText().toString() + "," + edtPassword.getText().toString());
                                    LoginDetails loginDetails = new LoginDetails(edtEmail.getText().toString(), edtPassword.getText().toString());
                                    loginDao.insert(loginDetails);
                                    Toast.makeText(getApplicationContext(), "User added Successfully", Toast.LENGTH_SHORT).show();
                                    startActivity(new Intent(SignUpActivity.this, MainActivity.class));
                                }
                            }, 1000);
                        } else {
                            edtConfirmPassword.setError("Password did not match");
                        }
                    } else {
                        edtEmail.setError("Invalid email");
                    }

                } else {
                    Toast.makeText(SignUpActivity.this, "Empty Fields", Toast.LENGTH_SHORT).show();
                }
            }
        });
    }

    private boolean isEmpty() {
        if (TextUtils.isEmpty(edtEmail.getText().toString()) ||
                TextUtils.isEmpty(edtPassword.getText().toString()) ||
                TextUtils.isEmpty(edtConfirmPassword.getText().toString())) {
            return true;
        } else {
            return false;
        }
    }
}

```

This is my LoginDao.java

```
@Dao
public interface LoginDao {
    @Query("Select * From LoginDetails Where Email Like :mail and Password Like :pwd")
    LoginDetails findByMailPwd(String mail, String pwd);

    @Query("Select * From LoginDetails")
    List<LoginDetails> getAllLoginDetails();

    @Insert
    void insert(LoginDetails loginDetails);

    @Update
    void update(LoginDetails loginDetails);

    @Delete
    void delete(LoginDetails loginDetails);
}

```

This is my UserDatabase.java

```
@Database(entities = {LoginDetails.class}, version = 1, exportSchema = false)
public abstract class UserDatabase extends RoomDatabase {
    public abstract LoginDao getLoginDao();

}

```