Android Studio doesn't save my setting on Gradle JDK - android

In the terminal, './gradelw --version' shows My Jvm version is 1.8.0_202 (Oracle Corporation 25.202-b08). But I've already set settings->buid,execution,deployment->buildtools->gradle->gradle jdk: 11. I've also cleared the cache and restarted Android Studio for several times. Nothing changed. And my AS version is Electrical Eel. I've also tried some solutions given on this forum, none of them works to me.

Related

Plugin [id: 'com.android.application', version: '7.2.1', apply: false] was not found in any of the following sources

I am trying to create new Empty project in Android Studio and trying to run it, build getting failed every time. Showing me some build failed error.
Please look into the below Screenshot as reference:
Software Version:
Android Studio - 2021.2.1
JDK - 18.0.1
OS - Windows 11 Pro
Tried:
Changed JDK versions : 18, 17, 15, 11.
Checked every time JAVA_HOME and Path in System variables.
Lots of solutions tried available in the internet.
Changed gradle version from 7.3.3 to 7.1 or 7.0 or 6.8 in gradle-wripper.properties
None of the above solution worked for me.
Please help me out to solve this.
It assumes like the Android Studio can't download the gradle, check your internet connection, or maybe you have installed a certification or a proxy or a vpn that block the connexion of Android Studio. I had the same problem with a certification, when i removed it, everything was well.

Android SDK cannot be found after every gradle sync

I have been facing this issue for 2 days that Android SDK cannot be found after I sync the gradle files, I have to close project and remove from the recent projects and re-open it, I don't remember what I updated or what I changed recently.
And yes, I have already tried invalidate caches and restart, clearing gradle cache etc.
System Specs:
Android Studio 3.1.3
Build #AI-173.4819257, built on June 4, 2018
JRE: 1.8.0_152-release-1024-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.13.5
Thanks in advance.
First rebuild the app. might this has a good result
And remember don't use many countries IP like Iran because Android Studio Boycott this country. And thus connect to Vpn and Then Clean And Build project.
this ways might help you

Meteor 1.3.3 on Mac running android: Android target: Android SDK not found

For a client of mine, I try to run the meteor run android command on a mac and I got the following message:
✓ Java JDK
✓ Android SDK
✗ Android target: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.
The situation so far:
PATH is correctly defined with links to the tools and to the platform-tools, ANDROID_HOME is fine too
The emulator and the SDK are installed with Android Studio
gradle is not found either, the tools/templates/wrapper path does not exist, which make me suspect a bad SDK installation, yet Android Studio handles everything
Meteor version is 1.3.3 for this project, and of course android paltform has been added to the project, which run fine on my Linux laptop
Verbose is not that verbose, in which situation Android SDK is okay and Android target is not ?
This is very hard to debug and I am desperate to find a solution, this issue seems unresolved in other related threads. Thanks for your help!
This is actually a bug due to the new version of the Android SDK Tools (> 25.3).
The solution is to go back to 25.2.x, the Meteor guide mobile page has been updated a few hours ago.
See the related Github issue
Links to download 25.2.5 version:
https://dl.google.com/android/repository/tools_r25.2.5-linux.zip
https://dl.google.com/android/repository/tools_r25.2.5-macosx.zip

Cannot start new project with Android Studio

I just started using Linux Ubuntu, and downloaded and maybe set up Android Studio.
When I launch it, it does successfully, though it took hours to come here. But it gives me now :
Your Android SDK is missing, out of date, or is missing templates. Please ensure you are using SDK version 22 or later. You can configure your SDK via Configure | Project Defaults | Project Structure | SDKs
I tried to do so and at SDKs I added Android SDK. But when I clicked "ok", the prompt was dismissed but nothing happened, that is, not added.
I tried "Android SDK" two items below SDKs, because Android SDK was empty. But this time, Apply button and OK button doesn't respond. When I look at command line at the moment this error was being displayed.
[ 550663] ERROR - llij.ide.plugins.PluginManager - Android Studio (Preview) 0.4.6 Build #AI-133.1028713
[ 550663] ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_05
[ 550663] ERROR - llij.ide.plugins.PluginManager - VM: Java HotSpot(TM) 64-Bit Server VM
[ 550664] ERROR - llij.ide.plugins.PluginManager - Vendor: Oracle Corporation
[ 550670] ERROR - llij.ide.plugins.PluginManager - OS: Linux
It looks like there isn't relavant answer to this. All the questions tend to end with concluding "That's easy. Go Config, project default, project structure, and add Android SDK and Voila! You're good to go." Unfortunately no voila to me, so I here post this.
If anyone has an idea.
I have fix this ishue on Ubuntu 14.04, Android Studio 0.8 ::
sudo chmod 775 -R {your path}/android-studio/
In my case Studio were placed in /usr/local/android-studio ::
/usr/local/android-studio/android-studio/
I'm using Android Studio 5.7 and jdk 7 in Ubuntu 14.04 without problems.
I'm not expert but i thought you was using an old android studio version and a new jdk version.
I searched:
You are using android studio 0.4.6 based on IntelliJ 13.0
http://tools.android.com/recent/androidstudio050released
And IntelliJ adds support for JDK 8 in 13.1 version
http://blog.jetbrains.com/idea/2014/03/intellij-idea-13-1-released/
So try to upgrade Android Studio to 5.0 (based on 13.1) or better downgrade JDK version to 7 if you dont need it, perhaps not completely supported.
I was having a similar issue but on a clean install of Ubuntu 14.04, a fresh download of Android Studio 0.5.7, Oracle Java 8, Gradle 1.12 and the Android ADT Bundle 20140321. Every time I tried to bring up the Project Defaults to set the Android SDK location an exception appeared on the console with the same message you posted.
Before starting I set the various tool HOME environment variables to where those tools were installed, (which could be optional if you're installing all of these through the Ubuntu package manager..)
export GRADLE_HOME=/opt/DEV/gradle
export JAVA_HOME=/opt/DEV/jdk
export ANDROID_HOME=/opt/DEV/adt-bundle-linux-x86_64-20140321/sdk
export PATH=$PATH:$GRADLE_HOME/bin:$JAVA_HOME/bin:$ANDROID_HOME/tools
Then,
From the quick start dialog (presented when you first open Android Studio if you don't have a project already created) disable the Android Plugins found under Configure -> Plugins. Also disable any plugins Android Studio recommends when you disable the Android ones.
Restart Android Studio when prompted.
Add the Java JDK via Configure -> Project Defaults -> Project Structure -> Platform Settings: SDKs
Apply changes, head back into Configure -> Plugins and re-enable the Android Plugins.
Restart Android Studio when prompted.
Set the Android SDK Location and JDK Location under Configure -> Project Defaults -> Project Structure. When I did it, it was pre-filled so I just hit Apply.
Restart Android Studio
The SDK Manager is now a visible button under Configure and you can now create a new Android Project.
Upon creating a new Android Project, Android Studio then went off and download the various dependencies and Gradle 1.10. Annoying that it downloaded Gradle again, but at least Android Studio started to work after that.

Has anyone been successful in using 64-bit Eclipse for Android 2.3 dev on 64-bit Windows 7?

Has anyone been successful in using 64-bit Eclipse for Android 2.3 dev on 64-bit Windows 7?
Please answer positively only if, when you invoke the emulator via Eclipse's Run (Ctrl+F11), your app-to-be-debugged's APK is installed automatically onto the Android emulator and you are running this same exact configuration:
Windows 7 Ultimate 64-bit.
JDK 64-bit (jdk-6u23-windows-x64.exe installed.)
JDK 32-bit (jdk-6u23-windows-i586.exe installed.)
Eclipse Classic 3.6 64-bit (eclipse-SDK-3.6.1-win32-x86_64.zip)
Android 2.3 SDK Starter Package
If you are able to fully use 64-bit Eclipse for Android 2.3 dev on 64-bit Windows 7, please describe the steps you performed to make this happen.
As of now, the following steps did NOT work for me:
install the 64-bit JDK
install the 32-bit JDK
unzip android-sdk_r08-windows.zip to
C:\android-sdk-windows
append C:\android-sdk-windows\tools
to %PATH% in System env vars.
Run C:\android-sdk-windows\tools>android.bat
Install ADT Plugin via Eclipse
Create "Android 2.3 - API Level 9" virtual device via Eclipse
Window > Preferences > Java > Installed JREs: [Search...]
I received 3 great answers here although none of those described configurations really match the original configuration described in the question, but...
The last 2 answers (especially the one from #Nicholi) prompted to spend the time on yet-another-round of pulling my hair in an attempt to find a solution to an unexplainable problem.
And I found it! My own configuration now works on 64-bit Windows 7 and so the short answer is: Yes.
Here are the detailed steps, in order, that worked for me (cut & keep):
Step 0:
***********************************************
****** UNINSTALL THE COMODO FIREWALL !!! ******
***********************************************
Comodo Firewall, AKA CIS, turned out to be the sole problem leading to the time wasted between December 2010 (when I posted this request for help) and February 2011 (When I finally nailed the problem down). Note: Disabling the firewall doesn't help, only complete uninstall really works.
Step 1 (JDK 6 64-bit):
Create %JAVA_HOME%: C:\Program Files\Java\jdk1.6.0_23
Append to %PATH%: C:\Program Files\Java\jdk1.6.0_23\bin
Run: jdk-6u23-windows-x64.exe
Note: It is not necessary to install the JDK into C:\Java. Sticking with the Windows Folders conventions is preferred because it helps you remember which package is 64-bit and which is (still) 32-bit.
Step 2 (Eclipse Classic 64-bit):
Unzip eclipse-SDK-3.6.1-win32-x86_64.zip into C:\eclipse
Note: It is critical to have the eclipse directory directly under C:\ and not under "C:\Program Files" (otherwise, ADT Plugin install will incur missing packages problems).
Step 3 (SDK Starter Package AKA "Android SDK"):
Create %ANDROID_HOME%: C:\android-sdk-windows
Append to %PATH%: C:\android-sdk-windows\platform-tools
Run installer_r09-windows.exe and install to C:\android-sdk-windows
> Check 'Start SDK Manager'
> All are selected. Accept. Install. Yes, restart ADB.
Step 4 (ADT Plugin for Eclipse):
Help > Install New Software > Add...
Name: ADT Plugin
Location: https://dl-ssl.google.com/android/eclipse/
Check "Contact all update sites during install to find required software'!!!
Work with: All available sites
+ Developer Tools
+ Android DDMS 9.0.1.v201101191456-93220
+ Android Development Tools 9.0.1.v201101191456-93220
+ Android Hierarchy Viewer 9.0.1.v201101191456-93220
> Next
> Next
> Finish
> Restart Eclipse
Step 5 (Android Virtual Device):
Open Eclipse. Then:
Window > Android SDK and AVD Manager
> Virtual Devices [New...]
Name: AVD23
Target: Android 2.3.1 - API Level 9
SD Card: 1024 MiB
[Create AVD]
I myself have never used the Eclipse "classic" version, I always get the Java version as another poster mentioned (the 64bit version). Personally no idea what the difference is. I am guessing this is where your problem may stem from?
It works perfectly on Windows 7 x64 (Home Premium here), 64-bit and 32-bit JDKs installed, latest Android SDK and ADT plugin. I'm not sure which JRE is actually used, never bothered to find out (wouldn't be surprised if its 32bit). Also the JDK versions I used (quite awhile back) were 6u21, since then my 32bit version has updated to 6u23 but 64bit has not. Couldn't tell you the exact order as I don't recall (it was quite awhile back). Likely I installed the JDKs first, then extracted Eclipse, install/downloaded Android SDK, then installed ADT plugin.
Has always started up emulator fine, installs APKs, and debugs as expected. I also do alot of dev'ing on my Nexus One.
One recommendation I have seen alot is NEVER install any of the tools to the typical "C:\Program Files" because of spaces in filepaths. Why this is still a problem in 2011 I will not know, but putting Eclipse, JDK, and the Android SDK all straight off the root of some drive is likely to lead to significantly less issues apparently.
Edit: I uninstalled my current versions of Java, and removed eclipse/android sdk to startover
Installed jdk-6u23-windows-x64.exe to C:\Java
Added JAVA_HOME env variable pointing to C:\Java\jdk1.6.0_23
Added Java bin dir to PATH env var ;C:\Java\jdk1.6.0_23\bin
Extracted eclipse-java-helios-SR1-win32-x86_64.zip to C:\eclipse
Installed installer_r09-windows.exe to C:\android-sdk-windows
Downloaded necessary SDK versions
Installed ADT plugin through Eclipse interface, point to android SDK dir
Added ANDROID_HOME env variable pointing to C:\android-sdk-windows
Added Android platform-tools dir to PATH env var ;C:\android-sdk-windows\platform-tools
After this everything seems to work fine (except for DDMS in Eclipse, still fidgeting with that). And that is without the 32bit version of Java installed (neither JRE or JDK). Only 64bit is installed.
Is the solution to use eclipse-java-helios-SR1-win32 instead of eclipse-java-helios-SR1-win32-x86_64 when using a Windows 7 64 bit OS on a 64bit machine?
Hope this helps, if anyone else is having this issue.
Following configuration works perfectly fine for me.
Windows 7 Professional 64 bit
Eclipse Helios 3.6.1 64 bit (JavaEE)
JDK 6u23 64 bit
Android SDK 2.3
ADT 8.01
My sequence of steps:
Install 64 bit JDK. Update PATH and JAVA_HOME env variables.
Uncompress Android SDK and get all the required versions 7, 8 and 9. Add ANDROID_HOME env variable.
Uncompress Eclipse 64 bit and install the ADT plugin and then configure the Android SDK in Preferences page of Eclipse.
Thanks for the collective wisdom which has enabled me to restore the ADT functionality within an hour of reading this page. I had to fix one more item, eclipse refused to compile my android application and complained about all sorts of nonsensical problems e.g. unable to find {relative-path}\R.java even though I could view it in eclipse and from the command line; and build path problems.
I discovered it was using a 32-bit JRE (Window->Preferences->Java->Installed JREs) of
C:\Program Files (x86)\Java\jre6
I added an entry for the 64-bit JRE
C:\Program Files\Java\jre6
and selected it as the default JRE.
My android project then built cleanly again :)
I'm still troubleshooting it, as my configuration is totally messed up - many versions of java and mix of 32/64 bit, so I'm starting from scratch.
I noticed one thing, which might be solution to this problem. I found 3 java exe files in my windows\system32 folder. That's why, when u run 'java -version' from the command line, you get java 7! Even when you amend system %PATH% to have java 6 there, it won't work until you remove executables from system32.

Categories

Resources