Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Steps to reproduce this issue:
1. Open API Demo Sample application.
2. Set Target framework to 'Android 4.0.3'
3. Debug the application.
Getting error 'Failed to install the platform framework after debug the application.
Application should deploy to device successfully in debug mode.
Mac All and Windows All
Release Vs Debug: This is happening on debug mode only.
REGRESSION: This is not happening with MD 188.8.131.52 and MFA 4.2.3
Note: Checked also on Beta 184.108.40.206434861 and it is not happening on this MFA.
Tried again after couples of hours by again clearing everything from device and redeploying application on debug mode and it is working fine.
I/PackageManager( 1603): Package Mono.Android.Platform.ApiLevel_8 codePath changed from /data/app/Mono.Android.Platform.ApiLevel_8-1.apk to /data/app/Mono.Android.Platform.ApiLevel_8-2.apk; Retaining data and using new
E/PackageManager( 1603): Package Mono.Android.Platform.ApiLevel_8 signatures do not match the previously installed version; ignoring!
W/PackageManager( 1603): Package couldn't be installed in /data/app/Mono.Android.Platform.ApiLevel_8-2.apk
This seems to be the relevant portion of the logcat. Is this true?
Why is the package is being renamed/relocated as this log snippet indicates? This might give me clues as to how to reproduce.
To clarify the exact behavior when this issue occurred:
During the time this bug was occurring, were you ever able to successfully debug other applications on any environment?
*** Bug 5951 has been marked as a duplicate of this bug. ***
Bug 5951 had similar behavior, so I compared the gists:
I/PackageManager( 1590): Package Mono.Android.Platform.ApiLevel_15 codePath changed from /data/app/Mono.Android.Platform.ApiLevel_15-1.apk to /data/app/Mono.Android.Platform.ApiLevel_15-2.apk; Retaining data and using new
E/PackageManager( 1590): Package Mono.Android.Platform.ApiLevel_15 signatures do not match the previously installed version; ignoring!
W/PackageManager( 1590): Package couldn't be installed in /data/app/Mono.Android.Platform.ApiLevel_15-2.apk
D/dalvikvm( 1590): GC_EXPLICIT freed 867K, 22% free 12516K/16035K, paused 5ms+10ms
D/AndroidRuntime(10905): Shutting down VM
This output from 5951 matches the output of comment 2. There seems to be some sort of issue where the platform framework is not installed correctly in some case, and then the issue persists until the device is cleaned.
How can we get to the bottom of this?
This looks rather like:
So what's probably happening is that the Mono.Android.Platform.* and Mono.Android.DebugRuntime packages are signed with different keys between 4.2.3 and 4.2.4.
(This is certainly the case, actually; every time we build, we generate a new Debug signing key for those packages, so they'll never match from one version to the next.)
The proper fix here is to for the package installation process to remove the packages before installing them, instead of blindly installing them to update them. Remove+install happens for me when using xbuild directly on my development machine; perhaps MonoDevelop needs fixing?
mhutch tells me that MonoDevelop/master is getting a completely different code path for package installation, so we should just let this go for now as it should be fixed in MD 3.0.4.