My problem:
I'm not getting suggestion in xml file of android studio while working on relative layout. 0 suggestions are available, if I press control+space.
What I have tried?
I tried to solve this by deleting .idea folder and .ime folder, but still it is not working I'm getting 0 suggestions, but suggestions are available in Java file and on constraint layout.
Try Invalidate Cache/Restart. If nothing changes then try to restart your computer. Keep the Internet Connection On and then Launch Android Studio.
I think the problem is not with Layout.
Related
i have created 4 activities they all were work well but suddenly the preview of design in XML file is not showing I have tried to reopen my android studio also that specific XML. but the problem is still here.
XML code is showing but only the preview of design is not showing here the ss of screen.
please check and help me to solve this out.
please try the following steps:
clean project
delete .idea and .gradle file
remove app/build folder
now do invalid cache and restart
if still your problem is not solved then try to restart your computer
you just need to do invalidate Caches and restart, I have provided an image for you to know what to do exactly. in android studio, go to the top left corner and select file and click on Invalidate Caches/restart and that will restart your android studio. than try to open your xml layout.
Image
This is a log on StackOverFlow for those who continue to have problems after doing a clean build, invalidating caches and restarting, and restarting the computer.
Check if the element of the view has a custom view imported from an external library.
Ex.
In my case, I was using YouTubePlayerView of YouTubeAPI.
Obviously, the preview worked fine until Chipmunk.
However, the preview has not been released since Dolphin.
So I annotated the YouTube player view.
Then the preview was displayed normally.
In fact, I've confirmed that other people are experiencing the same problem as above.
So my guess is that custom views from libraries that are no longer updated as Gradle versions go up are not compatible with each other.
In that case
It seems to be a problem caused by using an external library view called de.hdodenhof.
enter image description here
My computer crashed while I was working on the project.
My mainActivity.java has no code inside there now.
I have tried going to
I:\Users\myUsername.AndroidStudio2.1\system\LocalHistory but I don't see the file there.
Open MainActivity.java in Android Studio, right click inside the file and go for LocalHisoty > Show History. Let me know if it works, please. Cheers
You can use your last debug version of application and decode it,you can find it in \app\build\outputs\apk folder
I'm getting this painful error everytime I try to save my project for the last couple of days.
I've tried running android studio as administrator but I still get the same error.
I've tried to go to that path but the folder .AndroidStudio doesn't appears under User\Lucian\, and I can access the folder through the Address bar, but the folder seems to be empty.
I'd appreciate any directions on where I should be looking.
I've had the same issue since I installed Android Studio several weeks ago.
Today I found out that the 'Android1.3' folder (and some sub-folders) were invisible. Since I turned on the visibility of this folder, I am no longer getting this error. :)
Hope this will help you too.
Go to the path mentioned inside the error message. If you see any hidden folders listed in there change its properties and set its visibility to normal.
For example, C:\Users\Username\.AndroidStudio2.1 was hidden in my system. Removing the hidden properties worked for me.
I am trying to use the Android Device Monitor within Android Studio, but somehow I managed to remove all views.
I have tried resetting the perspectives, Window->Show View->(Any View), and even re-installing Android Studio but nothing shows up.
Does anyone know how to reset the Device Monitor back to it's default views? (With the devices on the left, and the heap/threads/allocation views on the right.)
Thanks for your help!
I've experienced this same problem by using Window -> Reset Perspective. One should expect this to fix this issue, not break it. Go figure.
In any case, the DDMS workspace preferences are stored in %USERPROFILE%\.android\monitor-workspace (e.g. C:\Users\my_user\.android\monitor-workspace).
Just delete that folder and you're good to go.
Note that you'll need to enable 'show hidden files' in the finder if you are on a mac. Then, the workspace directory is in users/your_username/.android/monitor-workspace.
See http://ianlunn.co.uk/articles/quickly-showhide-hidden-files-mac-os-x-mavericks/ for how to show hidden files.
On Windows:
Go to C:\users\my_user\.android\monitor-workspace)
Close android device monitor
Delete all files/folders inside of monitor-workspace folder
Run android device monitor again
Where "my_user" is your user folder.
That screenshot looks like you are running Windows. So, you could go to C:\Users\user3106174\ and delete the directory named .android (or something similar).
I have created the android application project but if i try to save the "activity_main.xml" it is saying that.
Message
The original file 'activity_main.xml' has been deleted or is not accessible.
If I click ok it is trying to replace the xml. But it did not happen before. I am using eclipse.
If I create any other activity and try to save that xml then it is working fine. This error is happening only for launcher activity with the project name FCI.
It works fine if I change the project name.
This issue occurs to me every time I delete a project from a workspace, and then import one with the same name from another location. (Using eclipse Kepler sr 2)
I guess eclipse caches the workspace session metadata, but doesn't update it on such overwrites.
Restarting the workbench solves this problem every time.
Please try to restart your eclipse... I hope it would work for you