首页 > 其他分享 >如何使用vuforiaSDK开发第一个AR demo应用

如何使用vuforiaSDK开发第一个AR demo应用

时间:2022-10-10 21:38:20浏览次数:62  
标签:https demo AR key vuforiaSDK Android com vuforia developer


1.If you are using or planning to use the Android Studio IDE, here are some notes about how to import and build the Vuforia samples:

首先安装好环境:JDK,NDK,AndroidSDK,AndroidStudio IDE

  • Read our Getting Started Guide for instructions on setting up the Java SDK, Android SDK and NDK:
  • Make sure you have installed the latest version available of Android Studio from:
  • 下载好VuforiaSDK for Android :(暂时没什么用)             https://developer.vuforia.com/downloads/sdk
  • Use the AndroidSDK Manager(from within Android Studio) to get the latest Android SDK and Platform tools
  • Launch Android Studio
  • 下载示例程序      https://developer.vuforia.com/downloads/samples
  • SelectFile - > Import Project ... 导入示例程序
  • Select "Create Project from Existing Source" (选择已经存在的AS project) and select the  sample directory (or any other Vuforia sample) to import the sample project
  • 在项目设置那里设置NDK路径
  • Click Apply
  • Compile the project
  • Build the native codeusingndk-build (as explained in our Getting Started guide)
  • Run the app on your device

 

2.申请key

如果不申请项目key,会报错

​https://developer.vuforia.com/targetmanager/licenseManager/licenseListing​

申请完成后,点击APP NAME可以看到申请的key

 

3.为项目配置key

添加key的方法是在 SampleApplicationSession类里面的
Vuforia.setInitParameters(mActivity, mVuforiaFlags, " ");  空格里面就是填写key

 

这是官方介绍:https://developer.vuforia.com/library/articles/Solution/How-To-add-a-License-Key-to-your-Vuforia-App

 

4.下载samples的示例PDF,运行里面的功能即可实现AR的一些demo

标签:https,demo,AR,key,vuforiaSDK,Android,com,vuforia,developer
From: https://blog.51cto.com/u_15740686/5745318

相关文章