I've just installed the Multi-device Hybrid Apps preview for Visual Studio 2013, and I'm getting an error when attempting to debug via Ripple for iOS or Android.
"Unable to attach. Invalid Pointer"
There is no useful output provided by Visual Studio 2013, rather the debugger just doesn't attach to the browser Ripple emulator after showing the exception. The exception happens immediately and the debugger never attaches. I've had this error occur since installation, so it shouldn't have anything to do with the project itself. I checked my paths and they appear to be correct.
System Properties -> Advanced -> System Variables:
ADT_HOME | C:\Users\Name\AppData\Local\Android\android-sdk
ANT_HOME | C:\apache-ant-1.9.3
JAVA_HOME | C:\Program Files (x86)\Java\jdk1.7.0_55
Global Path Variable (last section):
C:\Program Files\nodejs\;C:\Program Files
(x86)\Git\cmd;C:\Program Files (x86)\Windows Kits\8.1\Windows
Performance
Toolkit\;%JAVA_HOME%\bin;%ADT_HOME%\tools;%ADT_HOME%\platform-tools;%ANT_HOME%\bin;C:\Program
Files (x86)\Microsoft SDKs\TypeScript\1.0\
I've made sure that the latest android SDK was installed via the package manager, as suggested here. I've also done multiple reboots since the installation.
Any suggestions on how to fix this error?
Edit
Here's a screen showing Visual Studio's lack of output. There's some general output written while building, but the output is erased immediately when the exception occurs.
I also noticed that I cannot run my application in the Android emulator, which shows that there may be a general installation problem. When trying to run the Android Emulator in Debug mode, I get the following errors:
Let me answer this question in 2 parts:
Debugger not attaching
Multi Device Hybrid Apps CTP1/1.1 only supports debugging on Android devices and emulators 4.4+. This is probably why your debugger fails to attach.
Android emulator not found
It seems that you have not created an AVD (android virtual device), which is why F5 to the Android emulator fails.
Open command prompt and type
android avd
Now, create an AVD image with your preferred configuration and then try to F5 again.
I had the same issue. Don't know if it helps, but in my case I had to uninstall Resharper (Version 8.2).
Related
after several unistalls and reinstalls processes of VS 2017 I'm still getting the following error (translated from spanish) when I try to compile for chrome emulator a new and empty project in vs 2017 RC:
MSBUILD : cordova-build error BLDErr_Build_ToolsetInstallation: Could not find the target tool set on the disk.
I've tried also to perform repair processes but the error still persists. Of course I've checked that android SDK, node, etc. are installed and the environment variables have the correct name and path.
Does anyone know how can force to find cordova tools or whatever it is looking for?
Big thanks in advance.
In my case this worked:
Go to visual studio installer(type it in windows start menu).
Choose to modify your installation of Visual Studio.
Go to indivudual components.
Choose to add cordova 6.3.1(at this moment) toolset.
Install and try to build your project.
I created a new android layout file using visual studio 2015 and am unable to view with the designer that is built in to visual studio.
After selecting 'design' tab, I just see a waiting icon in the center of the view and it never finishes. After a while, i have to close the design tab and open in xml editor. The form is valid as it runs fine in emulator.
ideas?
I was able to resolve after uninstalling all platforms using Android SDK Manager and re-installing each platform 1 by 1. If there is an issue with the installation nothing will be installed (note: watch the logs for errors and review after each platform is installed)
Initially, I did have to manually download SDK Manager and copy the tools folder to my existing installation. I am not sure why my Tools folder was empty but after performing this step I could again run SDK Manager.
I'm using Visual Studio 2015. I'm trying to use Diagnostic Tools and somehow that window is always blank. There is nothing displayed in that window. There is no error too. I tried the same with empty IDE, loading a project, and debugging the project but in all scenarios it is completely blank, just the window heading and nothing else.
I've seen other issues with Diagnostic tools such as this, and this but I can't find anybody facing issue like this.
I tried reinstalling VS and also checked by installing VS 2015 Update 2, nothing helped.
It would be great help for me if anybody got any idea why it is happening or what can I do to find the issue or fix it?
Product version: Visual Studio Enterprise Edition 2015 with Update2
OS: Windows 7 Enterprise Service pack 1
I have experienced this same issue with VS 2017. For me, the problem is that my laptop has a 4K display, but I'm also connected to exernal monitors that are not 4K. VS seems to have trouble rendering the diagnostics tool panel when I move the VS window around or connect/disconnect the external displays. If I restart VS and open it on the desired monitor, it starts displaying again.
Please try to enable logs for the diagnostics tools based on instructions here. Probably, log contents can provide some hint for the reason of the issue.
Starting VS2015 as Administrator worked for me as a workaround.
The only error that I found in logs (enabled as in Andrey's answer) was this one:
Error --- datawarehouse.cpp --- Path should be secure at this point: 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CLIENTDIAGNOSTICS\APPRESPONSIVENESS\..\MemoryProfiler\DataModel'
Otherwise logs looked fine, with entries of Debug and Info importance only and nothing suspicious.
I had the same problem, when I blocked with SRP executable file of Microsoft Edge WebView2:
"C:\Program Files (x86)\Microsoft\EdgeWebView\Application\110.0.1587.50\msedgewebview2.exe"
So, I you wish Diagnostic Tools working, you need to have Microsoft Edge WebView2 installed, or allowed it for execution.
To install it, run the file with arguments:
MicrosoftEdgeWebView2RuntimeInstallerX64.exe /silent /install
I have just started working with Xamarin this week. I created a new "Mobile App" in Azure and downloaded from Azure a sample Xamarin Forms app. When I try opening it in Xamarin Studio, I get this message:
Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file...
There are two problems with this message. First, these warnings exist only in Xamarin Studio. The same solution opened in Visual Studio 2015 does not have this warning - and so it is not possible for me to "double-click" it in Visual Studio.
Second, the full text of this Xamarin Studio warning is virtually inaccessible because there is no way to copy it. What portion of the warning you see above, I had to transcribe. The rest of the warning is VERY long, and Xamarin Studio is acting as if it expects me to copy it somehow. But the only way to copy it...is again to spend twenty or thirty minutes transcribing it. Certainly I must be misunderstanding how to use Xamarin Studio. Here is a screen shot:
Is there a Xamarin Studio keyboard shortcut or trick that would allow me to capture this warning? And is it normal for Xamarin Studio to request problems to be fixed through Visual Studio? Why does the warning not exist in Visual Studio?
This solution also doesn't build in Visual Studio 2015. I don't get any warnings (unfortunately?), and in fact I don't appear to have any build errors either. However, when it attempts to deploy (Windows phone emulation) it gives me a variety of errors. Most of them are of this variety:
The name 'X' does not exist in the current context.
I'm baffled by this, because the symbols it names are indeed missing. So why does it build successfully?
This is not a problem in visual studio or xamarin studio.
If the device on which you are trying to deploy the build,already has an apk file installed(not from your work station), you will get this issue.
To resolve this uninstall it from the device and also from the package manager and then try to deploy the build.
I hope it will help.
I am not sure if this is me doing something stupid or just up against the bleeding edge..
I am developing a simple Cordova app but that is academic since I can repeat this issue with the standard 'Wizzard produced' default application.
I had the app working and debugging fine with VS2013 using both Ripple and occasionally with a real device.
I don't have permanent access to the device so I thought Id try the new VS2015 CTP5 with emulator. So far so good. All builds ok and the app does get deployed to the emulator, and starts. However, VS is stuck in the 'deploying' process and never comes out. To the extent that I have to 'ctrl-Break' out of it. and the debugger never starts.. The last few lines of the build output are:
2> Built the following apk(s):
2> C:\Users\Brett\Documents\VisualStudioCordova\Projects\mblapp\mblapp\bld\Debug\platforms\android\ant-build\CordovaApp-debug.apk
2> Using apk: `C:\Users\Brett\Documents\VisualStudioCordova\Projects\mblapp\mblapp\bld\Debug\platforms`\android\ant-build\CordovaApp-debug.apk
2> Installing app on device...
2> Launching application...
2> LAUNCH SUCCESS
2> Command finished with error code 0: `C:\Users\Brett\Documents\VisualStudioCordova\Projects\mblapp\mblapp\bld\Debug\platforms`\android\cordova\run.bat --nobuild,--target=169.254.138.177:5555,--debug
2>
So there is an error there but I really don't get what it means..
Ok, So I went back to VS2013 but now the 2015 install has changed something and using Ripple it now breaks out of the code at unexpected places in the code.. not breakpoints.. and the javascript console says 'Paused at breakpoint' in its dropdown. I cant access the 2015 Emulator directly, but out of interest I left the emulator running after 2015 was closed and CAN connect AND debug using VS 2013.. great.. but its not a great way to start debugging..
I really like the look of the new Emulator and it does seem to work great with 2013.. so does anyone out there know how to make VS2013 deploy to the new emulator? .. I tried running it and did have some success. But I cant find where VS2015 has hidden its VHD file..
Or, does anyone know why VS2015 might not be deploying correctly.. Im happy to go with a solution that works.. Just that right now Im stuck not going forward, and its an uninstall 2015 and probable reinstall 2013 to go back...
Many thanks.
OK.. Ive posted this as an answer because it does deal with part of it.. and I did struggle a bit so it might help someone else.
Running the emulator from VS2013.
You need to go to the folder
C:\Program Files (x86)\Microsoft Visual Studio Emulator for Android\1.0
where the emulator is installed. Having run it at least once from VS2015, it had created a file called vsemu.vhd and vsemu.sdcard.vhd. Copy both these files to something similar in the same folder I used 'myemu'.
Then to start the emulator I created a simple shortcut with the target property:
"C:\Program Files (x86)\Microsoft Visual Studio Emulator for
Android\1.0\XDE.exe" /vhd bretts.vhd /video 1080x1920
this sets the resolution too.. You can find all the startup flags etc by using:
...XDE /?
Im not sure yet, but I think it stored the various app shortcuts in the sdcard file.. although I wouldn't swear to it. Ill repost if something changes there.
Ok Debugging.. I started VS2013 and set the debug target as 'Device'. This worked fine.. so far.
Id still love to know why 2015 is not deploying properly though, for now I'll just assume its the 'bleeding' part of the bleeding edge.
Cheers
There is a known issue in Visual Studio 2015 CTP5 with Cordova projects deploying to the Visual Studio Emulator for Android. The issue will be resolved in the next release.
In the meantime, here are a few workarounds to try:
Search your machine for Microsoft.VisualStudio.MultiDeviceHybridApps.dll. There will be two copies--one under "Program Files\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Emulator for Android\" (the VS Emulator version of the dll) and one in another folder under "Program Files\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\" (the folder name varies, but it is always some random hash; this is the Cordova version of the dll). Close out of VS2015 and replace the Microsoft.VisualStudio.MultiDeviceHybridApps.dll in the Emulator for Android folder with the one in the Cordova folder (delete the Emulator one, copy the Cordova one, and paste it in the Emulator folder). Then go to "C:\Users\your username\AppData\Local\Microsoft\VisualStudio\14.0\Extensions" and delete the contents of this folder.
Create a new Visual C++ Native-Activity Application (File > New > Project, under Installed\Templates\Visual C++\Cross Platform\Native-Activity Application (Android)) and run it, then return to your Cordova project.
Reinstall CTP5 and the Visual Studio Emulator for Android and reinstall.
Hope this helps!
Another workaround for webkit developers (Android and iOS), the Chrome remote debugger, check out here.
With this you can debug as you would do normally, this does work with the emulators of vs2015 ctp5!