Unity 2019.2.0f1 Unable to locate Android NDK - android

I am trying to test in app purchases in Unity 2019.2.0f1, and when I try to build the apk, I keep getting error: Unable to locate Android NDK even though I downloaded Android NDK r16b and changed the path in Edit --> Preferences --> External tools
I searched alot and tried to install more than one version of NDK, and also tried to add the path of NDK in Environment Variables in settings of My Computer but the error kept showing.
Can someone please tell me how to solve this problem ?
Thanks.

I had the same issue in Unity 2019.2.8f1 on mac. My solution is going to Edit --> Preferences --> External tools and uncheck "android NDK installed with Unity". Then add the specific NDK folder path in it. For me, it is
/Applications/Unity/Hub/Editor/2019.2.8f1/PlaybackEngines/AndroidPlayer/NDK/*android-ndk-r16b*
Interestingly, the automatic setup by unity is /Applications/Unity/Hub/Editor/2019.2.8f1/PlaybackEngines/AndroidPlayer/NDK/
which missed the specific folder name android-ndk-r16b. So I just add android-ndk-r16b at the end of the last folder path. Hope this helps.

If you are using Unity Hub, you can just check the box where it sais add android support, that downloads everything you need for android development automatically.

Open unity hub > click install > click drop down menu in target unity > add modules > open drop down in android build support > check all sdk ndk download > proceed

Same problem here. I made a upgrade to version 2019.2.9f1 and it works.

I tried downgrading Unity version, changing path of NDK file and using other NDK files but none of them solved the problem.
After all, built the game in Windows machine instead of Mac and it solved the problem for me.

during build android project in unity 2019 and other new version >>Go to build setting>> then go to Other setting>> then scroll down || then see configuration >> in configuration go to >> scripting backend select > mono rather then IL2CPP then select ARMV7 rather then ARM64 your problem definitely will be solved thank
sohaib kh

this description can work on << window>> moreover , In mac or other operating system You might be apply : ILC2PP : or : ARMV7 : or : X86 : your problem definitely will be solved
during build android project in unity 2019 and other new version >>Go to build setting>> then go to Other setting>> then scroll down || then see configuration >> in configuration go to >> scripting backend select > mono rather then IL2CPP then select ARMV7 rather then ARM64 your problem definitely will be solved thank

Related

No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android [duplicate]

This question already has answers here:
Error: No toolchains found in the NDK toolchains folder for ABI with prefix: llvm
(54 answers)
Closed 4 years ago.
Can anyone tell me why I am receiving this error? I have downloaded a series of projects from GitHub for a Udacity course. Since there are about 50 or 60 projects (Exercises and Solutions) in the repo, I presume it has to do with the fact that each is an individual project on its own. I do not have a problem usually when I fork a repo and clone it locally.
I have read other posts about uninstalling and reinstalling ndk in the sdk. But I really want to know why this is happening and how I can fix without blindly uninstalling and re-installing.
Any help is appreciated. Thanks.
After looking around, the solution was to remove the NDK designation from my preferences.
Android Studio → Preferences → System Settings → Android SDK → SDK Tools → Unselect NDK → Apply button.
Project and Gradle compiled fine after that and I was able to move on with my project work.
As far as why this is happening, I do not know but for more info on NDK check out: https://developer.android.com/ndk/
I will go back and enable these libraries but for now.
If you are using NDK >= 18 you have to update your android gradle plugin to >=3.1.x
See the Known Issues section:
https://android.googlesource.com/platform/ndk/+/ndk-release-r18/CHANGELOG.md
for me, upgrade the Android Gradle plugin version to 3.2+ works.
classpath 'com.android.tools.build:gradle:3.2.0'
Android Studio -> Preferences -> System Settings -> Android SDK -> SDK Tools -> Unselect NDK -> Apply button.
It works fine for me.
Updating the Android Gradle plugin is definitely the preferred solution. However, if for whatever reason you can't do that, it's easy to simply "fix" the error without downloading, copying, or symlinking anything, by just creating an empty directory:
mkdir -p $ANDROID_HOME/ndk-bundle/toolchains/mips64el-linux-android/prebuilt/linux-x86_64
$ANDROID_HOME points to the root of the Android SDK installation. On MacOS, replace linux-x86_64 with darwin-x86_64. Use windows-x86_64 on Windows.
It's Because of NDK Version You are selected Follow the steps which will help you to resolve
If you want to use NDK then Update the Gradle Plugin
In build script change Dependecies
classpath { 'com.android.tools.build:gradle:3.2.1'
classpath {'com.google.gms:google-services:3.2.0'}
if you are unaware of the NDK then simply disable it by selecting preferences>System settings>android sdk>Select SDK Tools > uncheck NDK there
Rebuild the project it works just fine
Happy Coding <3
If you don't want to update your gradle plugin you can do this. Download one of the older NDK releases, e.g. r17c. Open downloaded NDK archive, go to toolchains directory and copy missing toolchain folders to toolchains folder of your currently used NDK. In my case the folders I had to copy were mipsel-linux-android-4.9 and mips64el-linux-android-4.9.

Xamarin Tasky Project Error While Build Android Version App

I have download from Xamarin Studio Tasky Project and open it
with Visual Studio 2015 Enterprise Edition
when i build the Solution i got these Errors in ANDROID App
with knowledge that i didn't changed any thing yet in the project.
i tried to build and clean and rebuild the project but still the it gives me an error once i build it.
while iOS version is building and running perfectly
Try right click on Android head > Properties > Choose Application panel. Compare the Namespace in Application panel of the Android project is equal with the namespace in the Resource Designer file (/Resources/Resource.Designer.cs). If not don't change this direct in Resource.Designer.cs file (because the file will be automatically generated). Instead, you can change the namespace in all affected files to the namespace you see in the Android Application panel or use 'using' in the affected files.
This error is due to Android SDK Platform of target OS API version is not installed. Make sure you install all Android APIs SDK versions, specifically the one's you're targeting in Project Settings of Android in Visual Studio.
Open Android SDK Manager and revise the below
Once you install them, restart, then open VS and clean the build output and re-build everything.
So, After trying to solve this problem with many ways and all of it are not the optimal solution.
i Finally find the root Solution for this Issue.
you should Uninstall any Android Build-Tools Which In The Preview Chanel in the Android SDK Manager.
after doing so, clean and rebuild the Xamarin project.

NDK not found at specified location

After installing Xamarin Studio I went to the options to make sure the Android SDK, JDK and NDK were all found. The first two in fact were, but the NDK was not found. It asked to specify location, and I did specify the location (when I clicked "browse" it took me to the folder where the NDK actually was). Yet, it still does not recognize it and says NDK not found at the specified location.
When using Xamarin Studio, if you are getting the error XA5101 error ("Missing Android NDK toolchains directory") you would need to download the Android NDK separately from:
http://developer.android.com/tools/sdk/ndk/index.html
Then he should unzip downloaded file and open the Xamarin IDE and go to the following menu location:
Tools ==> Options ==> SDK Locations ==> Android
Select the location of the unzipped folder.
Then close the IDE and reopen it (force close/restart if it persists in task/process manager).
Alternate to try:
Not finding NDK may also be caused because of mismatched configuration
for AVD Manager. More specifically, the Xamarin may be creating
devices & AVDs in your %USERPROFILE%.android while the
debugger/runtime emulation EXPECTS the AVDs in the ADT directory. You
can try copying ZAVD2-related files and directories into the
%USERPROFILE%.android\avd and see if that resolves the issue.
===== Initial post ======
[In case of eclipse] I think the answer is here: https://stackoverflow.com/a/11825963/918535
//goto Preference → Android → NDK and choose your ndk location
//If your NDK location is already set, the builder in the toolchain editor may be wrong. Go to project properties, C/C++ Build | Tool Chain Editor and select Android Builder as current builder.
// in your .bashsrc file, you may also need to add the env variable:
NDK_HOME=/opt/android-ndk-r8
export NDK_HOME
Okay, so I found the issue. There was no ndk-stack.exe file in my NDK location. I was thinking I would delete/uninstall everything related to NDK and reinstall. This is when I came upon ndk-build.cmd, just thought id click it since it was a cmd, and it created the ndk-stack.exe at a location on my computer which was found by both the Xamarin studio and Visual Studio( noticed later that even VS couldnt find the NDK but after the cmd, it did). Thank you for the help.
In case this catches anyone else out, I had this issue but it was because I checked "Enable AOT (Experimental)" in the Android Build Code Generation settings. This setting is off by default so probably should have left well enough alone.
Open ndk-stack.cmd with notepad to see full path of ndk-stack.exe
You can find this file in "installation-path\android-ndk\prebuilt\windows\bin\ndk-stack.exe"
my advice is to download NDK that is coherent to your version of Visual Studio, for instance, if you have VS 2015 download NDK of 2015 or 2016 year, it really helped, cause there wasn't that EXE file in NDK of 2019 version, but it was in the NDK of 2016
Change android min sdk version 4.2 or higher (API LEVEL 17+)

Unable to build Android APK in Qt Creator

I am trying to build an android APK in Qt Creator 3.0.1 . I have properly given the configured Android SDK, NDK, Ant, Java Jdk. In Build Android APK step under Build there is a option to specify Android Build SDK i.e target SDK. I am currenty using API 21 but it i am not getting an option to specify it over there.
Plz Help how can i do that.
First you should select Tools > Options > Android to add paths to the Android NDK and SDK :
Also select the Automatically create kits for Android tool chains option.
For configuring deployment settings you should go to Projects > Build Android APK > Details Since Qt 5.4 along with QtCreator 3.3.0. To create an APK package, select the Bundle Qt libraries in APK option :
You can also select Create Templates to create the manifest file to set application settings like icon, name, ...
In previous versions of Qt and Qt Creator you should go to Projects->Run->Deploy.
I recommend you to use the latest version of Qt and Qt Creator for Android development and deployment.
What helped me - switch off antivirus. Why see below:
I've got the same error and reinstallation didn`t help.
Runnning manually 'android.bat list targets' from cmd gives proper list of targets.
After digging into QtCreator code I found the reason - magic code for get list of targets in qt:
void AndroidConfig::updateAvailableSdkPlatforms() const
{
QProcess proc;
proc.setProcessEnvironment(androidToolEnvironment().toProcessEnvironment());
proc.start(androidToolPath().toString(), QStringList() << QLatin1String("list") << QLatin1String("target")); // list avaialbe AVDs
if (!proc.waitForFinished(10000)) {
proc.terminate();
return;
}
As you can see if 'android.bat list target' cmd will not finish for 10 seconds qtcreator will just terminate the process.
In my case it was 15 secs befor it finishes due to antivirus checks - so switching off antivirus could help in your case.
No need to restart QtCreator just open Android section in options again and all targets should be loaded.
I 'love' Qt - it is always like this with it.

Qt: No android kits found

The kit was there untill I updated Qt due to certain problem.
In option > android I have set everything up, such as the SDK, NDK, Ant and JDK.
Below NDK it says it has found 6 toolchains.
In the kits section it only auto-detected one, which is the desktop...
I ran into this same problem - it was because I hadn't installed the QT compilers for Android.
To fix it, you need to go back to the installer (may need to uninstall the current version or install in a new directory) and expand the QT version you're using then check the relevant Android packages to be installed. Once the install is complete, set the SDK, NDK, JDK, and Ant and it should show the new kits in the build and run page.
You have not selected any Qt version. You should select something like Qt 5.3 (Android_ARMV7) for that field.
You can also Goto Tools > Option > Android settings page and make sure Automatically create kits for Android tool chains is checked, and apply it. If you check this option, it will create the kit with an appropriate name.
Now, goto Tools > Option > Build and Run settings page, and click on Kits tab and check if Qt Creator created the Android kits.

Categories

Resources