Adding singalr Dependency in android gives library dependency errorHow do you give a C# Auto-Property a default value?Is there a way to run Python on Android?How do save an Android Activity state using save instance state?Close/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?“Debug certificate expired” error in Eclipse Android pluginsIs there a unique Android device ID?What is 'Context' on Android?Proper use cases for Android UserManager.isUserAGoat()?Error converting

What will Doctor Strange protect now?

How do I minimise waste on a flight?

Every group the homology of some space?

Program for finding longest run of zeros from a list of 100 random integers which are either 0 or 1

Why is it wrong to *implement* myself a known, published, widely believed to be secure crypto algorithm?

How to explain intravenous drug abuse to a 6-year-old?

How can one see if an address is multisig?

How to avoid overlap in the fractions of a table

Exactly which act of bravery are Luke and Han awarded a medal for?

Does this website provide consistent translation into Wookiee?

Why are thrust reversers not used down to taxi speeds?

My perfect evil overlord plan... or is it?

How could a civilization detect tachyons?

Names of the Six Tastes

Examples where existence is harder than evaluation

Should one save up to purchase a house/condo or maximize their 401(k) first?

Light Switch Neutrals: Bundle all together?

Gift for mentor after his thesis defense?

When an electron around an atom drops to a lower state, is 100% of the energy converted to a photon?

Why does this pattern in powers happen?

What is the oldest instrument ever?

Why doesn't a particle exert force on itself?

How long can fsck take on a 30 TB volume?

Was Mohammed the most popular first name for boys born in Berlin in 2018?



Adding singalr Dependency in android gives library dependency error


How do you give a C# Auto-Property a default value?Is there a way to run Python on Android?How do save an Android Activity state using save instance state?Close/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?“Debug certificate expired” error in Eclipse Android pluginsIs there a unique Android device ID?What is 'Context' on Android?Proper use cases for Android UserManager.isUserAGoat()?Error converting






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I am using with signalr on android, after adding dependency from official microsoft website
compile 'com.microsoft.signalr:signalr:1.0.0'



I am having this error.



Error:Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java 8 or above.
If you are using the 'java' gradle plugin in a library submodule add
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.


Gradle sync successfully. but failed in building.



Note that I have already added these line in my app.gradle file but no success.



compileOptions 
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7



This is my gradle file.



android 
compileSdkVersion 27
buildToolsVersion "28.0.3"
useLibrary 'org.apache.http.legacy'
defaultConfig
applicationId "com.example.adnanshaukat.myapplication"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true

buildTypes
release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'


compileOptions
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7



dependencies
compile fileTree(dir: 'libs', include: ['*. jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
exclude group: 'com.android.support', module: 'support-annotations'
)


repositories
maven url "https://jitpack.io"
maven url "https://maven.google.com"

compile "com.android.support:appcompat-v7:27.0.1"
compile "com.android.support:design:27.0.1"
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.squareup.retrofit2:retrofit:2.2.0'
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
compile 'com.android.support:support-v4:27.0.1'
compile 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.android.support:multidex:1.0.0'
compile 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
compile 'com.jaredrummler:material-spinner:1.3.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.microsoft.signalr:signalr:1.0.0'
testCompile 'junit:junit:4.12'



module gradle file



buildscript 
repositories
jcenter()

dependencies
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files



allprojects
repositories
jcenter()
maven
url "https://maven.google.com"

maven
url 'https://jitpack.io'




task clean(type: Delete)
delete rootProject.buildDir



Kindly help I have been trying for 3 days but no success, Will be very thankful :-)










share|improve this question






























    1















    I am using with signalr on android, after adding dependency from official microsoft website
    compile 'com.microsoft.signalr:signalr:1.0.0'



    I am having this error.



    Error:Error converting bytecode to dex:
    Cause: Dex cannot parse version 52 byte code.
    This is caused by library dependencies that have been compiled using Java 8 or above.
    If you are using the 'java' gradle plugin in a library submodule add
    targetCompatibility = '1.7'
    sourceCompatibility = '1.7'
    to that submodule's build.gradle file.


    Gradle sync successfully. but failed in building.



    Note that I have already added these line in my app.gradle file but no success.



    compileOptions 
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7



    This is my gradle file.



    android 
    compileSdkVersion 27
    buildToolsVersion "28.0.3"
    useLibrary 'org.apache.http.legacy'
    defaultConfig
    applicationId "com.example.adnanshaukat.myapplication"
    minSdkVersion 19
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true

    buildTypes
    release
    minifyEnabled false
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'


    compileOptions
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7



    dependencies
    compile fileTree(dir: 'libs', include: ['*. jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
    exclude group: 'com.android.support', module: 'support-annotations'
    )


    repositories
    maven url "https://jitpack.io"
    maven url "https://maven.google.com"

    compile "com.android.support:appcompat-v7:27.0.1"
    compile "com.android.support:design:27.0.1"
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'de.hdodenhof:circleimageview:2.2.0'
    compile 'com.squareup.retrofit2:retrofit:2.2.0'
    compile 'com.squareup.retrofit2:converter-gson:2.2.0'
    compile 'com.android.support:support-v4:27.0.1'
    compile 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
    compile 'com.google.android.gms:play-services:8.1.0'
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
    compile 'com.jaredrummler:material-spinner:1.3.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.microsoft.signalr:signalr:1.0.0'
    testCompile 'junit:junit:4.12'



    module gradle file



    buildscript 
    repositories
    jcenter()

    dependencies
    classpath 'com.android.tools.build:gradle:2.2.3'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files



    allprojects
    repositories
    jcenter()
    maven
    url "https://maven.google.com"

    maven
    url 'https://jitpack.io'




    task clean(type: Delete)
    delete rootProject.buildDir



    Kindly help I have been trying for 3 days but no success, Will be very thankful :-)










    share|improve this question


























      1












      1








      1








      I am using with signalr on android, after adding dependency from official microsoft website
      compile 'com.microsoft.signalr:signalr:1.0.0'



      I am having this error.



      Error:Error converting bytecode to dex:
      Cause: Dex cannot parse version 52 byte code.
      This is caused by library dependencies that have been compiled using Java 8 or above.
      If you are using the 'java' gradle plugin in a library submodule add
      targetCompatibility = '1.7'
      sourceCompatibility = '1.7'
      to that submodule's build.gradle file.


      Gradle sync successfully. but failed in building.



      Note that I have already added these line in my app.gradle file but no success.



      compileOptions 
      sourceCompatibility JavaVersion.VERSION_1_7
      targetCompatibility JavaVersion.VERSION_1_7



      This is my gradle file.



      android 
      compileSdkVersion 27
      buildToolsVersion "28.0.3"
      useLibrary 'org.apache.http.legacy'
      defaultConfig
      applicationId "com.example.adnanshaukat.myapplication"
      minSdkVersion 19
      targetSdkVersion 25
      versionCode 1
      versionName "1.0"
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      multiDexEnabled true

      buildTypes
      release
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'


      compileOptions
      sourceCompatibility JavaVersion.VERSION_1_7
      targetCompatibility JavaVersion.VERSION_1_7



      dependencies
      compile fileTree(dir: 'libs', include: ['*. jar'])
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
      exclude group: 'com.android.support', module: 'support-annotations'
      )


      repositories
      maven url "https://jitpack.io"
      maven url "https://maven.google.com"

      compile "com.android.support:appcompat-v7:27.0.1"
      compile "com.android.support:design:27.0.1"
      compile 'com.android.support.constraint:constraint-layout:1.0.2'
      compile 'de.hdodenhof:circleimageview:2.2.0'
      compile 'com.squareup.retrofit2:retrofit:2.2.0'
      compile 'com.squareup.retrofit2:converter-gson:2.2.0'
      compile 'com.android.support:support-v4:27.0.1'
      compile 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
      compile 'com.google.android.gms:play-services:8.1.0'
      compile 'com.android.support:multidex:1.0.0'
      compile 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
      compile 'com.jaredrummler:material-spinner:1.3.1'
      compile 'com.squareup.picasso:picasso:2.5.2'
      compile 'com.microsoft.signalr:signalr:1.0.0'
      testCompile 'junit:junit:4.12'



      module gradle file



      buildscript 
      repositories
      jcenter()

      dependencies
      classpath 'com.android.tools.build:gradle:2.2.3'
      // NOTE: Do not place your application dependencies here; they belong
      // in the individual module build.gradle files



      allprojects
      repositories
      jcenter()
      maven
      url "https://maven.google.com"

      maven
      url 'https://jitpack.io'




      task clean(type: Delete)
      delete rootProject.buildDir



      Kindly help I have been trying for 3 days but no success, Will be very thankful :-)










      share|improve this question
















      I am using with signalr on android, after adding dependency from official microsoft website
      compile 'com.microsoft.signalr:signalr:1.0.0'



      I am having this error.



      Error:Error converting bytecode to dex:
      Cause: Dex cannot parse version 52 byte code.
      This is caused by library dependencies that have been compiled using Java 8 or above.
      If you are using the 'java' gradle plugin in a library submodule add
      targetCompatibility = '1.7'
      sourceCompatibility = '1.7'
      to that submodule's build.gradle file.


      Gradle sync successfully. but failed in building.



      Note that I have already added these line in my app.gradle file but no success.



      compileOptions 
      sourceCompatibility JavaVersion.VERSION_1_7
      targetCompatibility JavaVersion.VERSION_1_7



      This is my gradle file.



      android 
      compileSdkVersion 27
      buildToolsVersion "28.0.3"
      useLibrary 'org.apache.http.legacy'
      defaultConfig
      applicationId "com.example.adnanshaukat.myapplication"
      minSdkVersion 19
      targetSdkVersion 25
      versionCode 1
      versionName "1.0"
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      multiDexEnabled true

      buildTypes
      release
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'


      compileOptions
      sourceCompatibility JavaVersion.VERSION_1_7
      targetCompatibility JavaVersion.VERSION_1_7



      dependencies
      compile fileTree(dir: 'libs', include: ['*. jar'])
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
      exclude group: 'com.android.support', module: 'support-annotations'
      )


      repositories
      maven url "https://jitpack.io"
      maven url "https://maven.google.com"

      compile "com.android.support:appcompat-v7:27.0.1"
      compile "com.android.support:design:27.0.1"
      compile 'com.android.support.constraint:constraint-layout:1.0.2'
      compile 'de.hdodenhof:circleimageview:2.2.0'
      compile 'com.squareup.retrofit2:retrofit:2.2.0'
      compile 'com.squareup.retrofit2:converter-gson:2.2.0'
      compile 'com.android.support:support-v4:27.0.1'
      compile 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
      compile 'com.google.android.gms:play-services:8.1.0'
      compile 'com.android.support:multidex:1.0.0'
      compile 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
      compile 'com.jaredrummler:material-spinner:1.3.1'
      compile 'com.squareup.picasso:picasso:2.5.2'
      compile 'com.microsoft.signalr:signalr:1.0.0'
      testCompile 'junit:junit:4.12'



      module gradle file



      buildscript 
      repositories
      jcenter()

      dependencies
      classpath 'com.android.tools.build:gradle:2.2.3'
      // NOTE: Do not place your application dependencies here; they belong
      // in the individual module build.gradle files



      allprojects
      repositories
      jcenter()
      maven
      url "https://maven.google.com"

      maven
      url 'https://jitpack.io'




      task clean(type: Delete)
      delete rootProject.buildDir



      Kindly help I have been trying for 3 days but no success, Will be very thankful :-)







      c# android signalr






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 23 at 8:13







      Adnan Shaukat

















      asked Mar 23 at 7:39









      Adnan ShaukatAdnan Shaukat

      63




      63






















          2 Answers
          2






          active

          oldest

          votes


















          0














          Add this in your gradle :



          May be some dependencies can compile with Java 8, not for Android especially. Try to switch that dependencies to older version. I do not know exactly which library you have to downgrade.



           compileOptions 
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8



          EDIT :



          Change this :



          classpath 'com.android.tools.build:gradle:2.2.3'


          to



          classpath 'com.android.tools.build:gradle:3.0.1'





          share|improve this answer

























          • No success it says "Warning:The android.dexOptions.incremental property is deprecated and it has no effect on the build process." Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8.

            – Adnan Shaukat
            Mar 23 at 7:44












          • I have added the lines there but no success, it gives me this error Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8. After enabling jack option using this. 'jackOptions enabled true ' this is the error Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'. > java.lang.NullPointerException (no error message)

            – Adnan Shaukat
            Mar 23 at 7:58












          • what java version have you installed in your system ? @AdnanShaukat

            – Abhinav Gupta
            Mar 23 at 8:00












          • the java version is 1.8.0

            – Adnan Shaukat
            Mar 23 at 8:09












          • can you mention gradle:module file? @AdnanShaukat

            – Abhinav Gupta
            Mar 23 at 8:10


















          0














          Answering my own question.



          The solution I tried and it is working for me after 3 days of struggle.
          Download the jar files from here https://www.dropbox.com/sh/xcccz4gwjnxuiz8/AAClkwO_6KrbbyMclgD2ae_pa?dl=0
          The official dependency from the microsoft website is not working for me.



          download signalr-client-sdk.jar and signalr-client-sdk-android.jar and place them in app/libs folder



          My updated gradle file looks like this



          apply plugin: 'com.android.application'

          android
          compileSdkVersion 27
          buildToolsVersion "28.0.3"
          useLibrary 'org.apache.http.legacy'
          defaultConfig
          applicationId "com.example.adnanshaukat.myapplication"
          minSdkVersion 19
          targetSdkVersion 25
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          multiDexEnabled true

          buildTypes
          release
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'


          compileOptions
          sourceCompatibility JavaVersion.VERSION_1_7
          targetCompatibility JavaVersion.VERSION_1_7



          dependencies
          compile fileTree(dir: 'libs', include: ['*. jar'])
          androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
          exclude group: 'com.android.support', module: 'support-annotations'
          )


          repositories
          maven url "https://jitpack.io"
          maven url "https://maven.google.com"

          compile "com.android.support:appcompat-v7:27.0.1"
          compile "com.android.support:design:27.0.1"
          compile 'com.android.support.constraint:constraint-layout:1.0.2'
          compile 'de.hdodenhof:circleimageview:2.2.0'
          compile 'com.squareup.retrofit2:retrofit:2.2.0'
          compile 'com.squareup.retrofit2:converter-gson:2.2.0'
          compile 'com.android.support:support-v4:27.0.1'
          compile 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
          compile 'com.google.android.gms:play-services:11.0.4'
          compile 'com.android.support:multidex:1.0.1'
          compile 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
          compile 'com.jaredrummler:material-spinner:1.3.1'
          compile 'com.squareup.picasso:picasso:2.5.2'
          compile files('libs/signalr-client-sdk.jar')
          compile files('libs/signalr-client-sdk-android.jar')
          testCompile 'junit:junit:4.12'






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55311675%2fadding-singalr-dependency-in-android-gives-library-dependency-error%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Add this in your gradle :



            May be some dependencies can compile with Java 8, not for Android especially. Try to switch that dependencies to older version. I do not know exactly which library you have to downgrade.



             compileOptions 
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8



            EDIT :



            Change this :



            classpath 'com.android.tools.build:gradle:2.2.3'


            to



            classpath 'com.android.tools.build:gradle:3.0.1'





            share|improve this answer

























            • No success it says "Warning:The android.dexOptions.incremental property is deprecated and it has no effect on the build process." Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8.

              – Adnan Shaukat
              Mar 23 at 7:44












            • I have added the lines there but no success, it gives me this error Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8. After enabling jack option using this. 'jackOptions enabled true ' this is the error Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'. > java.lang.NullPointerException (no error message)

              – Adnan Shaukat
              Mar 23 at 7:58












            • what java version have you installed in your system ? @AdnanShaukat

              – Abhinav Gupta
              Mar 23 at 8:00












            • the java version is 1.8.0

              – Adnan Shaukat
              Mar 23 at 8:09












            • can you mention gradle:module file? @AdnanShaukat

              – Abhinav Gupta
              Mar 23 at 8:10















            0














            Add this in your gradle :



            May be some dependencies can compile with Java 8, not for Android especially. Try to switch that dependencies to older version. I do not know exactly which library you have to downgrade.



             compileOptions 
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8



            EDIT :



            Change this :



            classpath 'com.android.tools.build:gradle:2.2.3'


            to



            classpath 'com.android.tools.build:gradle:3.0.1'





            share|improve this answer

























            • No success it says "Warning:The android.dexOptions.incremental property is deprecated and it has no effect on the build process." Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8.

              – Adnan Shaukat
              Mar 23 at 7:44












            • I have added the lines there but no success, it gives me this error Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8. After enabling jack option using this. 'jackOptions enabled true ' this is the error Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'. > java.lang.NullPointerException (no error message)

              – Adnan Shaukat
              Mar 23 at 7:58












            • what java version have you installed in your system ? @AdnanShaukat

              – Abhinav Gupta
              Mar 23 at 8:00












            • the java version is 1.8.0

              – Adnan Shaukat
              Mar 23 at 8:09












            • can you mention gradle:module file? @AdnanShaukat

              – Abhinav Gupta
              Mar 23 at 8:10













            0












            0








            0







            Add this in your gradle :



            May be some dependencies can compile with Java 8, not for Android especially. Try to switch that dependencies to older version. I do not know exactly which library you have to downgrade.



             compileOptions 
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8



            EDIT :



            Change this :



            classpath 'com.android.tools.build:gradle:2.2.3'


            to



            classpath 'com.android.tools.build:gradle:3.0.1'





            share|improve this answer















            Add this in your gradle :



            May be some dependencies can compile with Java 8, not for Android especially. Try to switch that dependencies to older version. I do not know exactly which library you have to downgrade.



             compileOptions 
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8



            EDIT :



            Change this :



            classpath 'com.android.tools.build:gradle:2.2.3'


            to



            classpath 'com.android.tools.build:gradle:3.0.1'






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 23 at 8:16

























            answered Mar 23 at 7:42









            Abhinav GuptaAbhinav Gupta

            1




            1












            • No success it says "Warning:The android.dexOptions.incremental property is deprecated and it has no effect on the build process." Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8.

              – Adnan Shaukat
              Mar 23 at 7:44












            • I have added the lines there but no success, it gives me this error Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8. After enabling jack option using this. 'jackOptions enabled true ' this is the error Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'. > java.lang.NullPointerException (no error message)

              – Adnan Shaukat
              Mar 23 at 7:58












            • what java version have you installed in your system ? @AdnanShaukat

              – Abhinav Gupta
              Mar 23 at 8:00












            • the java version is 1.8.0

              – Adnan Shaukat
              Mar 23 at 8:09












            • can you mention gradle:module file? @AdnanShaukat

              – Abhinav Gupta
              Mar 23 at 8:10

















            • No success it says "Warning:The android.dexOptions.incremental property is deprecated and it has no effect on the build process." Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8.

              – Adnan Shaukat
              Mar 23 at 7:44












            • I have added the lines there but no success, it gives me this error Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8. After enabling jack option using this. 'jackOptions enabled true ' this is the error Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'. > java.lang.NullPointerException (no error message)

              – Adnan Shaukat
              Mar 23 at 7:58












            • what java version have you installed in your system ? @AdnanShaukat

              – Abhinav Gupta
              Mar 23 at 8:00












            • the java version is 1.8.0

              – Adnan Shaukat
              Mar 23 at 8:09












            • can you mention gradle:module file? @AdnanShaukat

              – Abhinav Gupta
              Mar 23 at 8:10
















            No success it says "Warning:The android.dexOptions.incremental property is deprecated and it has no effect on the build process." Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8.

            – Adnan Shaukat
            Mar 23 at 7:44






            No success it says "Warning:The android.dexOptions.incremental property is deprecated and it has no effect on the build process." Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8.

            – Adnan Shaukat
            Mar 23 at 7:44














            I have added the lines there but no success, it gives me this error Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8. After enabling jack option using this. 'jackOptions enabled true ' this is the error Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'. > java.lang.NullPointerException (no error message)

            – Adnan Shaukat
            Mar 23 at 7:58






            I have added the lines there but no success, it gives me this error Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8. After enabling jack option using this. 'jackOptions enabled true ' this is the error Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'. > java.lang.NullPointerException (no error message)

            – Adnan Shaukat
            Mar 23 at 7:58














            what java version have you installed in your system ? @AdnanShaukat

            – Abhinav Gupta
            Mar 23 at 8:00






            what java version have you installed in your system ? @AdnanShaukat

            – Abhinav Gupta
            Mar 23 at 8:00














            the java version is 1.8.0

            – Adnan Shaukat
            Mar 23 at 8:09






            the java version is 1.8.0

            – Adnan Shaukat
            Mar 23 at 8:09














            can you mention gradle:module file? @AdnanShaukat

            – Abhinav Gupta
            Mar 23 at 8:10





            can you mention gradle:module file? @AdnanShaukat

            – Abhinav Gupta
            Mar 23 at 8:10













            0














            Answering my own question.



            The solution I tried and it is working for me after 3 days of struggle.
            Download the jar files from here https://www.dropbox.com/sh/xcccz4gwjnxuiz8/AAClkwO_6KrbbyMclgD2ae_pa?dl=0
            The official dependency from the microsoft website is not working for me.



            download signalr-client-sdk.jar and signalr-client-sdk-android.jar and place them in app/libs folder



            My updated gradle file looks like this



            apply plugin: 'com.android.application'

            android
            compileSdkVersion 27
            buildToolsVersion "28.0.3"
            useLibrary 'org.apache.http.legacy'
            defaultConfig
            applicationId "com.example.adnanshaukat.myapplication"
            minSdkVersion 19
            targetSdkVersion 25
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            multiDexEnabled true

            buildTypes
            release
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'


            compileOptions
            sourceCompatibility JavaVersion.VERSION_1_7
            targetCompatibility JavaVersion.VERSION_1_7



            dependencies
            compile fileTree(dir: 'libs', include: ['*. jar'])
            androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
            exclude group: 'com.android.support', module: 'support-annotations'
            )


            repositories
            maven url "https://jitpack.io"
            maven url "https://maven.google.com"

            compile "com.android.support:appcompat-v7:27.0.1"
            compile "com.android.support:design:27.0.1"
            compile 'com.android.support.constraint:constraint-layout:1.0.2'
            compile 'de.hdodenhof:circleimageview:2.2.0'
            compile 'com.squareup.retrofit2:retrofit:2.2.0'
            compile 'com.squareup.retrofit2:converter-gson:2.2.0'
            compile 'com.android.support:support-v4:27.0.1'
            compile 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
            compile 'com.google.android.gms:play-services:11.0.4'
            compile 'com.android.support:multidex:1.0.1'
            compile 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
            compile 'com.jaredrummler:material-spinner:1.3.1'
            compile 'com.squareup.picasso:picasso:2.5.2'
            compile files('libs/signalr-client-sdk.jar')
            compile files('libs/signalr-client-sdk-android.jar')
            testCompile 'junit:junit:4.12'






            share|improve this answer



























              0














              Answering my own question.



              The solution I tried and it is working for me after 3 days of struggle.
              Download the jar files from here https://www.dropbox.com/sh/xcccz4gwjnxuiz8/AAClkwO_6KrbbyMclgD2ae_pa?dl=0
              The official dependency from the microsoft website is not working for me.



              download signalr-client-sdk.jar and signalr-client-sdk-android.jar and place them in app/libs folder



              My updated gradle file looks like this



              apply plugin: 'com.android.application'

              android
              compileSdkVersion 27
              buildToolsVersion "28.0.3"
              useLibrary 'org.apache.http.legacy'
              defaultConfig
              applicationId "com.example.adnanshaukat.myapplication"
              minSdkVersion 19
              targetSdkVersion 25
              versionCode 1
              versionName "1.0"
              testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
              multiDexEnabled true

              buildTypes
              release
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'


              compileOptions
              sourceCompatibility JavaVersion.VERSION_1_7
              targetCompatibility JavaVersion.VERSION_1_7



              dependencies
              compile fileTree(dir: 'libs', include: ['*. jar'])
              androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
              exclude group: 'com.android.support', module: 'support-annotations'
              )


              repositories
              maven url "https://jitpack.io"
              maven url "https://maven.google.com"

              compile "com.android.support:appcompat-v7:27.0.1"
              compile "com.android.support:design:27.0.1"
              compile 'com.android.support.constraint:constraint-layout:1.0.2'
              compile 'de.hdodenhof:circleimageview:2.2.0'
              compile 'com.squareup.retrofit2:retrofit:2.2.0'
              compile 'com.squareup.retrofit2:converter-gson:2.2.0'
              compile 'com.android.support:support-v4:27.0.1'
              compile 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
              compile 'com.google.android.gms:play-services:11.0.4'
              compile 'com.android.support:multidex:1.0.1'
              compile 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
              compile 'com.jaredrummler:material-spinner:1.3.1'
              compile 'com.squareup.picasso:picasso:2.5.2'
              compile files('libs/signalr-client-sdk.jar')
              compile files('libs/signalr-client-sdk-android.jar')
              testCompile 'junit:junit:4.12'






              share|improve this answer

























                0












                0








                0







                Answering my own question.



                The solution I tried and it is working for me after 3 days of struggle.
                Download the jar files from here https://www.dropbox.com/sh/xcccz4gwjnxuiz8/AAClkwO_6KrbbyMclgD2ae_pa?dl=0
                The official dependency from the microsoft website is not working for me.



                download signalr-client-sdk.jar and signalr-client-sdk-android.jar and place them in app/libs folder



                My updated gradle file looks like this



                apply plugin: 'com.android.application'

                android
                compileSdkVersion 27
                buildToolsVersion "28.0.3"
                useLibrary 'org.apache.http.legacy'
                defaultConfig
                applicationId "com.example.adnanshaukat.myapplication"
                minSdkVersion 19
                targetSdkVersion 25
                versionCode 1
                versionName "1.0"
                testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
                multiDexEnabled true

                buildTypes
                release
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'


                compileOptions
                sourceCompatibility JavaVersion.VERSION_1_7
                targetCompatibility JavaVersion.VERSION_1_7



                dependencies
                compile fileTree(dir: 'libs', include: ['*. jar'])
                androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
                exclude group: 'com.android.support', module: 'support-annotations'
                )


                repositories
                maven url "https://jitpack.io"
                maven url "https://maven.google.com"

                compile "com.android.support:appcompat-v7:27.0.1"
                compile "com.android.support:design:27.0.1"
                compile 'com.android.support.constraint:constraint-layout:1.0.2'
                compile 'de.hdodenhof:circleimageview:2.2.0'
                compile 'com.squareup.retrofit2:retrofit:2.2.0'
                compile 'com.squareup.retrofit2:converter-gson:2.2.0'
                compile 'com.android.support:support-v4:27.0.1'
                compile 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
                compile 'com.google.android.gms:play-services:11.0.4'
                compile 'com.android.support:multidex:1.0.1'
                compile 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
                compile 'com.jaredrummler:material-spinner:1.3.1'
                compile 'com.squareup.picasso:picasso:2.5.2'
                compile files('libs/signalr-client-sdk.jar')
                compile files('libs/signalr-client-sdk-android.jar')
                testCompile 'junit:junit:4.12'






                share|improve this answer













                Answering my own question.



                The solution I tried and it is working for me after 3 days of struggle.
                Download the jar files from here https://www.dropbox.com/sh/xcccz4gwjnxuiz8/AAClkwO_6KrbbyMclgD2ae_pa?dl=0
                The official dependency from the microsoft website is not working for me.



                download signalr-client-sdk.jar and signalr-client-sdk-android.jar and place them in app/libs folder



                My updated gradle file looks like this



                apply plugin: 'com.android.application'

                android
                compileSdkVersion 27
                buildToolsVersion "28.0.3"
                useLibrary 'org.apache.http.legacy'
                defaultConfig
                applicationId "com.example.adnanshaukat.myapplication"
                minSdkVersion 19
                targetSdkVersion 25
                versionCode 1
                versionName "1.0"
                testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
                multiDexEnabled true

                buildTypes
                release
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'


                compileOptions
                sourceCompatibility JavaVersion.VERSION_1_7
                targetCompatibility JavaVersion.VERSION_1_7



                dependencies
                compile fileTree(dir: 'libs', include: ['*. jar'])
                androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
                exclude group: 'com.android.support', module: 'support-annotations'
                )


                repositories
                maven url "https://jitpack.io"
                maven url "https://maven.google.com"

                compile "com.android.support:appcompat-v7:27.0.1"
                compile "com.android.support:design:27.0.1"
                compile 'com.android.support.constraint:constraint-layout:1.0.2'
                compile 'de.hdodenhof:circleimageview:2.2.0'
                compile 'com.squareup.retrofit2:retrofit:2.2.0'
                compile 'com.squareup.retrofit2:converter-gson:2.2.0'
                compile 'com.android.support:support-v4:27.0.1'
                compile 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
                compile 'com.google.android.gms:play-services:11.0.4'
                compile 'com.android.support:multidex:1.0.1'
                compile 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
                compile 'com.jaredrummler:material-spinner:1.3.1'
                compile 'com.squareup.picasso:picasso:2.5.2'
                compile files('libs/signalr-client-sdk.jar')
                compile files('libs/signalr-client-sdk-android.jar')
                testCompile 'junit:junit:4.12'







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 24 at 10:07









                Adnan ShaukatAdnan Shaukat

                63




                63



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55311675%2fadding-singalr-dependency-in-android-gives-library-dependency-error%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                    은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현