Remove ndk.dir deprecation warning
See original GitHub issueWARNING: NDK was located by using ndk.dir property. This method is deprecated and will be removed in a future release. Please delete ndk.dir from local.properties and set android.ndkVersion to [20.0.5594570] in all native modules in the project. https://developer.android.com/r/studio-ui/ndk-dir
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
MacOS android studio NDK was located by using ndk.dir ...
WARNING :: NDK was located by using ndk.dir property. This method is deprecated and will be removed in a future release.
Read more >Install and configure the NDK and CMake - Android Developers
If you uninstall the legacy NDK, remove the ndk.dir value, which is now deprecated, from your projects' local.properties files. Click OK.
Read more >[#QTBUG-91391] androiddeployqt uses deprecated ndk.dir ...
WARNING : NDK was located by using ndk.dir property. This method is deprecated and will be removed in a future release. Please delete...
Read more >How to use ndkVersion in gradle - Google Groups
Looks right to me. I would add that, in AS 3.5+, you will get a deprecation warning if ANDROID_NDK_HOME is set. Support for...
Read more >Creating a native build using cocos creator version 2.4.8
dir in local.properties is not set C/C++ ndk.dir delete check : Not considering ANDROID_NDK_HOME because support was removed after deprecation ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Got it, thanks a lot for investigating this, this can safely be closed then.
Hello @Raibaz,
after had a deeper look into the issue the solution is quite simple. In https://github.com/mockk/mockk/blob/9473e79d1b4fa99c91d87144557cacf167f29e64/gradle/detect-android-sdk.gradle#L15-L20 which is applied from
settings.gradle
the code tries to detect the properties filelocal.properties
from the root of the project. If it’s found the whole content is loaded as properties. The file itself is ignored by.gitignore
.If it does not exists either
$ANDROID_HOME
,$ANDROID_SDK_ROOT
or${HOME}/Android/Sdk
must point to a valid Android environment. If so, the warning does not appear andlocal.properties
is generated. On my local machine it’s:If
local.properties
contains thendk.dir
property, the warning is presented on the command line:
The GitHub Action runs didn’t show the warning because the properties file is not present and both contains the required environment variable which points to an Android installation.
https://github.com/actions/virtual-environments/blob/ubuntu20/20210628.1/images/linux/Ubuntu2004-README.md https://github.com/actions/virtual-environments/blob/macOS-10.15/20210626.1/images/macos/macos-10.15-Readme.md
One have to remove the property
ndk.dir
fromlocal.properties
and the build should be fine without the warning.