Why I am getting
Cannot resolve symbol 'Q'
when checking if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
with build tools 29.0.0?
From Google: So it very much exists already.
Set your compileSdkVersion
to 29 or higher. The buildToolsVersion
(if you still have that) does not have an impact on the Android SDK symbols — that is determined by your compileSdkVersion
.
What you can also do is revert your gradle version to 3.5.0
, and keep the compileSdkVersion
on 28.
So, in android/build.gradle
:
buildscript {
...
dependencies {
...
classpath 'com.android.tools.build:gradle:3.5.0'
...
}
}
and in your android/app/build.gradle
:
...
android {
compileSdkVersion 28
...
}
Versions other than 3.5.0
might work as well, but I haven't tested them.
To fix it, you need to update your compileSdkVersion to 29. While you are at it, might as well update the buildToolsVersion. You can do that by changing these lines in your /android/build.gradle file.
...
buildscript {
ext {
...
buildToolsVersion = "29.0.3"
compileSdkVersion = 29
...
}
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With