如何直接或通过 Visual Studio(Xamarin 项目)将图像添加到 Android 模拟器 [英] How to Add an Image to Android Emulator Directly or through Visual Studio (Xamarin Project)

查看:43
本文介绍了如何直接或通过 Visual Studio(Xamarin 项目)将图像添加到 Android 模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 Visual Studio 2015 创建一个 Android 应用程序.它需要在 AVD 中有一个图像来测试应用程序.

我们如何在 Visual Studio(Xamarin 项目)中向我们模拟的 Android 设备添加图像?

我在 EclipseAndroid Studio(基于Java)中看到了一些问题和答案:

  1. 所以,自然地,我试图找到一种方法,通过 VS 或直接将图像直接放入模拟的 Android 设备的文件夹中.

    有什么想法吗?

    解决方案

    所以,自然地,我试图找到一种方法,通过 VS 或直接将图像直接放入模拟的 Android 设备的文件夹中.

    您可以使用DDMS.

    1. 使用 VS 2015 运行模拟器.

    2. 打开DDMS:

    1. 使用 File Explorer 查找存储 -> 模拟 -> 0 ->Pictures 文件夹.

    2. 将您的图片从 PC 拉到此文件夹.

    3. 重新启动您的 AVD,然后您可以从 PhotoGallery 应用中找到该文件.

    I currently am creating an Android application using Visual Studio 2015. It requires to have an image in the AVD to test the application.

    How do we add image to our emulated Android device in Visual Studio (Xamarin Project)?

    I have seen some questions and answers to do so in Eclipse or Android Studio (Java-based):

    1. How to add an image to the emulator gallery in android studio?
    2. How we save image in gallery of emulator
    3. 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 through VS 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.

    1. Run your emulator with VS 2015.

    2. Open DDMS:

    1. Use File Explorer to find storage -> emulated -> 0 ->Pictures folder.

    2. Pull your picture from your PC to this folder.

    3. Restart your AVD, then you can find the file from Photo or Gallery app.

    这篇关于如何直接或通过 Visual Studio(Xamarin 项目)将图像添加到 Android 模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆