I recently updated Android Studio to the Electric Eel version and I noticed that the editor shows black lines even where there shouldn't be any. Seems like a waste of workspace space to me but I couldn't find anything in the settings.
Android Studio:
Notepad:
Does any of you have the same problem ?
Settings > Editor > Inlay Hints: i have disabled Inheritors, Usages and Code author.
Thanks to Zain.
You can :
Change your theme and restart with clear cache android studio.
Related
I am using macbook with M1 chip. I am using Android Studio Bumblebee | 2021.1.1 Canary 3 version. When I run the project for the first time, there is no problem. When I debug for the second time, the changes I made in the codes are not visible in the emulator. I can't see the changes in logcat. What should I do?
thanks
I solved the problem.
"Edit Configurations..." -> Then the option I have shown in the red square needs to be selected.
You can try to go from File to Invalidate Caches / Restart... to empty your cache.
If that doesn't work try to downgrade your version. M1 Chip has problems with Android Studio because it is pretty new. Follow along this answer.
If you are sure it gets compiled and Android Studio installs it without errors you could try these things that worked for me:
Uninstalling the app inside the emulator and then running it again so the app gets reinstalled with your new version.
Also, as it's answered on here. You could also go to Tools -> AVD Manager. Right click on the emulator and then wipe data. This will delate all the data on the device.
I've been updating my project to target sdk-api28 and I started setting up the latest MaterialComponents, but I'm now having issues with the layout Previewer within Android Studio.
The Preview just won't display the correct design for the material components, eg. adding style="#style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" on a TextInputLayout view won't change the design (no outlines) in the emulated preview, but it does look okay when running on a phone (got outlines).
Here's how it should and does look when running on phones:
But here's a screenshot of how it looks in the Android studio's Preview.
I'm having this issue on any project, and even on the Shrine tutorial app with the same setup from MDC Codelabs (MDC-103(Java) - Shrine).
This happens only on the preview. Any of these projects, when running on a phone or on the emulator within Studio, look okay.
As much as I could 'think through' this, the issue is I believe somehow connected to my Android Studio, emulator, or maybe build tools versions? Please, could someone point out if I'm missing something very simple?
My Android Studio (sdk, tools etc) versions that I have installed:
Android Studio 3.2.1
Android Emulator 28.0.16
Android Platform Version: API 28: Android 9 (Pie) revision 6
Android SDK Platform-Tools 28.0.1
Android SDK Tools 26.1.1
This issue happaned to me in android studio 3.2.
after one day everything gose fine.
what i do was invalidate and restart. reset android studio default settings
the clean. and exit android studio and open it again. and it works fine
this is a bug not related to you only.
While some users who experienced similar issues, could solve this with cleaning out Android Studio cache and config, this didn't work for me.
After looking into various possible fixes and tips, I solved this by updating to Android Studio 3.4 Canary which is the latest non-guaranteed-stable version of Android Studio, which you can get by either downloading a Preview release (here: developer.android.com) or changing your update preference (within Android Studio) ie. Update channel to Dev channel or Canary channel within Android Studio Settings > Appearance & Behaviour > System settings > Updates
I do think that this might not be a proper fix, but it's the only thing that worked out for me and solved the layout (design) preview not being able to display correct design.
If someone else runs into a similar issue, make sure to first try out clearing cache, using the Invalidate and restart under File menu or any other method. The Invalidate and restart feature clears out cache and restarts android studio, after which it will have to sync again and check for all dependencies, Sdk, tools etc.
Also to avoid this issue, before trying out anything else make sure you have proper and latest SDK Build-tools, Emulator, SDK Platform-tools, SDK Tools versions installed.
I'll leave this here as an answer for now, and update it if any new solutions come around.
Sorry, I'm here 3 years late... But this was my solution for this render problem... It has Material.Light theme by default. If you change it to Light.Bridge the problem is solved!
Hope it helps some one
I am new to Android (working from last 1 month). Today when I open my Android Studio (Version 3.1.4) I noticed a strange thing. My Darcula theme got mixed with Default Theme and now it looks like this
I tried to change Theme back to Default(and InteliJ also) and then switching to Darcula but no success. Also tried to restart my Laptop and Android Studio but the result is same
I also tried the answers of the similar post to this but no success
Android Studio 'Default' theme mixed up with 'Dracula' theme
How to Solve the issue I am Using Windows 10 and Android Studio Version 3.1.4
P.S. I Don't want to reinstall my Android Studio
You might be tried to change Settings > Colors&Fonts > Scheme like below
https://i.stack.imgur.com/MaxsL.png
Try to edit Settings > Appearances > Theme
https://i.stack.imgur.com/UnuKL.png
I first got this problem in IntelliJ IDEA while writing code but now I"m having this in Android Studio also.
I get a black line over my code when I place the cursor in between the code.
Is there anyone who is having the same problem as me?
I'll appreciate your help.
Go to File->Settings
Under IDE Settings expand Editor -> Colors & Fonts ->General
In the list shown on right scroll to Line Number, Now change foreground and background colors.
I am experiencing the same problem. If your using Android Studio 3.0.1 update it to the latest version or click insert on the keyboard.
After updating to the latest version of Android Studio. Do not import your settings from your previous version
Or reset Android Studio's settings by deleting the .AndroidStudio3.0 file under C:\Users[username] in Windows
For Mac remove this files
~/Library/Application Support/AndroidStudio3.0
~/Library/Caches/AndroidStudio3.0
~/Library/Logs/AndroidStudio3.0
~/Library/Preferences/AndroidStudio3.0
Had this same problem in Android Studio, it seems to have come down as part of a buggy IDE update. Studio would work fine for about five minutes and then randomly start obscuring the current code line with a black highlight.
Anyway, clearing out all the AndroidStudio folders in C:\Users[Username] seems to have worked for me.
I restarted Android Studio 3.1.3 to solve this issue. File > Invalidates caches and restart.
Press insert key.
if you can not find,insert key near delete key.
In Android Studio 1.5.1 my Theme Editor does not show previews for any theme I select.
I've tried making a new project and see whats happening there, but it's still not showin any preview.
I feel like I'm missing something silly.
I noticed all the previews broke when I installed the Android N SDK. Switching the preview to API 23 fixes it for Layout previews, but not for the Theme Editor. Only way I got it to work for Theme Editor was by uninstalling the Android N SDK.
This was happening to me on Android Studio 2.3.1 Doing a 'Clean Project' from the Build menu fixed the issue.
I was facing same issue. I have uninstalled Android studio and reinstalled the latest version. The problem got resolved.
I was facing same issue. Try this:
go to File> Sync Project with Gradle Files
File > Invalidate caches/ Restart..
This worked for me.