ORGE

compile ogre under ubuntu

cmake .
make 
make install
// build Tutorials
cd Samples/Tutorials
cmake . -DCMAKE_MODULE_PATH=/usr/local/lib/OGRE/cmake
make
export LD_LIBRARY_PATH="/usr/local/lib64:/usr/local/lib:/home/syj/coderoom/ogre/build/Dependencies/lib:/home/syj/coderoom/ogre/build/Dependencies/lib:$LD_LIBRARY_PATH"

build ogredeps android

http://wiki.ogre3d.org/tiki-index.php?page=CMake+Quick+Start+Guide&tikiversion=Android
https://cn.aliyun.com/jiaocheng/71073.html
去cmake官网下载
cmake version 3.4

hg clone https://bitbucket.org/cabalistic/ogredeps
cd ogredeps
mkdir build
cd build
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="../cmake/android.toolchain.cmake" -DANDROID_NDK=/home/syj/tools/android-ndk-r10d -DANDROID_ABI=armeabi-v7a -DANDROID_NATIVE_API_LEVEL=10 -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9 -DCMAKE_INSTALL_PREFIX=../Dependencies  ..
make
make install

build ogre android

cd ogre
mkdir Dependencies
mkdir build 
cd build
mkdir Dependencies
cp -rf ~/coderoom/my_program/ogredeps/Dependencies/   ~/coderoom/my_program/ogre/Dependencies
cp -rf ~/coderoom/my_program/ogredeps/Dependencies/   ~/coderoom/my_program/ogre/build/Dependencies
cd build
cmake -DCMAKE_TOOLCHAIN_FILE="../CMake/toolchain/android.toolchain.cmake"  -DANDROID_NDK=/home/syj/tools/android-ndk-r10d -DANDROID_ABI=armeabi-v7a  -DANDROID_NATIVE_API_LEVEL=10 -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9 ..
make

error1

*************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
Invalid or unsupported command "update project --target 1 --path /home/syj/coderoom/my_program/ogre/build/SampleBrowserNDK"

Supported commands are:
android list target
android list avd
android list device
android create avd
android move avd
android delete avd
android list sdk
android update sdk
Samples/Browser/CMakeFiles/SampleBrowser.dir/build.make:145: recipe for target 'SampleBrowserNDK/libs/armeabi-v7a/libOgreSampleBrowser.so' failed
make[2]: *** [SampleBrowserNDK/libs/armeabi-v7a/libOgreSampleBrowser.so] Error 2
make[2]: *** 正在删除文件“SampleBrowserNDK/libs/armeabi-v7a/libOgreSampleBrowser.so”
CMakeFiles/Makefile2:1375: recipe for target 'Samples/Browser/CMakeFiles/SampleBrowser.dir/all' failed
make[1]: *** [Samples/Browser/CMakeFiles/SampleBrowser.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

解决方案

I have searched and found no replacement for the `android update project` command.
If you still need to build I suggest reverting to SDK Tools 25.2.5 or earlier as they removed the command in [Build Tool 25.3.0](https://developer.android.com/studio/releases/sdk-tools.html)

You can download them from here and replace the `tools` folder in your ANDROID_SDK_HOME directory
[https://dl.google.com/android/repository/tools_r25.2.5-windows.zip](https://dl.google.com/android/repository/tools_r25.2.5-windows.zip)
[https://dl.google.com/android/repository/tools_r25.2.5-macosx.zip](https://dl.google.com/android/repository/tools_r25.2.5-macosx.zip)
[https://dl.google.com/android/repository/tools_r25.2.5-linux.zip](https://dl.google.com/android/repository/tools_r25.2.5-linux.zip)

error2

   [dx] Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0

update jdk to 1.8

你可能感兴趣的:(ORGE)