将 JAR 添加到 Visual Studio 2015 Android Ant Java 项目 [英] Add JAR to Visual Studio 2015 Android Ant Java project

查看:32
本文介绍了将 JAR 添加到 Visual Studio 2015 Android Ant Java 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Visual C++/Cross Platform/Android/Basic Application (Android, Ant) 模板在 Visual Studio 2015 中创建了一个项目.

I used the Visual C++/Cross Platform/Android/Basic Application (Android, Ant) template to create a project in Visual Studio 2015.

我想将 .jar 文件添加到项目中,但我一生都找不到有关如何执行此操作的任何文档.我将 .jar 复制到了 android/libs 文件夹,但在构建时找不到它.

I want to add a .jar file to the project and for the life of me cannot find any documentation on how to do this. I copied the .jar to the android /libs folder, but it is not finding it on build.

推荐答案

我在尝试将 fmod 添加到 Visual Studio 2015 中的 android 项目时遇到了同样的问题.

I ran into this same issue when attempting to add fmod to an android project in Visual Studio 2015.

最终对我有用的是在与src"和res"文件夹相同的目录中创建一个libs"文件夹,将 .jar 放在那里,并将其包含在我的 Android 项目中(将其标记为内容"在 Visual Studio 的属性页中).

What ended up working for me was creating a "libs" folder in the same directory as my "src" and "res" folders, placing the .jar in there, and including that in my Android project (marking it as "Content" in the Property Pages in Visual Studio).

这篇关于将 JAR 添加到 Visual Studio 2015 Android Ant Java 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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