From 2 days, when I open Android Studio project, it seems like JDK is not defined, like on picture. When I place mouse cursor on some red method and click alt + enter, I can setup JDK, but when I make it, it does not help at all. Even Gradle refresh gives nothing.
I can temporarily fix this by going to "Invalidate caches/Restart...", but then upon the next restart I see the same problem.
Android Studio Version: 2.3.3
Edit
Related
Im starting Android Programming so Im installing Android Studio.
When Im trying to run the wizard, I get an error: "Missing SDK"
I didn't download any SDK and I know that Android Studio can download and install SDK's itself.
Then, I click on Next to see what's happening:
I know this page should has a Todo list to download SDK's and it will download and install them if I click on "Next" Button.
Then, I click on "Next" and sadly I see this page:
So Why??! It should has a list of SDK's to download! but it hasn't!
If I click on "Finish" button, it should download and install SDK's normally, but it says "Nothing to do!" :(
I know I never downloaded SDK's! "Android SDK is up to date."??
Then, I looked for emulator and I downloaded it from developer.android.com original website.
emulator archive page of developer.android.com website
I extracted downloaded zipped file into C:\Users\USER\AppData\Local\Android\Sdk and I tried again.
I didn't see many differences, except in these pages:
(a warning in bottom)
(error fixed)
Sadly, I have the same problem yet.
Then, When I click on "Finish" button at last page (or when I close the Wizard Page any time) Program sends me to the Android Studio's Main Page! But I can't make a new project:
Then, I open the SDK Manager to fix this problem. So I will see another problem!! :(
Then, I click on Edit button to fix this problem:
It sends me to the previous page!!!! :|
You know that I dont have any SDK:
And I really don't know that why Android Studio says "Android SDK is up to date." :(
Can anyone help me please?
(As you can see, Im using Windows 11 in a x64 based cpu.)
To download Android SDK, you should use a VPN or set DNS.
This problem happen just this morning, whenever I make a selection on android studio, the insert cursor activate.
What I've tried:
To press insert, ctrl + insert, fn + insert. It still does the same.
Updated from 3.5.x to 3.6.1. problem still persist.
Using a keyboard tester I don't see any bugging keys.
The problem does not happen on any other software, Intellij IDEA is fine, notepad is fine, etc
I've seen in another thread that disabling the "use block caret" option should help but it didn't
At this point I'm completely lost in this issue.
I figured it out, I accidently installed the ideavim plugin, I though i uninstalled it before, I guess not.
SDK Manager >> Plugins >> Installed
You need to disable IdeaVim plugin.
Restart Android Studio.
SDK Manager >> Plugins >> Installed
You need to disable IdeaVim plugin.
Restart Android Studio.
https://www.youtube.com/watch?v=GSXCi41eNKk
My android studion was working fine. But suddenly I can't refactor any of my projects. When I got to the Refactor->rename then the Button Grayed.
I tried re-installing android studio but did not work. Then I updated it to the latest version (From 173.4720617 to Build# AI-173.4819257) but got the same problem.
Even I tried to refactor different projects on another pc but got the same problem.
I don't know how this problem is generated within a night to all of my pc's.
Please help me solving this problem
The button is disabled because you are not changing the package name. Try to change the package name to different text, this will enable the button automatically.
i downloaded APIs 15,16 and 17. After the download is finished, I closed eclipse but when i open it again it gives me a message box saying I need to update my ADT from 21.0.0 into 21.1 or higher, (and my current project suddenly didnt work, and full of red lines). There is a "Check for Updates" button. But after clicking it, it says there was no update found. I asked Google and found out that there is already ADT 21.1 released. I am wondering if I should just download the latest ADT bundle, but also looking for a quicker solution. I said “quicker” because my internet connection is a bit slow. :( It will take me a whole day to finish the download. :( And also after i downloaded the API, my graphical layouts do not show any more. There is a message saying "Eclipse is loading the SDK. Home.xml will refresh automatically once the process is finished." I waited for eternity, but nothing shows up. Im pretty messed up here. My project does not work anymore, although it worked well before i downloaded the APIs. Can anyone help me?. Thanks.
Go to eclipse > help > Check for updates.
It should list the latest update of adt. If it doesn't work, try this :
go to eclipse > help > Install new software
Click on add
add this url : https://dl-ssl.google.com/android/eclipse/
It will list the updates available- which should ideally be adt 21.1.0 (latest)
install the latest adt and everything should be fine.
The same thing happened to me, here's what I did-
Apparently, the SDK updated to version 21.1, but ADT, still at 21.0. 21.1 is currently a preview release (so I'm not sure how we accidentally updated the sdk...), so you have to manually add the update source. There's a nice guide (http://tools.android.com/preview-channel), but here's what you need:
Start Eclipse, then select Help > Install New Software.
Click the "Add" button, in the top-right corner.
In the Add Repository dialog that appears, enter "ADT Previews" for the Name and the following URL for the Location:
https://dl-ssl.google.com/android/eclipse-preview/
Click OK.
If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).
In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
This worked for me, although I would rather have just downgraded the sdk.
Hope I helped!
go to window -> SDK manager and then install Android SDK Tools to 21.1 and then check for updates again.
I used to get error " update cannot be installed " for that run eclipse in Admin permission.
same with your problem !!!
btw, Thanks for the info ! I tried it after read this and wohooow It worked ! thx
go to eclipse > help > Install new software
click on add
add this url : https://dl-ssl.google.com/android/eclipse/
After I set android:targetSdkVersion to 15, application doest work in 1.6 emulator.
It throws java.lang.VerifyError.
Edit:
The app is crashing because I'm calling invalidateOptionsMenu, which came in API 11. Now even I check before calling it (if (VERSION.SDK_INT >= 11)). It still throws same error.
You probably forgot to set your project build to version 4.0.3.
Right click your project in the project explorer.
Click properties.
Click Android.
Click the check box next to 4.0.3.
Just set up a new emulator!
For this you can simply use your AVD Manager (Android Virtual Device)!
It's like as you would run your 4.0 App on a 1.6 Device.
If you don't have to set your apiLevel to 15 (i.e. you don't need the new APIs) you should think about setting it to the lowest level possible.
Edit:
There IS a difference between the minSDK Version and the API level of the project:
MinLevel: what devices are able to run the app
ApiLevel: what APIs are able to use in your project in eclipse
Try to make sure you don't mix them up, so that your MinLevel hopefully matches your ApiLevel. Doing so will ensure your App does not get such errors,
Nice trick in this answer. Brilliant. Thanks everyone.