Unable to install Components in Xamarin.Android - android

I am working with Xamarin Android, and in the past couple of days have found that I am unable to install components into projects.
I am on Visual Studio 15.3.0 (2017), and basically whenever I add a component, everything looks fine until I close the project and re-open.
Before:
After:
Things I have tried:
Updating Visual Studio
Reinstalling Visual Studio
Deleting everything Xamarin related in C:\Users{Me}\AppData\Local
I have lost two full days of work because of this and am getting a bit desperate, at this point I'm considering reinstalling Windows.
Can anybody provide any insight on why this is happening?
Regards

Related

Experiencing unusable display issue with Android Studio on Ubuntu 18.04

Background
I'm trying to use Android Studio 3.3 Canary 8 (the latest Preview release). I'm running Ubuntu 18.04 LTS 64-bit, and if it's relevant, my desktop environment is KDE Plasma and my window manager is KWin.
Issue
It was working completely fine until a couple of days ago, when I began experiencing an unusual display bug which rendered the editor completely unusable for me.
Here are a couple of screenshots of what Studio looks like right now. The first one is the Tip of the Day window that pops up at startup, and the second one is the actual editor itself.
From what I can tell, it seems that all UI elements have been stretched vertically, or something along those lines.
Troubleshooting
I tried Googling around for my issue, but I'm not entirely sure what to even Google in the first place. I tried some variations of "Android Studio display bug" or "Android Studio UI vertically stretched", things along those lines, but most search results apply to Android applications and not the editor itself.
I suspect that there's an issue with Android Studio's DPI detection, but I have no way of fixing any issues there given the fact that I can't see any text anywhere.
Attempted Fixes
I tried redownloading Android Studio from their website and running that fresh install. No dice.
I tried completely removing any Android Studio configuration or cache folders and reinstalling. Nope.
I tried using the release candidate instead of the Canary build. That didn't work so I tried using the stable release (3.1.4), which didn't work either.
I tried rebooting my computer too, but the issue persists.
I can't think of anything on my computer that might have changed between the last time Android Studio worked fine and now. I do remember installing some system updates, but I'm not sure which ones specifically (if there's a way to find out what updates were installed for a given run of sudo apt upgrade, I can include that information in this post).
Bottom Line
I'm really at a loss, and this is a really frustrating issue. Any help would be greatly appreciated, and if this is the wrong place to ask I apologize. If there's any more information you might need to troubleshoot this, please let me know and I'll update this question.

Android Studio gradle build stuck at app:processDebugResources

I'm on Windows. I created a new project on Android Studio for Marshmallow at least.
The only thing I've done so far is generating the main activity which is a tabbed activity with view pager. Also, you should know that this project is a private git repo that I cloned.
I'm working on this project with another developer and the project is perfectly working on his side.
The problem is:
When I try to launch the app (wether it is a virtual device or my real phone), the gradle build gets stuck at the app:processDebugResources step. I waited more than an hour and nothing happened. Moreover, when I want to cancel the gradle build, it doesn't respond and I have to kill Android Studio process. Then I restart Android Studio and I have to kill a gradle process that prevents the initial gradle build (at Android Studio startup) from working.
The crazy thing is that I was able to launch the app before. I even installed it on my phone!
What I've tried so far:
Do what stackoverflow was giving as solutions like tick the offline mode in the settings
Create a new project --> It doesn't change anything
Reinstall Android Studio --> It doesn't change anything
Deactivating Avast antivirus
Invalidate cache/restart + Clean + rebuild (the rebuild gets stuck like when I try to launch the app)
And maybe other solutions that I forgot...
It's getting very annoying as it's making me lose days of development.
If you have any more solutions, or if you think I should try again some of the previous solutions, help would be greatly appreciated !
I know this is an old post, but I faced the same problem during the last few days and since i got crazy I hope I can help someone else out there.
After many hours of troubleshooting I found that the Java Platform SE binary executable goes in "suspended mode" in Windows 10, preventing Android Studio from compiling (it hangs at app:processDebugResources).
Example Screenshot
Killing the suspended process and recompiling the project works just fine... until Java gets suspended again.
Maybe your gradle version is not compatible with it. Try again with latest version of gradle in your project.
I did several things:
Install NDK
Change JDK from embedded one to Jdk 8
Redownload SDK i was using (6,7,8)
And now the problem is solved ! I have no idea which of these things made the tricks but I'm happy ! It may be useful to someone else one day.

The referenced component 'Xamarin.Android.Support.v7.AppCompat' could not be found Xamarin.Android

Every time I open my Xamarin.Android solution I am facing an issue with Xamarin.Android.Support.v7.AppCompat library.
Visual Studio gives me just warnings, and when I try to debug my solution Visual Studio hangs because of Xamarin.Android.Support.v7.AppCompat reference so I have to kill the process from task manager and reopen my solution again.
The only solution I found is to uninstall the library and reinstall it again every time I open my solution.
I am using windows 10, I've tried Visual Studio pro 2015, Visual Studio Enterprise 2015 and Visual Studio pro 2017 on other PC and it didn't help.
Xamarin.Android references
It was fixed after I updated the Xamarin.Build.Download to 0.4.3
I had the exact same issue.
Couldn't find an answer and came across this question this morning. One of the comments gave me an idea.
Anyway, long story short, I deleted all the "missing" packages from the main packages directory (Solution Folder\packages) while VS is closed, and then reopen VS and the solution and it will automatically recreate the required packages fine.
Seems that this is a problem of the latest stable packages.
I have updated the android support packages to v25.2.0-beta1 and Xamarin.Build.Download to v0.4.3-beta6. Now everything works fine and the warnings disappear.
It might also work, if you update to a previous version.
The issue is also discussed in this thread:
https://forums.xamarin.com/discussion/86702/upgrading-from-java-1-7-to-1-8-causes-javac-warning-unknown-enum-constant-scope-library-group

Xamarin Forms: error in Droid project with Visual Studio

there are three day I'm trying to have a clear solution to start for each platform. Unfortunately, I'm very frustrating because I can't have that. Now in droid project there is a new kind of error:
java.lang.IllegalArgumentException: already added : Landroid/support/v4/view/VelocityTrackerCompat;
I tried to build and rebuild the project a lot of times without success. What have to do?
Then I tried to update my Droid solution but the result is wrong then before.
I googled a bit but obviuosly I can't find a solution or anyone with my same problem. Visual Studio 2015 shows my a lot of errors.
The version of Xamarin Studio is old.
This is the new list of references for the Droid project. I don't know what I can do now...
To resolve this issue, I removed all references from the Droid project and then I reinstalled all references.
Now it's working fine.

Android studio startup error

I've been having an issue with android studio for the past two weeks, it started happening out of the blue, everything was working juts fine until one day it just wouldn't start, it's display an error for me, I tried doing the following since then:
Reinstall the same version on android studio (which is the latest)
Install different versions of android studio
Restore my computer to a previous date in which everything was working fine
Needless to say that all of the above hasn't worked
Would anyone know how to solve this problem ?
Thanks in advance
After failing to find a solution, I just downloaded Intellij IDEA, it's great and has the same interface as android studio, so I'd advise anyone having issues with android studio to use it

Categories

Resources