4

I am using Visual Studio 2015 with Update 3 on Windows 8.1, and I want to debug the application on my Android Phone, I have Oppo A37f mobile.

Earlier, I was using Visual Studio 2015 with Update 3 on Windows 10 and I was able to debug the application with Samsung Galaxy S2 but now I am getting an error in that too, "Unable to install an application or check MainLauncher=true". Is there anything that I have to do?

Is there any other way in that I can check/debug my code?

4 Answers 4

5

Now, I can successfully debug an application in Oppo A37f (Android 5.1) device, I will check in Samsung Galaxy S2 later. I have just disabled the Use Shared Runtime from Android Options

enter image description here

0
3

Just a suggestion may help you, make sure that you have turned on your mobile developer option as well as try to install the driver of the same phone on your windows system and check those drivers gets install properly from control panel => hardware options,

Also try to find device log option and connect your phone from there

These steps fixed my problem you can also try.

1
  • I can see my device in build option, I can see the log in Android Log Cat but whenever I select "Debug" then application just start in device and close immediately. Commented Dec 29, 2016 at 16:44
2

Uninstall the app from settings > applications > all. Then retry, it worked for me.

0
2

Two things I would try here:

  1. Force Uninstall application from android emulator/device

    • Sometimes switching between deployment machines causes an old version to stay installed and will cause errors on the Android side
    • Need to call adb uninstall <package_name> from adb located in the Android SDK Platform Tools (Something like C://Program Files(x86)/Android/android-sdk/platform-tools/adb.exe)
    • Try debugging application again after you have confirmed the application has been installed by using adb shell pm list packages to verify the package isn't listed.
  2. Make sure you have the appropriate ABI's selected in your Android project

    • Navigate to your Android Project Options and try checking all of the available ABI's for your Android build. I say this since I haven't checked the ABI of your device.
    • Try debugging application

I hope this helps. If you are still having problems, leave me a comment and I'll try and look into it.

3
  • Hi BrewMate, Thanks for your comment, I can install application in my Oppo A37f (Android 5.1) it's working very fine in Release mode. but when I select debug then Application is closing immediately after splash screen. Commented Dec 29, 2016 at 16:47
  • Thanks for the additional info. Try playing around with the Android Project Options settings. Try disabling "Use shared mono runtime" and making sure the linker settings are set to "Don't link". If that doesn't work, try running the adb logcat before debugging on the device. This will print out the ADB output to a console window and you should see some error giving more info that might be helpful.
    – BrewMate
    Commented Dec 29, 2016 at 16:55
  • Hi BrewMate, I got below output in Output Window, after debugging.Start debugging Android application ... Starting Android application ... Android application is debugging. referenceTable GDEF length=670 1 referenceTable GSUB length=7202 1 referenceTable GPOS length=24560 1 Couldn't connect to logcat, GetProcessId returned: 0 Commented Dec 29, 2016 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.