Script dockerized error on linux mint

URHO3D_LIB_TYPE=SHARED script/dockerized.sh android rake build install

This command work on linux mint. On my system 64 GB RAM, but for build was used ~13GB. After first execute I get errors, and I just executed the same command without cleaning and second build was successfully.

Why you use dockerized script?

You can build without docker with this script and environment on linux mint:

# !/bin/sh 
export ANDROID_NDK=~/Android/Sdk/ndk/21.0.6113669
export ANDROID_SDK=~/Android/Sdk
export PATH=$ANDROID_NDK/toolchains/x86_64-4.9/prebuilt/linux-x86_64/bin:$ANDROID_NDK/build:$ANDROID_NDK/prebuilt/linux-x86_64/bin:$ANDROID_SDK/tools:$ANDROID_SDK/tools/bin:$ANDROID_SDK/platform-tools:$PATH

export URHO3D_HOME=~/workspace/Urho3D/android/urho3d-lib/build/outputs/aar

cd ./android

gradle wrapper --gradle-version 6.2 --distribution-type all
./gradlew Build


3 Likes

Hi,

Thank you for your help.

I’m trying to do EXACTLY as you do, but Im doing something different…:

image

I think only different thing could be Java version (btw If I use Gradle 6.4 I get other error).

Could you tell me your Java version please?

image

Thanks a lot!

java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

I use this commit, it works with the SDK and NDK versions that I have installed
3c4a0a54894e2ff346aa9f869af4e856cd1cc3ca

The previous script is not what you need now, I use it to build my project. You need this script now, it will build the library and application with examples.

# !/bin/sh 
export ANDROID_NDK=~/Android/Sdk/ndk/21.0.6113669
export ANDROID_SDK=~/Android/Sdk
export PATH=$ANDROID_NDK/toolchains/x86_64-4.9/prebuilt/linux-x86_64/bin:$ANDROID_NDK/build:$ANDROID_NDK/prebuilt/linux-x86_64/bin:$ANDROID_SDK/tools:$ANDROID_SDK/tools/bin:$ANDROID_SDK/platform-tools:$PATH
gradle wrapper --gradle-version 6.2 --distribution-type all
./gradlew Build

To save disk space and speedup build you can set the target processor architecture in gradle.properties, for example:
ANDROID_ABI=armeabi-v7a

1 Like