After updating to Android Gradle plugin 3.6.0
(released Feb 24, 2020), several project independently started failing with:
No v
It isn't necessary with Android gradle plugin > 4.1.0 (see also https://issuetracker.google.com/issues/144111441)
With < 4.1.0 I run into this too
No version of NDK matched the requested version 20.0.5594570. Versions available locally: 21.0.6113669
You can simply select your locally installed NDK in the Project Structure Dialog works !
But is only valid for local builds, an I need a solution for CI
It's only works, when you specify it in every used module
android {
compileSdkVersion 28
ndkVersion "21.0.6113669"
...
}
Here it seems not to work https://github.com/hannesa2/panoramagl/pull/17/checks with this change https://github.com/hannesa2/panoramagl/pull/17/files#diff-cff4e8c294a5dc5e76308662ae1ddcacR6-R7
export ANDROID_NDK_HOME=/Users/{my-user}/Development/adt/sdk/ndk/21.0.6113669
works too !
I have the same issue. I resolved it through the SDK manager under SDK Tools, click Show Package Details
and then scroll under NDK (Side by side) and tick and apply the version you need. See image below:
My question for anyone is, why do we need this now for projects that do not require the NDK? As it turns out the NDK is a pre-existing requirement in the project I work on for a dependency!
I also got below error
No version of NDK matched the requested version 20.0.5594570. Versions available locally: 21.3.6113669
I just added my local NDK version to App level build.gradle file its solved.
android {
ndkVersion "My Available version here" (my case it 21.3.6113669)
}
flutter clean
flutter pub get
In order to solve this problem, you must indicate to your IDE the version of your NDK in build.gradle
. In this case, it should be version 21.0.6113669. For example:
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.remed_mobile"
minSdkVersion 16
targetSdkVersion 28
ndkVersion '21.1.6352462'
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
If you do not indicate your version number, then the IDE takes a default version. If you've upgraded gradle, then it might not find the right version.
I faced the same problem. Then i found the developer references here
So, the problem start with gradle version 3.6. Before 3.6 there was no default ndk specified. So, any version of ndk worked without any problem. But after adding default version, if we not add any ndkVersion in build.gradle then it search for the default version of ndk.
In my case, my gradle version was 3.6.3 and ndk installed 21.0.6113669 and i did not defined ndkVersion in my build.gradle. So, it search for default ndkVersion "20.0.5594570" according to my gradle version and gave me the same error. So, i simply add ndkVersion "21.0.6113669" in my build.gradle file and error gone.
Change your classpath version to 3.5.0 inside your build.gradle, project level.
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
I have the same issue and it solved.