OpenGLES 2 Crossplatfrom Application - Android Gradle而不是Ant? [英] OpenGLES 2 Crossplatfrom Application - Android Gradle instead of Ant?

查看:73
本文介绍了OpenGLES 2 Crossplatfrom Application - Android Gradle而不是Ant?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从VS 2015开始,visual studio可以使用共享代码为andoid和iOS开发。 OpenGLES 2 Crossplatfrom Application可以为Windows,iOS和Android创建项目,但问题是fororid的构建系统默认为Ant而没有任何选项
来更改它。


我们正在为我们的Android使用NVidia Codeworks进行迁移,并希望将我们已经拥有的相同代码链接到OpenGLES 2 Crossplatfrom Application Projects之一,但我们需要Gradle来完成它。


我们如何在使用Gradle构建的Visual Studio中创建Native Andorid应用程序?


我们还观察到自动生成的Ant项目调用javac,但我们在项目的任何地方都看不到任何java源文件。我们需要访问java,所以我们可以调用JNI来获取Android框架中我们无法在c ++中执行的操作。


java源文件在自动生成的代码中的位置,或者我们如何更改/覆盖任何默认值它可能正在使用?

解决方案

Hi Force Gaia,


感谢您在此处发帖。


>> 我们如何在使用Gradle构建的Visual Studio中创建Native Andorid应用程序?


Gradle确实是Android的默认构建系统已经有一段时间了Android开发人员已慢慢但肯定地转向Gradle。 Gradle提供灵活性以及为Android构建定义通用标准的能力。 Gradle
允许Android开发人员使用简单的声明性DSL来配置支持各种Android设备和App商店的Gradle构建。


使用最新的Visual Studio版本,如果您查看文件中的跨平台C ++部分 - >新项目模板部分,您将看到如下文档中所示的各种模板。


https://blogs.msdn.microsoft.com/vcblog/2016/06/12/build-your-android-applications-in-visual-studio-using-gradle/


希望这可以帮助你。


最好的问候,

Sera Yu


As of VS 2015 visual studio can develop for andoid and iOS using shared code. The OpenGLES 2 Crossplatfrom Application can create projects for windows, iOS and Android, but the thing is that the build system for andorid defaults to Ant without any option to change it.

We're migrating over from using NVidia Codeworks for our android and would like to link in the same code we already have to one of the OpenGLES 2 Crossplatfrom Application Projects, but we need Gradle to do it.

How can we create a Native Andorid App in Visual studio that builds using Gradle?

We also observed the auto-generated Ant project calling javac, but we couldn't see any java source files anywhere in the project. We need access to the java so we can call through the JNI to get to the Android framework for bits we can't do in c++.

Where do the java source files live in the auto-generated code, or how to we alter/override any default ones that it may be using?

解决方案

Hi Force Gaia,

thanks for posting here.

>>How can we create a Native Andorid App in Visual studio that builds using Gradle?

Gradle has really been the default build system for Android for quite some time and Android developers have slowly but surely been moving to Gradle. Gradle provides flexibility as well as the ability to define common standards for Android builds. Gradle allows Android developers to use a simple, declarative DSL to configure Gradle builds supporting a wide variety of Android devices and App stores.

With the latest Visual Studio release, if you take a look at the cross-platform C++ section in the File->New project template section, you will see a variety of templates as shown in the document below.

https://blogs.msdn.microsoft.com/vcblog/2016/06/12/build-your-android-applications-in-visual-studio-using-gradle/

Hope this could be help of you.

Best Regards,
Sera Yu


这篇关于OpenGLES 2 Crossplatfrom Application - Android Gradle而不是Ant?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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