-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid values of $(AndroidDexTool) result in misleading InstallFailedException during deployment instead of an error during the build #4439
Comments
FWIW I updated to the latest version (without changing any settings) and got the |
@Johan-dutoit, thanks for the info! That sounds like it would be a different behavior compared to this particular issue. This issue is only about the case where the If by chance you might have time to update again temporarily to version 10.2.0.100 so that you can collect the diagnostic build output from your build that's giving you the bad results, then if you could attach that build output on a new issue so the team can take a look, that would be perfect. Thanks in advance! |
I am getting this error also. Is the recommended solution to downgrade Xamarin.Android? |
@ctinnell, if you're building on macOS, it's likely you're seeing #4478. There's a candidate workaround mentioned there #4478 (comment). |
Fixes: dotnet#4439 If you build a project with `AndroidDexTool=invalid`, you end up with an APK file that is missing a `classes.dex`. We don't emit an error, and you won't actually know anything is wrong until going to install the APK. If someone did this on accident, I think we can just default `AndroidDexTool=d8` *unless* it is set to `dx`. I updated a test for this.
Fixes: #4439 If you build a project with `AndroidDexTool=invalid`, you end up with an APK file that is missing a `classes.dex`. We don't emit an error, and you won't actually know anything is wrong until going to install the APK. If someone did this on accident, I think we can just default `AndroidDexTool=d8` *unless* it is set to `dx`. I updated a test for this.
Fixes: #4439 If you build a project with `AndroidDexTool=invalid`, you end up with an APK file that is missing a `classes.dex`. We don't emit an error, and you won't actually know anything is wrong until going to install the APK. If someone did this on accident, I think we can just default `AndroidDexTool=d8` *unless* it is set to `dx`. I updated a test for this.
Release status update A new Preview version has now been published that includes the fix for this item. The fix is not yet included in a Release version. I will update this again when a Release version is available that includes the fix. Fix included in Xamarin.Android 10.3.99.230. Fix included on Windows in Visual Studio 2019 version 16.7 Preview 1. To try the Preview version that includes the fix, check for the latest updates in Visual Studio Preview. Fix included on macOS in Visual Studio 2019 for Mac version 8.7 Preview 1. To try the Preview version that includes the fix, check for the latest updates on the Preview updater channel. |
Release status update A new Release version of Xamarin.Android has now been published that includes the fix for this item. Fix included in Xamarin.Android SDK version 11.0.0.3. Fix included on Windows in Visual Studio 2019 version 16.7. To get the new version that includes the fix, check for the latest updates or install the most recent release from https://visualstudio.microsoft.com/downloads/. Fix included on macOS in Visual Studio 2019 for Mac version 8.7. To get the new version that includes the fix, check for the latest updates on the Stable updater channel. |
Context: #4437 (comment)
Steps to reproduce
msbuild -restore -p:AndroidDexTool=invalid -t:Install
Expected behavior
Two possibilities are:
(a) The Build targets fail because
$(AndroidDexTool)
is set to an invalid value.or
(b) The build ignores the invalid value of
$(AndroidDexTool)
and uses whatever the default would be (currentlyd8
).Actual behavior
The Build targets complete successfully, but they skip doing any DEX compilation:
It's not until the
InstallPackageAssemblies
task that a failure appears:The text was updated successfully, but these errors were encountered: