Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Get Rid of Oreo Signalr Issue in Android 8.0

    • 0
    • 0
    • 0
    • 3
    • 0
    • 0
    • 0
    • 961
    Answer it

    Hello,

    When i am using signalr client sdk in android , but its not installing application in android oreo(anroid 8.0) and error occurs like "Installation failed with message Failed to finalize session : INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113.".

     

    my gradle code is below.

    android {
        compileSdkVersion 26
        defaultConfig {
            applicationId "com.myapplication.testapp"
            minSdkVersion 17
            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 {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:26.1.0'
        implementation 'com.android.support.constraint:constraint-layout:1.0.2'
        implementation 'com.android.support:design:26.1.0'
        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 files('libs/gson-2.2.2.jar')
        compile files('libs/signalr-client-sdk.jar')
        compile files('libs/signalr-client-sdk-android.jar')
    }
    

    Same application its working fine in anroid 6.0.

 3 Answer(s)

  • First of all, substitute the official files of SignalR SDK with the files that you can find at this link: https://github.com/eak65/FixedSignalRJar

    When you do that, edit the "build.gradle" file of your application, adding the following code in the "android" block, after the "buildTypes" block:

        splits {
                abi {
                    enable true
                    reset()
                    include 'x86', 'armeabi-v7a'
                    universalApk true
                }
            }
        
        packagingOptions {
                exclude 'lib/getLibs.ps1'
                exclude 'lib/getLibs.sh'
                exclude 'lib/gson-2.2.2.jar'
            }

    The above solution helped me after a lot of struggling! I hope it helps you too!
  • Well, it seems I solved my problem. Try to get to source code and add it to your project.
    In my case, after rebuilding the project using the new gradle and targetSdk to 26, it starts running, BUT signalR never connected.
    So, I was debuging my last project and noted that some classes were different, then I simply copy the classes from the last project (built signalr-client-java.jar) to the source code imported to my new project. And now it works fine.

    If my explanation is confusing, feel free to ask.
  • Hello @TradeTech, I had the same issue, and solve THIS issue compiling the signalr-client source code using new gradle and android sdk (26).
    But now I got new issue... it seems not working properly, the app installs as expected, but the signalR seems to not connected.
     Please someone help us  
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: