Android studio strange behaviour : file gets locked unexpectedly - android

I am experiencing strange behavior with Android Studio for a few days.
I am not able to write/open or do anything with some file(in which I am just working) unexpectedly.
For that, I have to restart android studio, and then after I am able to edit it.
I want to know if there is any other solution to get my files back in working mode without closing and opening an android studio.
My current Android studio version: 4.1.2

Related

App stuck on splash screen when debugging- Xamarin Android

I've got a project that has been written by someone else, and I can't debug it using Visual Studio 2019.
It's a Xamarin app. When I try to debug it in VS, using the emulator or a phone, it gets stuck on the splash screen. Sometimes it returns a failed to load XAML hot reload and a timeout.
When I open the app without the debugger, using the emulator, the app works.
Any ideas on what is the problem here? Already tried various project configurations.
Edit: other xamarin projects are working with the debug, using the same configs.

My Android Studio keeps crashing after updating it from 3.4 to 3.5

I've been facing this issue since today. Yesterday I updated Android Studio from 3.4 to 3.5 and it was working fine but since today it's been crashing on startup. When I start it shows the splash screen and then tries to load the project and suddenly closes or crashes without showing any error message. What should I do? Is there any error log I can refer to understand what is the problem, please help me with this.
After updating Android Studio to 3.5, I faced like you. If you are using anti-virus softwares.
Try close any anti-virus software or add Android Studio 3.5 to whitelist
Below was my problem and finally I come to know Android Studio is crashing because of it.

Xamarin no longer debugging my app

I've been working on a Xamarin project for a few days and have been testing it fine, but today it has suddenly stopped allowing me to debug the app, either via Live Player, or by connecting my smart phone via USB.
The only error I am getting, as far as I can see, is
Failed to debug your app
I've not got a way of testing it on iOS devices, but the built-in Windows Phone emulator runs the app fine, albeit with an error in my code popping up now and then.
What could be causing the Android version to stop debugging, or how do I at least fix it?
There are a couple of steps that can help with that issue:
Clean the solution and exit visual studio
manually delete the .vs folder in your solution directory
Delete the /obj and /bin folders in your shared code, and in each project for the platforms you are using
if you are developing for iOS, sometimes it helps to restart your mac
Start Visual Studio
Rebuild your shared code project
Rebuild every native project
Beyond that also make sure that you are using the latest versions of Visual Studio, Xamarin and Xamarin.Forms on all your computers, and that the nuGet Packages your project is using are at the very same version each in shared and native code
Also check, if your app isn't throwing an unexpected exception during its initialization. Especially if not caught, it can happen that your app crashes before your code gets executed at all.
In addition you may find further information about what is going on at Help -> Xamarin -> Open logs or in the device management in XCode (iOS only)
Try this :
Close visual studio if open.
Open App Data and then go to
(a) Local\Xamarin
(B) Local\Xamarin\Xamarin.Android
Empty these folders.
Open your project and then try to build your application.
Not a proper solution, but I uninstalled and reinstalled Visual Studio. This seems to have fixed the problem, but I've still no idea why it stopped working in the first place.

cant find device even it is connected after xamarin vs crashed

My Visual Studio instantly crashed and after it restarted it is asking for xamarin to be installed. I declined it since I am already using xamarin before it crashed but after that, I saw my main project was unloaded so I tried to load the project again and succeed. But what is so weird is I can't see my device now or even the default emulators for deployment, only start. How to fix this issue?
I saw an answer from xamarin forums - https://forums.xamarin.com/discussion/10558/xamarin-android-toolbar-does-not-show-connected-devices and it solved my problem.
It seems that the main project after crashed and restart lose the target as start up project.
This is the part of copied answer
Start Windows Visual Studio
Open the project
Set the Android project as the start up project
The device should appear or select it Visual Studio > Menu > Target Android Device
Hope that helps, im using a Samsung Galaxy III

Android Studio Run and Debug Button

I am facing a strange behavior of Android Studio. When trying to run an app and the build fails the Run button becomes disabled. I resolve the issue but the run button doesn't changes state. So, I have to restart the IDE. Is there any solution? Below are the screenshots describing my situation. My os is Ubuntu and Android Studio version is 1.1.
On line 176 is that red writing after the semi colon suppose to be there? Try removing it

Categories

Resources