1

I am running from vs code the command expo run:android, on a new blank expo project adn gets the error

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Cannot query the value of this provider because it has no value available.

my local.properties files points to the right location : sdk.dir = C:\\Users\\\myuser\\AppData\\Local\\Android\\sdk

my build gradle looks like this

buildscript {
ext {
    buildToolsVersion = "29.0.3"
    minSdkVersion = 21
    compileSdkVersion = 29
    targetSdkVersion = 29
}
repositories {
    google()
    mavenCentral()
    jcenter()
}
dependencies {
    classpath("com.android.tools.build:gradle:4.1.0")

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
 }
}

i have installed sdk 29, 30, 31, 32 in my computer.

nothing helps.

every time i run expo run:android i get one of two erros (without changing nothing in the code just sending the command again)

Could not create task ':app:lint'. SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at ....

or

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Cannot query the value of this provider because it has no value available.

CUNAIM
  • 11
  • 2
  • you need to check if you are Java version is 11 in your android studio and in path: https://stackoverflow.com/a/71007143/15421728 – Abhishek Sah Feb 12 '22 at 15:03
  • for some reason i dont have the "gradle projects" section under settings->build-> build tools -> gradle. just the general settings section at the top of the screen. i am using arctic fox 2020.3.1 – CUNAIM Feb 12 '22 at 18:16
  • the gradle projects section is displayed when you open the settings inside a project, but in your case i don't think expo exposes the `android` directory. – Abhishek Sah Feb 12 '22 at 18:18
  • 1
    and %java home% is pointing to the right place – CUNAIM Feb 12 '22 at 18:23
  • is it perhaps because of the three slashes instead of the two before myuser here: `sdk.dir = C:\\Users\\\myuser\\AppData\\Local\\Android\\sdk`, i am not quite familiar with windows. – Abhishek Sah Feb 12 '22 at 18:32
  • 1
    the extra \ was the mistake. thank you so much. i sure needed that extra eye. – CUNAIM Feb 12 '22 at 18:37

0 Answers0