0

I added the component libraries to my gradle files, as explained here:

https://codelabs.developers.google.com/codelabs/android-room-with-a-view/#2

But AIDE still doesn't resolve imports:

import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;
import android.support.annotation.NonNull;

I've also tried this way:

dependencies {
    // Room components
    def room_version = "2.1.0-alpha04"

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

AIDE doesn't resolve

import androidx  

It simply does't react on any changes in the gradle files.

Roman
  • 1,309
  • 14
  • 23

2 Answers2

0

Please update your code as per bellow

dependencies {
    // Room components
    def room_version = "2.1.0-alpha04"

    implementation "androidx.room:room-runtime:$room_version"
    annotationProcessor "androidx.room:room-compiler:$room_version
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
    implementation 'io.reactivex.rxjava2:rxjava:2.2.6'

enter image description here

Dhaval Solanki
  • 4,589
  • 1
  • 23
  • 39
0

If you have the premium version, go to settings. where it says path to android.jar put a reference to a recent android.jar ( This is usually comes bundled with android studio) you could download it from the net. Also after adding dependencies , you just always go to settings and click on Refresh Maven repositories under Build settings.

Justin
  • 1