Skip to content
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

VS 16.4.0 App Crashes on startup on 4.3 (API 16) device #4029

Closed
bellissimo opened this issue Dec 12, 2019 · 3 comments
Closed

VS 16.4.0 App Crashes on startup on 4.3 (API 16) device #4029

bellissimo opened this issue Dec 12, 2019 · 3 comments
Assignees
Labels
Area: App+Library Build Issues when building Library projects or Application projects. need-info Issues that need more information from the author.

Comments

@bellissimo
Copy link

bellissimo commented Dec 12, 2019

Problem appears to be same as #3314, though that was apparently fixed in VS 16.3

Steps to Reproduce

Startup a project with min target version of 4.3, and run it on a 4.3 (API 16) device in Release mode using following options:

<Optimize>true</Optimize> <DebugType>portable</DebugType> <ProduceReferenceAssembly>True</ProduceReferenceAssembly> <PlatformTarget>AnyCPU</PlatformTarget> <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> <ErrorReport>prompt</ErrorReport> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime> <AndroidLinkMode>Full</AndroidLinkMode> <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk> <BundleAssemblies>false</BundleAssemblies> <AndroidCreatePackagePerAbi>true</AndroidCreatePackagePerAbi> <Debugger>Xamarin</Debugger> <AotAssemblies>false</AotAssemblies> <AndroidEnableProfiledAot>true</AndroidEnableProfiledAot> <EnableLLVM>false</EnableLLVM> <AndroidAotAdditionalArguments>no-write-symbols,nodebug</AndroidAotAdditionalArguments> <AndroidEnableMultiDex>false</AndroidEnableMultiDex> <DebugSymbols>true</DebugSymbols> <MonoSymbolArchive>True</MonoSymbolArchive> <AndroidEnablePreloadAssemblies>false</AndroidEnablePreloadAssemblies> <AndroidUseAapt2>true</AndroidUseAapt2> <AndroidDexTool>d8</AndroidDexTool> <AndroidLinkTool>r8</AndroidLinkTool> <AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent> <MandroidI18n /> <AndroidPackageFormat>apk</AndroidPackageFormat>

Expected Behavior

App should start up without error

Actual Behavior

App crashes on startup with following stack trace:

Caused by: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f080059 at android.content.res.Resources.loadDrawable(Resources.java:2974) at android.content.res.Resources.getDrawable(Resources.java:1558) at android.support.v4.content.ContextCompat.getDrawable() at android.support.v7.widget.AppCompatDrawableManager.getDrawable() at android.support.v7.widget.AppCompatDrawableManager.getDrawable() at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup() at android.support.v7.widget.AppCompatDrawableManager.getDrawable() at android.support.v7.widget.TintTypedArray.getDrawableIfKnown() at android.support.v7.app.AppCompatDelegateImpl.<init>() at android.support.v7.app.AppCompatDelegate.create() at android.support.v7.app.AppCompatActivity.getDelegate() at android.support.v7.app.AppCompatActivity.onCreate() at crc647161f1f7492af3a2.TabActivity.n_onCreate(Native Method) at crc647161f1f7492af3a2.TabActivity.onCreate() at android.app.Activity.performCreate(Activity.java:5372) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257) ... 11 more Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid drawable tag vector at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:933) at android.graphics.drawable.Drawable.createFromXml(Drawable.java:873) at android.content.res.Resources.loadDrawable(Resources.java:2970)

Version Information

Microsoft Visual Studio Professional 2019
Version 16.4.0
VisualStudio.16.Release/16.4.0+29519.181
Microsoft .NET Framework
Version 4.8.03752

Installed Version: Professional

Visual C++ 2019 00435-60000-00000-AA950
Microsoft Visual C++ 2019

Azure App Service Tools v3.0.0 16.4.457.38025
Azure App Service Tools v3.0.0

C# Tools 3.4.0-beta4-19569-03+82f2e2541478e239dc4b04f231e90dc2b3dcb422
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus 1.2.0 (d16-2@8b56e20)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

IntelliCode Extension 1.0
IntelliCode Visual Studio Extension Detailed Info

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio 16.5.23 (1b51e8c)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 5.4.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Visual Basic Tools 3.4.0-beta4-19569-03+82f2e2541478e239dc4b04f231e90dc2b3dcb422
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.4 for F# 4.6 16.4.0-beta.19556.5+e7597deb7042710a7142bdccabd6f92b0840d354
Microsoft Visual F# Tools 10.4 for F# 4.6

Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

VisualStudio.DeviceLog 1.0
Information about my package

VisualStudio.Foo 1.0
Information about my package

VisualStudio.Mac 1.0
Mac Extension for Visual Studio

Xamarin 16.4.000.305 (d16-4@a9ec5d9)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 16.4.0.464 (remotes/origin/d16-4@4abf337c3)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 16.4.25 (579ee62)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 10.1.0.30 (d16-4/5e2fd06)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: e1ef774
Java.Interop: xamarin/java.interop/d16-4@c4e569f
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@46204c4
Xamarin.Android Tools: xamarin/xamarin-android-tools/master@9f4ed4b

Xamarin.iOS and Xamarin.Mac SDK 13.8.2.2 (44c08f2)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

@bellissimo
Copy link
Author

I can confirm that adding <AndroidAapt2LinkExtraArgs>--no-version-vectors</AndroidAapt2LinkExtraArgs> stops it from crashing. Though I was assuming that was what the fix was supposed to do automatically in 16.3?

@jonathanpeppers
Copy link
Member

@bellissimo can you attach a diagnostic MSBuild log? Thanks!

@jonathanpeppers jonathanpeppers self-assigned this Jan 7, 2020
@jonathanpeppers jonathanpeppers added the Area: App+Library Build Issues when building Library projects or Application projects. label Jan 7, 2020
@jonathanpeppers jonathanpeppers added this to the Under Consideration milestone Jan 7, 2020
@jonathanpeppers jonathanpeppers added the need-info Issues that need more information from the author. label Jan 7, 2020
@radekdoulik
Copy link
Member

We are unable to investigate this issue further without the requested information.

Hopefully you found a resolution meanwhile! If not, please try the latest version of the product and if the problem still occurs, reply with the requested information and reopen this issue.

@ghost ghost locked as resolved and limited conversation to collaborators Jun 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: App+Library Build Issues when building Library projects or Application projects. need-info Issues that need more information from the author.
Projects
None yet
Development

No branches or pull requests

3 participants