Minie for Androids

I upgraded the NDK to v21.3.6528147 and the Gradle plugin to v4.1.1 without difficulty.

I’m still working to specify minSdkVersion and targetSdkVersion.
Edit: got them working! I’ll cut another test release ASAP.

1 Like

Thank you Stephen :slightly_smiling_face:, I have a little question though , Does JmE dependencies work on Gradle 4.1.1 ?

EDIT : i have found this part when i have looked into the EVENT Log (i donot know why i didnot do that before :smile:) :

8:15 AM	Failed to commit install session 1556183842 with command cmd package install-commit 1556183842. Error: INSTALL_FAILED_INVALID_APK: Failed to extract native libraries, res=-2

, then it gives this error , :

8:15 AM	Error
				Installation did not succeed.
				The application could not be installed: INSTALL_FAILED_INVALID_APK
				Retry

8:15 AM	Session 'app': Installation did not succeed.
				The application could not be installed: INSTALL_FAILED_INVALID_APK
				Retry

Sorry, I don’t know the meaning/cause of those errors.

I do know that Gradle (v6.7) and the Android Gradle plugin (v4.1.1) are 2 different things.

Please give Minie v3.1.0-test2 a try…

1 Like

Google found this:

android - Installation failed with message Failed to commit install session - Stack Overflow

1 Like

This did not work too , seemingly , the versions are excluded , EDIT : I mean it seems that NDK version was not the problem

I have checked that before ,but I will take a look again at instant Run :slightly_smiling_face:

Please elaborate. What did you do, what did you expect, and what actually happened?

1 Like

I did like what you have said to me

& Gave that a try for android minSDKVersion 23 & got the same problem

I expect that there’s something with the underlying code ,but I donot know , I havenot worked before with Android NDK

If you haven’t already, please do “Build → Clean Project” then “Build → Rebuild Project” then “Sync project with Gradle file”.

1 Like

Any news, @Pavl_G ?

1 Like

Hi @sgold sorry for late reply , I tried clean , build , sync & rerun by the same problem exists

1 Like

Hi guys!

is there any progress on this? If not, I may have the time to try helping you getting minie working on android or at least testing it. I’m really interested

3 Likes

As far as I know, the status hasn’t changed. Minie was working on Android back in April, at least for some people. But as far as I know, @Pavl_G never got v3.0.0 working on a physical device.

I’d sure appreciate a few more data points.

2 Likes

Hi @sgold , Minie3.0.0 works fine on android , my complaint was something lies around the MinSDK which I cannot rise above android 5.1 , & what’s the importance of Minimum SDK , it’s only for publishing purposes & restricting Android devices that use your app ! , Using MinSDK above android 5.1 or API 22 , I get invalid apk when installing debug app .

Edit : this game was Minie v3 minSDk 22

PS : if you will build a combined app that uses android APIs & jme , you will need the MinSDK because some APIs are tied to some android versions while jme is not ! ,Unless you use a specific version for openGL ES

1 Like

@Pavl_G have you tried forcing android:extractNativeLibs=“true” in your application tag in the manifest when compiling setting API level over 22? This should do the trick

@sgold This is great news! I’ve been out of jme community for a while, so I didn’t know it already worked

2 Likes

No , I didnot , I will try & tell you if I get something working :+1:

1 Like

Problem solved :slight_smile: , thanks @joliver82 :+1: :heart: , much appreciated ,

it actually solves this problem :

2 Likes

Thank you both!

2 Likes

My Gradle file , just for anyone needs :

apply plugin: 'com.android.application'

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.2"
    defaultConfig {
        applicationId "com.myGame"
        minSdkVersion 28
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    configurations.all {
        exclude group:"org.jmonkeyengine",module:"jme3-desktop"
    }
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.2.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
    implementation 'androidx.navigation:navigation-fragment:2.3.0'
    implementation 'androidx.navigation:navigation-ui:2.3.0'
    implementation project(path: ':GamePad')
    implementation project(path: ':JmESurfaceView')
    testImplementation 'junit:junit:4.13.1'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation "org.jmonkeyengine:jme3-core:3.3.2-stable"
    implementation "org.jmonkeyengine:jme3-effects:3.3.2-stable"
    implementation "org.jmonkeyengine:jme3-android-native:3.3.2-stable"
    implementation "org.jmonkeyengine:jme3-lwjgl:3.3.2-stable"
    implementation 'com.github.stephengold:Minie:3.0.0'
}
4 Likes

Ready to upgrade to MInie v3.1.0?

1 Like

okay , i will do it now !

1 Like