我目前正在使用 Visual Studio 2015
创建一个 Android
应用程序。它需要在 AVD
中有一个图像来测试应用程序。
我们如何在 Visual Studio
(Xamarin Project
) 中将图像添加到我们模拟的 Android
设备?
我在 Eclipse
或 Android Studio
(基于Java
)中看到了一些问题和答案:
- How to add an image to the emulator gallery in android studio?
- How we save image in gallery of emulator
- upload picture to emulator gallery
但我找不到在 Visual Studio
中执行此操作的方法。
如果我尝试在我的模拟器中使用摄像头,它会显示摄像头错误,无法连接到摄像头。
因此,自然地,我试图找到一种方法,通过 VS
或直接将图像直接放入模拟的 Android
设备的文件夹中。
有什么想法吗?
最佳答案
So, naturally I am trying to find a way to just put an image directly to the emulated Android device's folder either through VS or directly.
您可以使用DDMS
。
使用 VS 2015 运行您的模拟器。
打开
DDMS
:
使用
文件资源管理器
查找存储 -> 模拟 -> 0 -> 图片文件夹。将您的图片从您的 PC 拉到此文件夹。
重新启动您的 AVD,然后您可以从
Photo
或Gallery
应用程序中找到该文件。
关于c# - 如何直接或通过 Visual Studio(Xamarin 项目)将图像添加到 Android 模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43538453/