android: Unable to debug an application if it has already been uninstalled.
Steps to Reproduce
-
Have a physical android device with USB debugging enabled, and make sure you’re a developer.
-
Press F5, then wait a few seconds after project launches,
- Fast debugging must be checked.
-
Uninstall the app from your device after stopping debugging session
-
Press F5 again.
Expected Behavior
The application will build successfully (with fast debugging on), and launch successfully, and allow me to debug.
Actual Behavior
It builds the project completely, then just stops, and warns you that fast deployment/debugging is not supported on this version of the device. Once you disable that, the project continues to build properly, then just stops. It doesn’t even go into debugging mode. You can get this error by showing output from debug in the output tab, after the project is built.
> am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "Application.TSC/crc64c9abd8727b8dabd7.MainActivity"
> Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=Application.TSC/crc64c9abd8727b8dabd7.MainActivity }
Error type 3
Error: Activity class {Application.TSC/crc64c9abd8727b8dabd7.MainActivity} does not exist.
The next output will be from the build tab, but there are to many characters, so look at it in paste.rs instead.
Log File
The attached file is a download for the msbuild.binlog file. Download it here
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 44 (20 by maintainers)
@YJH16120 you visual studio installation will have a short cut for a “Developer Command Prompt” [1]. Start that. Then navigate to your project directory so you can run the command
You’ll need to replace the
YourAndroidApp.csprojwith the actual name of your Android csproj. [1] https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2019#start-the-shell-from-inside-visual-studio@YJH16120
We will need a full diagnostic log of the issue please. Normal verbosity will not contain the kind f diagnostic data we need. The easiest way to get that data is to run the following from a Developer command prompt after you have removed the app from the device.
This will produce an
msbuild.binlogfile which you can compress the log file and attach it to this issue. We have a task which specifically detects this kind of situation, so it would be good to know why it is not working in your case.