dotnet-presentations / dotnet-maui-workshop

A full day workshop (.NET MAUI Workshop in a Box) on how to build apps with .NET MAUI for iOS, Android, macOS, and Windows
https://docs.microsoft.com/dotnet/maui
MIT License
1.88k stars 588 forks source link

Images aren't loaded in CollectionView for Android emulator #109

Closed chsakell closed 1 year ago

chsakell commented 1 year ago

Images aren't loaded when debugging the application with Android Emulator - This starts from Part 1 of the workshop.

<CollectionView.ItemsSource>
            <x:Array Type="{x:Type model:Monkey}">
                <model:Monkey
                    Name="Baboon"
                    Image="https://raw.githubusercontent.com/jamesmontemagno/app-monkeys/master/baboon.jpg"
                    Location="Africa and Asia" />
                <model:Monkey
                    Name="Capuchin Monkey"
                    Image="https://raw.githubusercontent.com/jamesmontemagno/app-monkeys/master/capuchin.jpg"
                    Location="Central and South America" />
                <model:Monkey
                    Name="Red-shanked douc"
                    Image="https://raw.githubusercontent.com/jamesmontemagno/app-monkeys/master/douc.jpg"
                    Location="Vietnam" />
            </x:Array>
        </CollectionView.ItemsSource>

They load properly when using Windows Machine

Is there any workaround? For example some type of android permission? I can see several related tickets here and there, but no solution!

Info:

chsakell commented 1 year ago

It turned out, the internet connection on the emulator decided to close itself :/ I stopped/started the emulator and everything worked fine For all those who face the same problem, make sure the emulator has access to internet by opening chrome.