在Android Studio中安装Vuforia [英] Installing Vuforia in Android Studio

查看:283
本文介绍了在Android Studio中安装Vuforia的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以给我一些有关如何在Android Studio中安装Vuforia的说明吗?我正在制作一个新应用,我需要在Vuforia中使用增强现实.希望你能帮我!

Can anyone give me some instructions of how I'm supposed to install Vuforia in Android Studio? I'm making a new app and I need to use augmented reality with Vuforia. Hope you can help me!

非常感谢!

推荐答案

您需要执行以下步骤:

  • 阅读我们的入门指南,以获取有关设置 Java SDK,Android SDK和NDK:

  • Read our Getting Started Guide for instructions on setting up the Java SDK, Android SDK and NDK:

https://developer.vuforia.com/downloads/sdk

确保已安装最新版本的Android Studio来自:

Make sure you have installed the latest version available of Android Studio from:

http://developer.android.com/sdk/index.html

使用Android SDK Manager(从Android Studio中获取) 最新的Android SDK,Android平台和构建工具

Use the Android SDK Manager (from within Android Studio) to get the latest Android SDK and Android Platform and Build tools

启动Android Studio

Launch Android Studio

选择文件->导入项目 ...并浏览到根目录 您要打开的示例Vuforia项目中的

Select File - > Import Project ... and browse to the root directory of the sample Vuforia project you want to open

继续执行导入向导"对话框(单击下一步",下一步"),直到您 到达带有此消息的页面:

Proceed in the Import Wizard dialog (click Next, Next) until you reach a page with this message:

  1. 或者,您也可以在下表中填写实际的路径图":
  2. 点击编辑
  3. 输入Vuforia.jar库的实际路径(位于您的 vuforia_install_dir/build/java/vuforia 下)
  1. "Alternatively, you can fill in the actual path map in the table below":
  2. click to edit
  3. enter the actual path to the Vuforia.jar library (which is located under your vuforia_install_dir/build/java/vuforia)

  • 在项目"视图中,右键单击项目",然后展开视图 以便在 app> src> main

  • In the Project view, right-click on the Project and expand the view hierarchy so to locate the Vuforia.jar under app > src > main

    右键单击Vuforia.jar以打开上下文菜单

    right-click on Vuforia.jar to open the context menu

    单击上下文菜单中的添加为库 ..."选项

    click on the "Add as library..." option in the context menu

    或者,如果无法在项目中找到Vuforia.jar 层次结构:

    Alternatively, if you cannot locate the Vuforia.jar in your project hierarchy:

    右键单击项目,然后选择打开模块设置"

    right-click on the Project and select, "Open Module Settings"

    1. 选择应用"
    2. 然后选择依赖项"标签
    3. 单击"+"按钮添加文件依赖关系,然后浏览到
      Vuforia.jar文件
    1. select "App"
    2. then select the "Dependencies" tab
    3. Click on the "+" button to Add a File Dependency and browse to the
      Vuforia.jar file

  • 在Android Studio项目目录下的"app/src/main" 文件夹下创建一个名为"jniLibs" 的文件夹

  • Create a folder called "jniLibs" under the "app/src/main" folder under your Android Studio project directory

    项目根目录下的最终目录结构应为:

    the resulting directory structure under your project root should be:

    /app
      /src
         /main
            /jniLibs
                 /armeabi-v7a
                     /**libVuforia.so**
    

    • 如果您的项目包含"jni" 文件夹,请将其移至某个位置 在您的项目之外(否则Android Studio可能会尝试 编译该文件夹中的源,可能会失败
    • 清理并重建项目
    • 在设备上运行应用
      • If your project includes a "jni" folder, move it to a location outside of your project (otherwise Android Studio may attempt to compile the sources in that folder and may fail)
      • Clean and rebuild the project
      • Run the app on your device
      • 祝你好运:)

        这篇关于在Android Studio中安装Vuforia的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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