分享好友 最新动态首页 最新动态分类 切换频道
android studio
2024-12-27 05:40

Setting up openFrameworks with Android Studio is fairly straightforward. The basic steps are:

  • Install Android Studio and the Android SDK
  • Install the Android NDK (actually tested version is r15c)
  • Download openFrameworks from the download page or from git
  • If you got openFrameworks from git:
    • Run to download libraries.
    • Use the Project Generator to generate Android Studio project files for android examples.
  • In Android Studio, use Open an existing Android Studio project and select an openFrameworks example from the folder.
  • It will ask you for NDK location, either put the path in or click Project Structure and select the NDK location.
  • Let Android Studio download all other dependencies missing automatically.
  • Build and run

Download and install Android Studio from https://tools.android.com/download/studio/stable (you need Android Studio 1.0 or higher). It should come with (or automatically install) a recent SDK, though you can customize the SDK version later from within Android Studio using Tools ➞ Android ➞ SDK Manager.

In the event that Android Studio does not come with an SDK, you can install it from https://developer.android.com/sdk/index.html (under "Get the SDK for an existing IDE").

This is the C/C++ compiler, headers and libraries for Android. OF 0.10.0 has been tested with the NDK version r15c, newer versions might work but it's not guaranteed.

https://developer.android.com/ndk/downloads/older_releases

  • OS X: https://dl.google.com/android/repository/android-ndk-r15c-darwin-x86_64.zip
  • Linux 64: https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip
  • Windows 32: https://dl.google.com/android/repository/android-ndk-r15c-windows-x86.zip
  • Windows 64: https://dl.google.com/android/repository/android-ndk-r15c-windows-x86_64.zip

Once you downloaded the android ndk .zip, you'll have to install it in the "ndk" folder of android studio sdk. To know the path of the android studio sdk, open android studio. You should see the welcome screen. If you have an open project close it with "File" > "Close project". Click on the button at the bottom right : "Configure" > "SDK manager". Can also be found in "File" > "Settings" > "File At the top you should have a path pointing to the SDK location, called "Android SDK location". On windows it is probably :

Now in the file explorer go to that location, and look for a "ndk" folder. If it doesn't exist create one, and paste the extracted folder here...

Download it from the downloads page. Once downloaded, extract it in the location of your choice.

At the Android Studio welcome screen select Open an Existing Android Studio Project.

Then browse to any of the android examples in .

Accept all the prompts and wait for Android Studio to set up the project.

You'll have to wait a bit: the first sync will automatically build openFrameworks. If it doesn't work (Gradle sync still fails), try looking at the Troubleshooting tips bellow. In some cases, clicking on the error in the console window will take you to a solution, such as installing various versions of the Android SDK. In some cases, you may have to do this several times to solve several missing dependencies.

Press the Play button next to the shown in the toolbar. With any luck, it should build the app, and momentarily deploy it to your Android device (or prompt you to deploy it on a suitable emulator). If the app runs, congratulations! You have setup openFrameworks.

To deploy on your android device you may have to download the appropriate SDK (deppending on your android version). Your device have to be in "Develloper mode", with Usb debug activated.

To create new projects just use the project generator for your platform that you can find in the root folder. For linux you'll need to run



before being able to run the project generator

  • If you have an error like this :

    • Click on the link provided by the error, it should open a file.
    • in that file there is probably something a line like (Windows)
    • dupplicate this line and change "sdk.dir" in "ndk.dir", and add " dkandroid-ndk-15" at the end. You should have something like that :
    • Save the file, close the project and try to open the project again (You may have to do this for every example, but once you done it with the "empty android example" it should be fine)
  • If the error is asking to, install . In android studio, no project opened, go to "Configure" > "SDK manager" > "SDK Tools". Check the at the bottom. Install version 25.0.3 of .

  • You may need to adjust the following numbers to match your installed Android Studio and Android SDK. Android Studio should offer to fix these values for you when you open the appropriate build files.

    • The Gradle version specified in
    • The , , , values in and
  • If you get strange linker errors, check that you are using the 15c version of the NDK. Newer NDKs might work but usually there's some always some fixes that need to be done when moving to a new NDK version.

  • If you get make errors on gradle sync without any details, run from within the project folder to build the project from command line, and get more detailed error messages.

最新文章
SEO优化关键词工具实战指南,快速提升网站排名秘籍
本攻略全面解析SEO优化关键词工具,涵盖工具选择、使用技巧、案例分析,助您轻松提升网站排名,实现高效SEO优化。随着互联网的快速发展,搜索引擎优化(SEO)已成为网站中不可或缺的一部分,关键词优化作为SEO的核心,对于提高网站排名、吸
适用于 AI 加速器互联,Synopsys 业界率先推出 Ultra Ethernet、UALink IP 解决方案
  IT之家 12 月 12 日消息,Synopsys 新思科技美国加州当地时间 11 日宣布在业界率先推出适用于大规模 AI 加速器集群互联的 Ultra Ethernet 和 UALink IP 解决方案。  IT之家了解到,Ultra Ethernet 与 UALink 对标英伟达的 InfiniBand
神马搜索无法通过https站点验证解决办法-小小课堂SEO培训教程
神马搜索只专注移动端的中文搜索引擎,2018年7月显示占据国内搜索引擎(PC+移动)份额为15%,占据国内移动端份额为18.84%。今天,小小课堂SEO自学网带来的是《神马搜索无法通过https站点验证解决办法》。希望本次的SEO教程对大家有所帮助。
南京旅游景点推荐,十一去南京旅游景点推荐
大家好,今天小编关注到一个比较有意思的话题,就是关于南京旅游景点推荐的问题,于是小编就整理了5个相关介绍南京旅游景点推荐的解答,让我们一起看看吧。南京历史文化底蕴深厚,同时也是时尚的现代化大都市。中山陵总统府十分壮观雄伟,
无敌神马影视影院为您带来精彩影视体验与无限乐趣
无敌神马影视影院以其丰富的影视资源和便捷的观看体验,吸引了众多用户。无论是最新的热门电影,还是经典的老片,这里几乎应有尽有。用户只需简单的搜索,就能找到想看的内容,让观影变得轻松愉快。在互联网的海洋中,污视频下载成为了一种
【V8腾讯手机管家下载】VINUS V8腾讯手机管家16.1.19免费下载
腾讯手机管家专注手机骚扰拦截,动态守护手机安全,深度清理微信、QQ缓存,让手机体积减半,拒绝卡慢。---认真服务---【骚扰拦截】智能拦截骚扰电话,过滤诈骗垃圾短信【清理加速】清理加速能力升级,释放空间告别卡慢【微信清理】个性清理
华为手机怎么设置双击亮屏
在智能手机日益普及的今天,各种便捷的操作方式也层出不穷。其中,双击亮屏功能因其便捷性而备受用户青睐。华为手机作为市场上的热门品牌,同样提供了这一功能。下面,我们就来详细讲解一下如何在华为手机上设置双击亮屏。首先,你需要打开
我为同学做实事 | 研途加油站:科研软件分享(第三期)
我为同学做实事研途加油站:科研软件分享(第三期)SPSS(Statistical Package for the Social Sciences)是一款专为社会科学领域设计的数据分析软件,其功能强大且易于使用,特别适合于教育和市场调研等领域,并且其直观的操作界面非常适
庆阳谷歌SEO营销赋能,助企业跨境拓展全球市场
庆阳谷歌SEO营销公司专注于助力企业国际化,通过优化谷歌搜索排名,帮助企业快速抢占全球市场先机,提升品牌国际影响力。随着互联网技术的飞速发展,越来越多的企业开始意识到的重要性,在众多营销手段中,谷歌(搜索引擎优化)以其精准的
移动网站建设的前景/珠海网站建设优化
作者:CodeBear的园子 www.cnblogs.com/CodeBear/p/10911177.html本文是站在小白的角度去讨论布隆过滤器,如果你是科班出身,或者比较聪明,又或者真正想完全搞懂布隆过滤器的可以移步。不知道从什么时候开始ÿ
相关文章
推荐文章
发表评论
0评