Fix android simulator (#277)

* Fix android CI

* Set NDK path

* Reduced log spam

* Fixed NDK path

* Fixed NDK path

* Android NDK v21e

* Use debug signin config
if SIGNING_STORE_FILE is not defined
This allows the apk to be installed

* Fix OmegaActivity class name

* Fix formatting

Co-authored-by: Yaya-Cout <yaya.cout@free.fr>

Co-authored-by: Yaya-Cout <yaya.cout@free.fr>
This commit is contained in:
Loïc
2023-01-01 14:16:12 +01:00
committed by GitHub
parent ed002ed14b
commit 1a681c7c75
3 changed files with 6 additions and 2 deletions

View File

@@ -48,7 +48,9 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- run: make -j2 PLATFORM=simulator TARGET=android
- run: wget -nv https://dl.google.com/android/repository/android-ndk-r21e-linux-x86_64.zip
- run: unzip -q android-ndk-r21e-linux-x86_64.zip
- run: make -j2 PLATFORM=simulator TARGET=android NDK_PATH=./android-ndk-r21e
- id: 'auth'
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
uses: 'google-github-actions/auth@v0'

View File

@@ -55,6 +55,8 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt')
if (projectVariable('SIGNING_STORE_FILE')) {
signingConfig signingConfigs.environment
} else {
signingConfig signingConfigs.debug
}
}
}

View File

@@ -12,7 +12,7 @@ const char * languageCode() {
JNIEnv * env = static_cast<JNIEnv *>(SDL_AndroidGetJNIEnv());
jobject activity = static_cast<jobject>(SDL_AndroidGetActivity());
jclass j_class = env->FindClass("io/github/omega/OmegaActivity");
jclass j_class = env->FindClass("io/github/omega/simulator/OmegaActivity");
jmethodID j_methodId = env->GetMethodID(
j_class,
"retrieveLanguage",