v1.12.1 android build on Windows and Android Studio

Problems building or running the engine, queries about how to use features etc.
Post Reply
pkovacs86
Gnoblar
Posts: 20
Joined: Mon May 27, 2013 3:09 pm

v1.12.1 android build on Windows and Android Studio

Post by pkovacs86 » Fri Jul 26, 2019 12:02 pm

Ogre Version: :?: v1.12.1
Operating System: :?: Android build on Windows
Render System: :?: GLES2

Dear All,

Is it possible to build v1.12.1 to Android on Windows by Android Studio?
If so anyone could provide a step-by-step tutorial?
Unfortunately, I wasn't able to find a tutorial how to do this....

Any help would be appreciated.

BR
Peter
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 877
Joined: Sun Mar 30, 2014 2:51 pm
x 177
Contact:

Re: v1.12.1 android build on Windows and Android Studio

Post by paroj » Fri Jul 26, 2019 5:22 pm

do you mean building a C++ or a Java Application?

For the latter the Android SDK should just work.
1 x

pkovacs86
Gnoblar
Posts: 20
Joined: Mon May 27, 2013 3:09 pm

Re: v1.12.1 android build on Windows and Android Studio

Post by pkovacs86 » Sat Jul 27, 2019 2:22 pm

Dear Pavel,

Thank you for your quick response.
Meanwhile, I find these two instructions:
https://wiki.ogre3d.org/CMake+Quick+Sta ... on=Android
https://ogrecave.github.io/ogre/api/lat ... -ogre.html
The second link is for the version 1.12.1 but this tutorial only contains information
for Android building on Ubuntu.
However the first link seems fine but it looks like this is not for the latest release.
Which 1.10.X release version is fine for the first link?

Anyways, I just would like to build ogredeps, ogre and then the samples via Android Studio on Windows.
So, if I just follow
https://wiki.ogre3d.org/CMake+Quick+Sta ... on=Android
these instructions with one of the 1.10.X version is it proper tutorial?
Sorry for these humble questions but I'am completely new to Android devs, nevertheless we are using Ogre3D for our R&D projects for a decade but only on Windows.

BR
Peter
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 877
Joined: Sun Mar 30, 2014 2:51 pm
x 177
Contact:

Re: v1.12.1 android build on Windows and Android Studio

Post by paroj » Sat Jul 27, 2019 4:12 pm

this is the most up-to date documentation:
https://ogrecave.github.io/ogre/api/lat ... -ogre.html

actually it contains nothing Linux specific. The same CLI commands should work on windows as well.

You do not need to build ogredeps separately since 1.10.

You should use 1.12.1 though as it is the first one to support android studio.
1 x

pkovacs86
Gnoblar
Posts: 20
Joined: Mon May 27, 2013 3:09 pm

Re: v1.12.1 android build on Windows and Android Studio

Post by pkovacs86 » Sat Jul 27, 2019 10:21 pm

Many thanks Pavel for your quick answers.
Based on your guides I'll try the latest version by its documentation.
I'll get back with the result :)

BR
Peter
0 x

pkovacs86
Gnoblar
Posts: 20
Joined: Mon May 27, 2013 3:09 pm

Re: v1.12.1 android build on Windows and Android Studio

Post by pkovacs86 » Mon Jul 29, 2019 11:11 am

Recently I tried the cmake CLI command from the latest tutorial
https://ogrecave.github.io/ogre/api/lat ... -ogre.html
but I got the following error:
Image

Based on the above mentioned error, the cmake of the ogre v1.12.1 will generate
NVIDIA® Nsight™ Tegra®, Visual Studio Edition project and Visual Studio could be used instead of Android Studio?

BR
Peter
0 x

pkovacs86
Gnoblar
Posts: 20
Joined: Mon May 27, 2013 3:09 pm

Re: v1.12.1 android build on Windows and Android Studio

Post by pkovacs86 » Mon Jul 29, 2019 2:17 pm

After installing Nvidia Codeworks for Android and Nvidia NSight Tegra Visual Studio Edition
the following error was raised after this cmake cli command
cmake -DCMAKE_TOOLCHAIN_FILE=C:\NVPACK\android-ndk-r15c\build\cmake\android.toolchain.cmake -DANDROID_NDK=C:\NVPACK\android-ndk-r15c .

Please find the attached CMakeError.log file

BR
Peter
Attachments
CMakeError.log
(3.36 KiB) Downloaded 11 times
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 877
Joined: Sun Mar 30, 2014 2:51 pm
x 177
Contact:

Re: v1.12.1 android build on Windows and Android Studio

Post by paroj » Mon Jul 29, 2019 4:48 pm

pkovacs86 wrote:
Mon Jul 29, 2019 11:11 am
Based on the above mentioned error, the cmake of the ogre v1.12.1 will generate
NVIDIA® Nsight™ Tegra®, Visual Studio Edition project and Visual Studio could be used instead of Android Studio?
this is wrong. Probably nobody tried building it on Windows yet. I will fix it, however I will only have time for this in ~2 Weeks. Please open an issue for this on github, so I dont forget.
0 x

pkovacs86
Gnoblar
Posts: 20
Joined: Mon May 27, 2013 3:09 pm

Re: v1.12.1 android build on Windows and Android Studio

Post by pkovacs86 » Tue Jul 30, 2019 9:09 am

Dear Pavel,

Sure, and many thanks for your support.
In the meantime, I'll update the issue if I have any progress.

BR
Peter
0 x


pkovacs86
Gnoblar
Posts: 20
Joined: Mon May 27, 2013 3:09 pm

Re: v1.12.1 android build on Windows and Android Studio

Post by pkovacs86 » Thu Aug 08, 2019 12:54 pm

Hey,

Thank you again for your great advise.
I downloaded the Ninja from here
https://github.com/ninja-build/ninja/releases
Then the following cmake cli command was fired:
C:\ogre>cmake -DCMAKE_TOOLCHAIN_FILE=C:\NVPACK\android-ndk-r15c\build\cmake\android.toolchain.cmake -DANDROID_NDK=C:\NVPACK\android-ndk-r15c -G Ninja .

Ninja.exe must be copied to the Android NDK folder "C:\NVPACK\android-ndk-r15c" or put it to the Path. But maybe much better to copy to the NDK folder in order to avoid some confusion of Path Env. Var.

And the result is
-- Configuring done
-- Generating done
-- Build files have been written to: C:/ogre

And the c:\ogre\SampleBrowserNDK was created and the SampleBrowserNDK gradle project was successfully opened in Android Studio.

I have to check the build time, but it seems something is working at cmake-time :)

If the build and the run-time is also working then I'll provide a short step-by-step tutorial how to generate,build and run SampleBrowserNDK from a Windows host.
Image
0 x

pkovacs86
Gnoblar
Posts: 20
Joined: Mon May 27, 2013 3:09 pm

Re: v1.12.1 android build on Windows and Android Studio

Post by pkovacs86 » Thu Aug 08, 2019 1:44 pm

Okay,

The SampleBrowserNDK Android Studio Project is able to install and run the NativeActivity APK after the
cmake cli command
C:\ogre>cmake -DCMAKE_TOOLCHAIN_FILE=C:\NVPACK\android-ndk-r15c\build\cmake\android.toolchain.cmake -DANDROID_NDK=C:\NVPACK\android-ndk-r15c -G Ninja .
but the following error is occoured

Image

Of course, I could start to debug what's going on, but If anybody could validate that the SampleBrowserNDK is a proper
Android Studio Gradle project then it would be much easier for me because I'm completely new to android devs.

BR
Peter
0 x

pkovacs86
Gnoblar
Posts: 20
Joined: Mon May 27, 2013 3:09 pm

Re: v1.12.1 android build on Windows and Android Studio

Post by pkovacs86 » Fri Aug 09, 2019 10:21 am

I can confirm that the v1.12.1 Android SDK
https://www.ogre3d.org/download/sdk
is working on Windows host via Android Studio
with emulator Pixel 2 XL(Android 7.0, API 24, ABI arm64-v8a)

Image

Thank you Pavel for your support

BR
Peter
0 x

Post Reply