Urho3D : Build Sample on Android


        Here the sample Urho3D running on Android devices, if you're interesting in native performance with hi-end graphics, i've recommended Urho3D for making 3d game for cross-platform various PC, Mac, Linux, Android, iOS, Apple TV, Raspberry Pi and others in the future release.

        If you want to learn from official goto this site build Urho3D but if you want to see awesome sample immediately let's follow me.

Pre-require
  • MacOS Sierra
  • Eclipse ADT
  • Android NDK r15c or above [ Download ]
  • Urho3D 1.7 source [ Download ]
  • Urho3D 1.7 Android-SHARED 32-bit [ Download ]
Test devices
  • Asus ZenFone 4 (A450CG) (Android 4.4)
  • Lenovo A7000-a (Android 6.0)
  • Samsung Galaxy Tab A (Android 6.0)
Let's get start
  • First, extract Urho3D 1.7 source zip file and extract Urho3D 1.7 Android-SHARED 32-bit zip file see your folder structure should be like below image.
Urho3D 1.7 source

Urho3D 1.7 Android-SHARED 32-bit
  • Launch Eclipse ADT then right-click left panel and Import... or choose menu File > Import... after that choose Android > Existing Android Code Into Workspace, browse... to folder Urho3D-1.7 > Android and click Open then click Finish (follow below image step by step).
Choose File > Import...

Choose Android > Existing Android Code Into Workspace, click Next.

At Root Directory choose Browse...

Choose Urho3D-1.7 > Android, click Open.

Click Finish.
  • Connect your Android device via usb then right-click on SampleLauncher, choose Run As > Android Application. Then choose your Android device from list (or Android Simulator)


  • You should have got an error Fatal Exception similar below image. Don't worry about that.

  • Next we need to add asset, library and share object. Goto Urho3D-1.7-Android-SHARED/share/Urho3D/Resources then copy Autoload, CoreData and Data folder and paste under Urho3D-1.7/Android/assets (see below image).
Copy Autoload CoreData and Data under Urho3D-1.7-Android-SHARED/share/Urho3D/Resources

Goto Urho3D-1.7/Android/assets (your SampleLauncher)

Paste Autoload CoreData and Data

  • Next goto under Urho3D-1.7-Android-SHARED/libs/armeabi-v7a/Urho3D copy all file.so then goto under Urho3D-1.7/Android after that create libs folder and under libs folder create armeabi-v7a folder then paster all file.so here (see below image).
Copy all file.so under Urho3D-1.7-Android-SHARED/libs/armeabi-v7a/Urho3D

Under Urho3D-1.7/Android create libs folder

Under libs create armeabi-v7a folder

Under armeabi-v7a folder paster all file.so
  • The last thing you need c++ shared object from Android NDK, if you don't have one please download and extract it. Then goto under android-ndk-r15c/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a we need file libc++_shared.so, copy it and goto under Urho3D-1.7/Android/libs/armeabi-v7a paste libc++_shared.so here. (see below image).
Under android-ndk-r15c/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a copy libc++_shared.so

Paste libc++_shared.so under Urho3D-1.7/Android/libs/armeabi-v7a

  • Back to Eclipse ADT, right-click on root project SampleLauncher and choose Refresh then right-click on SampleLauncher, choose Run As > Android Application to test again. Your project should be install on Android device without an error (if your app close immediately just try to launch app again on android device NOT on eclipse adt). 
After launcher open, you can choose any sample you want.

Sample 06 SkeletalAnimation

  • Hope you're enjoy with Urho3D :)

Comments