【发布时间】:2018-03-26 07:54:42
【问题描述】:
我正在 xamarin.forms 中制作一个简单的应用程序。它会做一些事情,但我现在面临的问题是我有一张想要在启动时显示的图像。
它可以在 Android 模拟器上运行,但不能在实际的 android 设备上运行。 (我的手机)
我要呈现的图像是本地图像,它同时位于“Mobile/Resources/Drawable/image.png”和“Mobile.Android/Resources/Drawable/image.png”中
它们也是属性中正确的资源设置:“Embedded Resource”和“AndroidResource”。
为什么它不起作用?应用启动,但图像不存在。
编辑:
我的 xaml 看起来像这样:
<StackLayout
Orientation="Vertical"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
<Image Source="MainPage.png" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" />
</StackLayout>
【问题讨论】:
-
嗨,我的回答对你有用吗?
标签: android mobile xamarin.forms android-emulator