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
Related
I have just updated my Android Studio to 3.5 and I am starting to use the new "Apply Changes" feature. I can deploy my apps without problems using AVD, but when I use my smartphone (Galaxy S9+ with Oreo) the process keeps crashing and all the times I have to kill manually the app and click Start.
I've already tried to create a new project, kill all the apps, plug & unplug the USB cable and restart my device. I tried also Invalidate cache/restart and clean project.
This is the error that the IDE gives me:
E/zygote64: Bad JNI version passed to GetEnv: 805372416
E/studio.deploy: Error retrieving JVMTI function table.
Changes were not applied.
We were unable to deploy your changes: MISSING_AGENT_RESPONSES
Thanks for your help
After contacting the Google Team they have opened a new issue, here's the link if you want to stay updated: https://issuetracker.google.com/issues/139942372
UPDATE: Google has marked this issue as fixed, I think that in the next update everything will be fine.
If this is happening with a plain project, my guess is that there is some incompatibility between your device and the "Apply Changes" feature in Android Studio 3.5.
This issue seems to match your symptoms. Keep an eye on it, and with luck this will get fixed in Android Studio 3.5.1, either by fixing the IDE or at least detecting that "Apply Changes" will not work and reacting better.
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.
this is so annoying.
Yesterday, everything worked fine. I commited my work on my app and went to bed.
Today- nothing works.
I try to debug my program, the app installs on my phone and works but the debugging stops only with: Unable to start program "The system cannot find the file specified".
No matter how ofter I rebuild, set my project as start project, change the target api, or what not. I even updated everything on my computer but it is hopeless.
Please, help me :(
This looks like a promising solution for this issue but somehow it didnt work for me, so I tried to repair my Visual Studio 17 and it worked.
For repairing visual studio you have to download visual studio installer from official microsoft website
If VS is already installed in your machine you'll get a screen with options :- Update, Launch and more.
select more and click repair.
You have to wait until VS finishes repairing. Hope you'll get rid of this annoying issue.
I had a similar issue, and solved it like this:
As Luminous_Dev figured out here:
forums.xamarin.com/discussion/123640/xamlctask-error-on-new-cross-plat-solution
make sure Mono Debugging for Visual Studio is enabled.
Tools > Extensions and Updates> Mono Debugging for Visual Studio
Source: https://forums.xamarin.com/discussion/123611/unable-to-start-debugging-the-system-cannot-find-the-file-specified
make sure Mono Debugging for Visual Studio is enabled.
Tools > Extensions and Updates> Mono Debugging for Visual Studio
For 2 days I can't start coding my first android app, because of an issue with Android Studio 2.3.1.
There is many discussions about that out there, but non of them helped me so far.
I'm not able to use Run button for my app or even to edit the main_activity.xml file in the program window. Also the following error occurs when Android Studio starts running.
Screen shot of the error:
I'm workin' on Windows 7, 64bit, 8gb RAM, Java 1.8.0.121. Installed Android Studio 2.3.1 using android-studio-bundle-162.3871768-windows.exe file with no custom settings.
To solve the problem I've tried:
reinstall Android Studio
remove .gradle catalog
use File>>Invalidate Crashes/Restart
nothing helps.
Problem solved!
In my particular case the problem was caused by uncomplete Android Studio installation.
The reason of such an installation was Comodo AntiVirus
I noticed that there was some .bat files blocked during the installation. Comodo doesn't inform about it, but you can check it on blocked features list.
So I removed completely Android Studio, turned off all blocking functions in Comodo and quited it. Then installed AS once again.
Now it works fine. Ad least so far... Luckilly there's no Gradle error, so I hope there won't occur further problems.
Hope that this tip's gonna be helpful to somebody.
Have a good day folks!
I upgraded to the latest android studio and as ever it breaks what was working fine before.
If I plug in my android device I can see debug in the debug monitor, it gets detected and i can select it as a device to deploy to, then I get
Waiting for device.
Target device: xxxxxxxxxxxx
and nothing else happens.. VERY frustrating. Anyone any ideas on how to resolve?
Here is the resolution:
The problem is the way i installed the newer version of Android Studio. Do not install it over your previous installation directory. Create a new directory and move over your SDK into it. This is how I resolved it.
The only error I was eventually able to get from Android Studio was if i tried to run a test I'd see
NoSuchMethodError: com.android.builder.model.AndroidArtifact.getOutputs()Ljava/util/Collection;: com.android.builder.model.AndroidArtifact.getOutputs()Ljava/util/Collection;
there has been some other posts referring to this issue. Just make sure you do a clean install and don't crap over your older version.
This issue on the AOSP bug tracker tells you what is going on. A quick fix is getting rid of builder-model-0.11.0.jar from plugins/android/lib in your Android Studio folder. A patch has already been submitted and this probably won't happen again with the next update.