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

查看:36
本文介绍了在 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工作室来自:

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

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

使用 Android SDK 管理器(从 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 下)

  • 在项目视图中,右键单击项目并展开视图层次结构,以便在 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 文件

  • 在您的 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天全站免登陆