[英]How to Add an Image to Android Emulator Directly or through Visual Studio (Xamarin Project)
I currently am creating an Android
application using Visual Studio 2015
. 我目前正在使用
Visual Studio 2015
创建一个Android
应用程序。 It requires to have an image in the AVD
to test the application. 它需要在
AVD
有一个图像来测试应用程序。
How do we add image to our emulated Android
device in Visual Studio
( Xamarin Project
)? 如何在
Visual Studio
( Xamarin Project
)中将图像添加到模拟的Android
设备中?
I have seen some questions and answers to do so in Eclipse
or Android Studio
( Java
-based): 我已经在
Eclipse
或Android Studio
(基于Java
)中看到了一些问题和答案:
But I cannot find one to do it in Visual Studio
. 但是我找不到在
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 through VS
or directly. 因此,自然地,我试图找到一种方法,可以通过
VS
或直接将图像直接放入仿真的Android
设备的文件夹中。
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.
因此,自然地,我试图找到一种方法,可以通过VS或直接将图像直接放入仿真的Android设备的文件夹中。
You can use DDMS
. 您可以使用
DDMS
。
Run your emulator with VS 2015. 使用VS 2015运行模拟器。
Open DDMS
: 打开
DDMS
:
Use File Explorer
to find storage -> emulated -> 0 ->Pictures folder. 使用
File Explorer
查找存储->模拟-> 0-> Pictures文件夹。
Pull your picture from your PC to this folder. 将图片从PC拉到此文件夹。
Restart your AVD, then you can find the file from Photo
or Gallery
app. 重新启动AVD,然后您可以从“
Photo
或“ Gallery
应用程序中找到文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.