After updating Android Studio and Gradle to 3.5,
I now get this error:
NDK Resolution Outcome: Project settings: Gradle model version=5.4.1, NDK version is UNKNOWN
I changed the Gradle version in build-gradle back to 3.4.2 but it didn't help.
I had similar problem and solved it by opening project using Import project (Gradle, Eclipse, etc.) instead of Open existing Android Studio project.
You can download NDK from File>Project Structur>Choosing SDK location from left panel and pressing Download from NDK location part.
I was having the same issue after upgrading my android studio. You just need to open local.properties & change ndk.dir path to your NDK path.
Code:
ndk.dir=D\:\\Android\\SDK\\ndk-bundle
sdk.dir=D\:\\Android\\SDK
I don't use NDK in my project, but I had the same problem. The problem disappeared after I updated the SDK version to the newest
compileSdkVersion 29
I had a previous answer (since deleted by moderators) where I detailed that there are workarounds (as listed here) that work for some but that there is an underlying bug in gradle because the workarounds don't work for everyone (specifically: none of them work for me)
The related google issue is here: https://issuetracker.google.com/issues/140403764
Update: As of today (20190920) they indicate that they have fixed the underlying issue, so I would expect a future release of gradle after today (20190920) will contain the fix.
Update2: Today (20190926) I received a response from a googler that the problematic code was in Android Studio and it is contained on the 3.6-release branch but is not available on any publicly available build at the moment (Android Studio 3.6 Canary 12 was released just before this fix was made). That lets you know which component to update and which versions to pay attention to, anyway. Looks like Android Studio 3.6 Canary 13 and later should have it https://issuetracker.google.com/issues/140403764#comment13
Until then you can try the workarounds but when there's a vendor bug and workarounds don't work you just have to wait for a vendor patch.
You need to install NDK using the SDK manager
I first got this issue after upgrading from Android Studio 3.5.0 to 3.5.1 today.
I simply did a rebuild from the top menu Build --> Rebuild Project.
This might not work for everyone depending on what caused the issue but it worked for mine. Give it a shot.
(Also, I do not use the NDK and never have downloaded it before. Still don't have it downloaded)
If you are not using NDK, ignore the error.
I have installed NDK to see if this makes any difference. There is no difference (except for an unused NDK folder of more than 2 GB :). So I removed it (i.e. delete the ndk folder and remove NDK environnent variable you have set previously).
After my recent Android Studio upgrade I had the same error message. I tried the other answers here and none worked. But #Zahra's answer pointed me to something that did work:
Go to File->Project Structure...
Under "Android NDK Location", click the dropdown and select the "DEFAULT NDK Recommended" option.
There was a slightly different path in there before I selected the default. Somewhere upgrading using the SDK manager, the path seems to have changed.
And now in the local.properties file sdk.dir is set to the same directory as the "DEFAULT NDK Recommended" option.
i fix it by going to file > Invalidate Caches\Restart
the IDE will restart and the problem will fix
I had same problem. My environment is:
Android Studio 3.5.1
Gradle 4.4
Android-Gradle-Plugin 3.1.2
CMake 3.10 and 3.6
I uninstalled CMake 3.10 by SDKManager. (installed CMake is 3.6 only)
Gradle sync and build succeeded.
(1)
android-gradle-plugin 3.1.2 used CMake 3.10.
In android-gradle-plugin 3.1.2 (or 3.1.+), feature of support for CMake 3.7 and higher is a preview feature.
(from output message of gradle assembleDebug or gradle sync.)
(2)
https://developer.android.com/studio/projects/add-native-code.html#use_a_custom_cmake_version
The SDK Manager includes the 3.6.0 forked version of CMake and version 3.10.2. Projects that don't set a specific CMake version in build.gradle are built with CMake 3.6.0.
Perhaps this behavior is android-gradle-plugin 3.3 or higher.
(it is from android-studio 3.3 that can be downloaded CMake 3.10)
android-gradle-plugin 3.1.2 used latest version from installed CMake.
I had the same issue on a mac as well.
Suggestion: Force the .gradle folder to rebuild itself..
This still shows the 'NDK Version is UNKNOWN' in the Event Log yet it builds successfully and doesn't give me any issues. (I don't have NDK downloaded)
Open your /Users/macuser/ folder
Press CMD + SHIFT + . (dot/period) to view hidden folders
DELETE .gradle folder
Restart Android Studio
This will cause Android Studio to rebuild and re-download your .gradle folder fixing your conflicting files in the process.
The problem is solved when I updated the Android Gradle Plugin Version from 3.1.4 to 3.4.0 and the Gradle Version from 4.4 to 5.1.1 at the same time. Of course, I downloaded the newest NDK(Side by Side) with SDK manager.
In my case, Android Studio was installed on a new mac. Just needed to download Android 9 (my target/compile SDK was 28) and build tools. The problem was solved after this.
In my case i fix it by upgrade to SdkVersion 29 and migrate to AndroidX.
After upgrading I've got the very same problem in one of my projects.
I solved it just deleting the line ndk.dir=D:\Android\SDK\ndk-bundle from the local.properties file.
I had the same error after adding a couple of libraries in the app-level build.gradle file.
The solution was just to clean the project.
In the menu bar choose: Build >> Clean Project
After that, the error was gone for me. I didn't do anything else.
I got this error (and several others) after importing a project from version control via Bitbucket hyperlink.
Once imported, close the project and re-import it using File > New > Import Project. After that everything built correctly.
(The NDK path was already specified properly, and only importing as new worked)
Meta:
Android Studio 3.5
Build #AI-191.8026.42.35.5791312, built on August 8, 2019
JRE: 1.8.0_202-release-1483-b49-5587405 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
Gradle 3.4.0
Problem solved for me after checking Suggestions in Project structure and updated the two suggested updates. Sorry I can't remember the module names as they disappeared as soon as I pressed update for each of them and graddle sync. started automatically and after this problem disappeared
downgrading ndk version from 20 to r17c and cmake version from 3.10 to 3.6.411459 solved the problem for me
I had the same problem after updating Android Studio.
My problem is solved by after updating Android SDK Build-Tools.
[Tools->SDK Manager->SDK Tools->Android SDK Build-Tools].
Then try to Clean the project
[Build->Clean Project].
Finally restart the Android Studio IDE......
I just closed project, closed android studio, restarted my PC, tracked my project and deleted the .Idea folder in "B:/PROJECTNAME/.idea" and voila.
Problem solved. It resyncs. N/B: my gradle is androidx. goodluck to someone.
Change the claaspath to 'com.android.tools.build:gradle:3.5.2' in build.gradle script
Ok. I recently downloaded the latest version of Android studio and got similar error. So eventually I created a new project.
Selected Kotlin Language then Jelly Bean (talking 'bout the options to pick from).
Then the whole synching began but the 1st sync failed and eventually it auto-synced again and everything began to work.
Did modify the default codes (text) since I'm a beginner but got no error messages.
The preview was OK and I continued my learning.
Sorry I couldn't explain it better. I'm just a beginner.
Oh! You need to be connected to the Internet for it to work.
If this problem occurred after an Android Studio upgrade and you initiated a plugin update from right bottom notification: Open File > Project structure, then change the Android Gradle version to your Android Studio version and downgrade the Gradle version to the previous one.
In my case, I downgraded the Android Gradle plugin from 3.5.3 to 3.2.1 and the Gradle version from 5.4.1 to 4.6.
I modified the gradle version of the gradle-wrapper.properties file from 4.1 to 4.6.
I had this problem and none of the solutions worked for me. Problem is, this error or warning might appear for very broad reasons. You can follow these steps to find out what is wrong:
NDK is missing
When Gradle starts to compile native dependencies it creates ".cxx" folder in your "app" folder. inside that folder you can find "ndk_locator_record.json" file, which is very strange type of log file. It is basically all the paths Gradle checks to find NDK folder. If there is any error or mismatch on NDK version numbers you can see in this file.
NDK build fails
for some unknown reasons (maybe bug in Gradle) ndk build does not show actual error on event log window, instead it shows a failure, like Gradle sync failed: executing external native build for ndkBuild .... following by NDK Resolution Outcome: Project settings: Gradle model version=5.4.1, NDK version is UNKNOWN.
In this case go back to .cxx > ndkBuild > debug > x86(x64 or any other cpu arch)
Here in this folder you can find "json_generation_record.json" file, it is same type of log, usually last entry has the actual error. For example, for me was
../../sdk/native/jni/OpenCV.mk: No such file or directory
make: *** No rule to make target '../../sdk/native/jni/OpenCV.mk'. Stop.
From here you have a starting point to find out what is going wrong under hood.
If the NDK is not install, and the Android Project requires it then first install the NDK.
On windows OS add the NDK path to PATH environment variable. This will fix the version issue.
In my case the NDK path is
C:\Users\\AppData\Local\Android\Sdk\ndk\21.0.6113669
I faced this issue before and I fixed it by making sure to have the right permissions to the app directory.
I am using macOS, so I did:
chmod -R 777 your_android_project
and the issue was gone.
i have this problem too when I updated the Android Gradle Plugin Version from 3.1.2 to 3.5.1
Here is how to solve this issue :
Go to gradle.properties file in root folder of your project and add android.useDeprecatedNdk=true
Today I have update Android SDK tools & eclipse. Current SDK tools 24.0.1, Android development Tools 23.0.4.1468518, eclipse version 4.4.1. After update SDK & eclipse I create new project. In this project src folder is empty & res/layout folder also empty, activity & xml files are not creating. I have to manually create it.
I seen my answers like Link 1, Link 2 etc.
Answer like:- "
Try this
"Help" -> "Install new software" and install (this will update it) from this url: https://dl-ssl.google.com/android/eclipse/"
But I have already update it.But not solve my problem. So, How to create activity & xml automatically?
Latest
As I already said that ADT 23.0.4 and SDK 24.0.1 are not compatible to each other.
We have got another update to of Android SDK to 24.0.2 (May be their team read our this question and released an update so quickly). However this update has not been documented yet on this page but still you will be able to see it in your Eclipse's SDK Manager.
I updated my SDK to 24.0.2 and now it is working fine. You too can try to update your Android SDK to 24.0.2 and hopefully everything will work fine.
Older Answer
The ADT Plugin for Eclipse and Android SDK both should be compatible to each other for making Eclipse do such things automatically.
But it seems like ADT 23.0.4 (Released in October 2014) and SDK Tools, Revision 24.0.1 (Released in December 2014) are not compatible to each other.
We should expect an update to ADT plugin soon which will be compatible with SDK tools 24.0.1.
You can check from the documentation:
For SDK Tools, Revision 23.0.4 (October 2014) they have mentioned the following points.
Android SDK Platform-tools revision 19 or later.
If you are developing in Eclipse with ADT, note that this version of SDK Tools is designed for use with ADT 23.0.4 and later.
If you notice,
But for SDK Tools, Revision 24.0.0 & 24.0.1 (December 2014), They have only mentioned
Android SDK Platform-tools revision 19 or later.
And if you check this document then you will find for SDK 23 or earlier with each revision the compatible ADT version was mentioned but only with 24 they have not mentioned anything yet. So the compatible version is yet to come.
I had same issue but in the end had to undo my update to SDK tool to back to 23.0.4.
If you want to undo your update you can follow the following simple steps:
Download the older ADT plugin manually.
Extract the contents and copy the tools folder from there.
Go to your SDK installation directory and replace the tools folder.
Your SDK will be back to 23 version and everything will start working again.
Try running your Android SDK Manager again, install any available updates for the Tools category and after that select Help > Check for Updates from the Eclipse menu (installing any detected updates here too which should then restart Eclipse).
I was getting the same problem before and it started working again after I have Android SDK Tools version 24.0.2 installed after the above process.
Try this: when creating a new android application use "Empty Activity" instead of "Blank Activity".
This will fix the problem immediately.
Sometimes you have to reinstall eclipse after it crashes. That's why it is a good idea they made it portable. But you can try to go back from the about eclipse uninstall component. But in my experience if you blew the ini and all that maybe the fastest way is to reinstall especially when there are so many dependencies like in adt.
You can also install regular eclipse and android plugin you don't have to use only adt. And maybe eclipse is more stable like that
Another thing you need to recompile the project probably
I have been trying to setup LibGDX on Eclipse (4.3). I followed the instructions here: https://github.com/libgdx/libgdx/wiki/Prerequisites and installed both ADT plugin for Eclipse and the Google Web toolkit successfully. Then I used the libgdx-ui.exe to create the libGDX project and on creating it, I see errors in Eclipse.
I am pretty sure I have installed the plugins properly and I have JDK 7 as well.
Any help would be greatly appreciated.
Thanks :)
It seems I have not installed the GWT plugins properly. But on trying to install it from the link, the option to install the SDK does not appear in the list.(Please check the image in the last comment I posted).
1) Android requires (before kitkat) jdk 6. It won't work with jdk 7.
2) After installing ADT plugin, you also have to open android sdk manager and download required api files.
These two should fix your android and java.lang.Object issues. It's better to test an android app on this setup (without libgdx) first.
3) Right click on all warnings regarding classpath entries, eclipse will provide you automatic quick fixes.
If the issue stays after this, the problem is with gwt sdk installation. Now you can follow The project XXX does not have any GWT SDKs on its build path. It should work smoothly as other problems won't interfere with it now.
Hope this helps.
I downloaded the GWT4NB(Google Web Toolkit for Netbeans) plugin and tried intstalling it, but what happened was that I got this error message stating:
Some plugins require plugin Java Hints to be installed.
The plugin Java Hints is requested in implementation version 11.
And then I have to cancel the installation since it's looking for dependencies or something I susspect. The version of the GWT4NB is 2.10.6 and of course my Netbeans is version 7.1.
I understand that it might work with an older version of netbeans but my current version is set up perfectly and for me to go and re-install all my other plugins and configurations would be way to cumbersome to do. GWT4NB is supposed to work with Netbeans 7.1, or so they claim.
Thanks in advance for any help!
PS - Here's the link to that plugin: http://java.net/jira/secure/attachment/48362/org-netbeans-modules-gwt4nb-2.10.6.nbm
I too faced the same problem. So i had to download Java Hints Plugin but when i started installing that, i came to know that it also has four other dependencies.
As a resolution, i downloaded
org-netbeans-modules-gwt4nb-2.10.4.nbm
This got installed in NetBeans 7.0 and 7.1 well and i had my project working well. Hope this helps you also.
Here is the download link for my Version of GWT4NB:
https://github.com/gwt4nb/gwt4nb/wiki/Downloads
Version 2.10.4 is available at the bottom of the page.
I am trying to create a UI for a java web app using Vaadin.
I am using Eclipse for this purpose, and I have installed the Google Plugin for Eclipse (which includes GWT SDK) as well as the Vaadin plugin for eclipse.
I created a new project using New Project-> New Vaadin Project... but I am seeing an error message in Eclipse console "GWT SDK not installed."
How do I resolve this error? I have already installed Google Plugin for Eclipse which includes GWT SDK.
Thanks...
Check in 'Preferences->Google->Web Toolkit' if you have existing SDK marked as default. Sometimes, after installing or unistalling other plug-ins, this may get reset to some older, not anymore existing, SDK version.
Also, make sure you have the default (or any other existing SDK) selected in project properties under 'your project->properties->Google->Web Toolkit->GWT SDK'.
Today I resolved this issue (which cropped up after a GWT SDK update on a perfectly working setup) by going to project Properties/Builders and moving the GWT "Google Web Toolkit Project Validator" up to just below Java Builder. I'd tried everything I could think of before that, including uninstalling and re-downloading the SDK, checking default and specific SDK's, trying older ones, editing .classpath entry manually.
Just in case poor some soul follows the path I went through. Using Eclipse Indigo.
help->check for updates
Update all libraries
then:
right-click the project, choose Project Properties->Java Build Path->Libraries
remove invalid GWT library, if any
choose Add Library, choose Google Web Toolkit
If an unknown version of the sdk is selected, click the Configure SDKs link and remove old versions or at least select the current, valid version.
Then, do a Project->clean just to be on the safe side, and your project should now build.
This worked for me using Eclipse Helios.