如何直接或通过 Visual Studio(Xamarin 项目)将图像添加到 Android 模拟器 [英] How to Add an Image to Android Emulator Directly or through Visual Studio (Xamarin Project)
问题描述
我目前正在使用 Visual Studio 2015
创建一个 Android
应用程序.它需要在 AVD
中有一个图像来测试应用程序.
我们如何在 Visual Studio
(Xamarin 项目
)中向我们模拟的 Android
设备添加图像?
我在 Eclipse
或 Android Studio
(基于Java
)中看到了一些问题和答案:
所以,自然地,我试图找到一种方法,通过
VS
或直接将图像直接放入模拟的Android
设备的文件夹中.有什么想法吗?
解决方案所以,自然地,我试图找到一种方法,通过 VS 或直接将图像直接放入模拟的 Android 设备的文件夹中.
您可以使用
DDMS
.使用 VS 2015 运行模拟器.
打开
DDMS
:
使用
File Explorer
查找存储 -> 模拟 -> 0 ->Pictures 文件夹.将您的图片从 PC 拉到此文件夹.
重新启动您的 AVD,然后您可以从
Photo
或Gallery
应用中找到该文件.
I currently am creating an
Android
application usingVisual Studio 2015
. It requires to have an image in theAVD
to test the application.How do we add image to our emulated
Android
device inVisual Studio
(Xamarin Project
)?I have seen some questions and answers to do so in
Eclipse
orAndroid Studio
(Java
-based):- 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
But I cannot find one to do it in
Visual Studio
.If I try to use camera in my emulator, it shows camera error, cannot connect to camera.
So, naturally I am trying to find a way to just put an image directly to the emulated
Android
device's folder either throughVS
or directly.Any idea?
解决方案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.
You can use
DDMS
.Run your emulator with VS 2015.
Open
DDMS
:
Use
File Explorer
to find storage -> emulated -> 0 ->Pictures folder.Pull your picture from your PC to this folder.
Restart your AVD, then you can find the file from
Photo
orGallery
app.
这篇关于如何直接或通过 Visual Studio(Xamarin 项目)将图像添加到 Android 模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!