0

Unfortunately VS Emulator for Android never worked for me. So I was doing Android apps on Xamarin Studio on Mac only. But my recent purchase of Surface Book and VS2015 release made me to move my development to Windows 10 platform.

After watching the Ch9 video on Visual Studio Emulator for Android, I tried it again. But unfortunately the app deploys to the emulator but crashes without any message, Output or logs.

When I tried to drag-drop a .apk file built on Mac using Xamarin Studio on to the emulator on Windows 10, it produced the following error in a log.

WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix. pkg: /data/local/tmp/com.companyname.xpa_xamarin_4_xfp.apk Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]

21665 KB/s (7692230 bytes in 0.346s)

But I know many of you are working regularly with this emulator. Please help me to isolate what is wrong with my setup.

My Dev environment is: Surface Book running Windows 10 with latest update, VS Emulator for Android is 5" KitKat (4.4) API Level 19, Visual Studio 2015 Enterprise ed. with Update 1, Xamarin V4.0.1.96, Xamarin.Android V6.0.1.10.

Let me know if you need any more details.

ESM
  • 1
  • 1
  • 1
    Are you using any Google Play API's in your app? If so, you will need to install GAPPS on the emulator. Also, the error you are seeing looks like the APK you are installing is not signed, even with a developer certificate. Have you tried just building, deploying and debugging from Visual Studio rather than drag and drop? – Rob Prouse Feb 25 '16 at 17:09
  • No Google Play is used. Even the default code created by Xamarin's blank app template doesn't run even when deployed from VS. Either way it doesn't work. At least when I drag-drop I get the log entry mentioned above. Otherwise no message of any type. No indication of what happened even in the VS Output window. – ESM Feb 26 '16 at 15:14
  • One more note: I have signed VS edition and I am an authorized Xamarin subscriber. I suppose that should install the necessary certificates. Anything else need to be done? I am not very conversant with these certificates. – ESM Feb 26 '16 at 15:16
  • For Android you don't need to worry about dev certificates (created for you) and you shouldn't have to do anything except install VS and install Xamarin. When I do that and set my Android project as the startup project in Visual Studio, the run button in the toolbar switches to a dropdown run button that allows me to select which emulator or device to run on. Pressing it builds, starts the emulator, deploys and runs. Maybe something is wrong with your install and you need to re-install? – Rob Prouse Feb 26 '16 at 15:27
  • @RobProuse I forgot to mention you. – ESM Feb 26 '16 at 16:09
  • @RobProuse Hmmm...that's what I do with all other projects. On Android emulator fails on Windows machine. That happened with my previous Windows 8.1 machine also. But that had only 6 GB. Now I have 16 GB. I can connect to iOS also. I tried the things mentioned in [link](http://stackoverflow.com/questions/32560853/app-not-run-in-visual-studio-emulator-for-android-in-visual-studio-2015?rq=1). I already have SDK path set properly. But one thing: doing **adb devices** shows me that the active network adapter IP address is _offline_. Is that a reason? – ESM Feb 26 '16 at 16:16
  • the adb devices offline could cause it. I've had my Hyper-V virtual switch messed up by my VPN before. I ended up going into Hyper-V manager, deleting the emulator VMs, then deleting the emulator switch, then I think rebooting, then starting the VMs in VS will recreate them and the switch. Basically a variation on this - http://stackoverflow.com/questions/29903619/windows-phone-emulator-not-starting-couldnt-setup-the-udp-port – Rob Prouse Feb 26 '16 at 17:08
  • is it just this project? Do other Android projects work? – Rob Prouse Feb 26 '16 at 17:09

1 Answers1

0

The text relocations are the culprit.

What was considered fixed when the warning message no longer appeared on Lollipop was in fact only a cover-up of the issue.

Read this all the way down: https://code.google.com/p/android/issues/detail?id=23203

On Marshmellow, the app would just crash without notice. Nougat at least tells you why it doesn't permit deployment.

But the bug has never been fixed, it has just been declared a feature now.

You can try building with API level 21 which will make it work on older devices.

souldealer_B317
  • 171
  • 1
  • 8