1
\$\begingroup\$

I am creating a game with AndEngine on Android Studio (v.3.0.1). When I run the game on my Honor 8 (7.0) everything works as expected. But on the Samsung A3 (7.0) or J5 (7.1.1) a Dialog appears saying: 'Detected problems with app native libraries (please consult log for detail): libandengine.so: text relocations.

Logcat: W/linker: /data/app/whatever.at.hatchy-1/lib/arm/libandengine.so has text relocations. This is wasting memory and prevents security hardening. Please fix.

AndEngine build.gradle:

apply plugin: 'com.android.library'

android {
    compileSdkVersion 21
    buildToolsVersion "26.0.2"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 21

        ndk {
            moduleName "andengine_shared"
        }
    }
    sourceSets {
        main {
            jni.srcDirs = []
        }
    }
    compileOptions {
        encoding "UTF-8"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

App build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "whatever.at.app"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

    compile project(':andEngine4')
    compile 'com.google.android.gms:play-services-analytics:11.8.0'
    compile 'com.google.android.gms:play-services-ads:11.8.0'
    //compile 'com.android.support:support-v4:23.4.0'
}

Additionally the camera/gameview size changes and doesn't adapt to the set width and height but don't know if this problem is dependent on the same issue.

Does anybody know what todo in such case?

Thanks

\$\endgroup\$
  • \$\begingroup\$ Did you find a solution ? I m facing the same issue... \$\endgroup\$ – fandro Jun 19 '18 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.