Skip to content

[Android] Drawable error isn't clear #4204

Closed

Description

@davidjohnoliver

What would you like to be added:

https://github.com/unoplatform/uno/blob/master/src/Uno.UWP/Helpers/DrawableHelper.Android.cs#L40

If this error is thrown it probably means that app code is trying to access drawables (eg creating an ImageSource) before App.InitializeComponent() has been called.

The error should make it more clear what's failing and why. Eg: "Drawable resources are not initialized. On Android, local assets are only available after App.InitializeComponent() has been called."

Why is this needed:

For which Platform:

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Skia
    • WPF
    • GTK (Linux)
    • Tizen
  • Windows
  • Build tasks
  • Solution Templates

Anything else we need to know?

Activity

  1. added
    kind/enhancement
    good first issue
    triage/untriaged
    hacktoberfest
    on Oct 2, 2020
  2. botex98 commented on Oct 2, 2020

    @botex98
    Contributor

    Can I take this issue? @davidjohnoliver
    To be clear: Only error message should be changed, yes?

  3. davidjohnoliver commented on Oct 2, 2020

    @davidjohnoliver
    ContributorAuthor

    Can I take this issue? @davidjohnoliver
    To be clear: Only error message should be changed, yes?

    Go for it!

    I would probably also change the exception type to InvalidOperationException, but that's it. :)

  4. botex98 commented on Oct 2, 2020

    @botex98
    Contributor

    @davidjohnoliver I just submitted the PR.
    One thing I noticed is that you have

    • iOS

    ticked, but it should be Android instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuehacktoberfestkind/enhancementtriage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions