Cannot sync project with gradle files












-1















i cannot sync my project with gradle files.
i have this problem with all projects!



error:
Gradle sync failed: com.android.ide.common.gradle.model.level2.IdeDependenciesFactory.setRootBuildId(Ljava/lang/String;)Vcom.android.ide.common.gradle.model.level2.IdeDependenciesFactory.setRootBuildId(Ljava/lang/String;)V



i've tried change my gradle dist to newest version (gradle-4.10.3-all) and i've tried delete gradle caches.










share|improve this question





























    -1















    i cannot sync my project with gradle files.
    i have this problem with all projects!



    error:
    Gradle sync failed: com.android.ide.common.gradle.model.level2.IdeDependenciesFactory.setRootBuildId(Ljava/lang/String;)Vcom.android.ide.common.gradle.model.level2.IdeDependenciesFactory.setRootBuildId(Ljava/lang/String;)V



    i've tried change my gradle dist to newest version (gradle-4.10.3-all) and i've tried delete gradle caches.










    share|improve this question



























      -1












      -1








      -1








      i cannot sync my project with gradle files.
      i have this problem with all projects!



      error:
      Gradle sync failed: com.android.ide.common.gradle.model.level2.IdeDependenciesFactory.setRootBuildId(Ljava/lang/String;)Vcom.android.ide.common.gradle.model.level2.IdeDependenciesFactory.setRootBuildId(Ljava/lang/String;)V



      i've tried change my gradle dist to newest version (gradle-4.10.3-all) and i've tried delete gradle caches.










      share|improve this question
















      i cannot sync my project with gradle files.
      i have this problem with all projects!



      error:
      Gradle sync failed: com.android.ide.common.gradle.model.level2.IdeDependenciesFactory.setRootBuildId(Ljava/lang/String;)Vcom.android.ide.common.gradle.model.level2.IdeDependenciesFactory.setRootBuildId(Ljava/lang/String;)V



      i've tried change my gradle dist to newest version (gradle-4.10.3-all) and i've tried delete gradle caches.







      android-studio






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 31 '18 at 13:11







      AmirHossein Hasanzadeh

















      asked Dec 31 '18 at 12:57









      AmirHossein HasanzadehAmirHossein Hasanzadeh

      1




      1
























          1 Answer
          1






          active

          oldest

          votes


















          0














          in your classpath use:



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



          Now in build.gradle copy this code and make it correct as per your application.



          apply plugin: 'com.android.application'

          android {
          compileSdkVersion 28
          defaultConfig {
          applicationId "com.yourapp"
          minSdkVersion 25
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          }
          buildTypes {
          release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
          }
          compileOptions {
          sourceCompatibility = '1.8'
          targetCompatibility = '1.8'
          }
          }

          dependencies {
          implementation fileTree(dir: 'libs', include: ['*.jar'])
          implementation 'com.android.support:appcompat-v7:28.0.0'
          implementation 'com.android.support.constraint:constraint-layout:1.1.3'
          implementation 'com.android.support:design:28.0.0'
          implementation 'com.android.support:support-v4:28.0.0'
          testImplementation 'junit:junit:4.12'
          androidTestImplementation 'com.android.support.test:runner:1.0.2'
          androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2
          }





          share|improve this answer


























          • this exists by default under dependencies.

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:07













          • @AmirHosseinHasanzadeh what version of android studio you're using

            – Ruchit Patel
            Dec 31 '18 at 13:09











          • Android Studio 3.2.1

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:11











          • Try disabling offline work from settings try updating studio to latest version and in spite of that if and if all fails download an offline version of gradle and install it.

            – Ruchit Patel
            Dec 31 '18 at 13:15













          • i tried these and not works.

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:17











          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%2f53987788%2fcannot-sync-project-with-gradle-files%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          in your classpath use:



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



          Now in build.gradle copy this code and make it correct as per your application.



          apply plugin: 'com.android.application'

          android {
          compileSdkVersion 28
          defaultConfig {
          applicationId "com.yourapp"
          minSdkVersion 25
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          }
          buildTypes {
          release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
          }
          compileOptions {
          sourceCompatibility = '1.8'
          targetCompatibility = '1.8'
          }
          }

          dependencies {
          implementation fileTree(dir: 'libs', include: ['*.jar'])
          implementation 'com.android.support:appcompat-v7:28.0.0'
          implementation 'com.android.support.constraint:constraint-layout:1.1.3'
          implementation 'com.android.support:design:28.0.0'
          implementation 'com.android.support:support-v4:28.0.0'
          testImplementation 'junit:junit:4.12'
          androidTestImplementation 'com.android.support.test:runner:1.0.2'
          androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2
          }





          share|improve this answer


























          • this exists by default under dependencies.

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:07













          • @AmirHosseinHasanzadeh what version of android studio you're using

            – Ruchit Patel
            Dec 31 '18 at 13:09











          • Android Studio 3.2.1

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:11











          • Try disabling offline work from settings try updating studio to latest version and in spite of that if and if all fails download an offline version of gradle and install it.

            – Ruchit Patel
            Dec 31 '18 at 13:15













          • i tried these and not works.

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:17
















          0














          in your classpath use:



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



          Now in build.gradle copy this code and make it correct as per your application.



          apply plugin: 'com.android.application'

          android {
          compileSdkVersion 28
          defaultConfig {
          applicationId "com.yourapp"
          minSdkVersion 25
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          }
          buildTypes {
          release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
          }
          compileOptions {
          sourceCompatibility = '1.8'
          targetCompatibility = '1.8'
          }
          }

          dependencies {
          implementation fileTree(dir: 'libs', include: ['*.jar'])
          implementation 'com.android.support:appcompat-v7:28.0.0'
          implementation 'com.android.support.constraint:constraint-layout:1.1.3'
          implementation 'com.android.support:design:28.0.0'
          implementation 'com.android.support:support-v4:28.0.0'
          testImplementation 'junit:junit:4.12'
          androidTestImplementation 'com.android.support.test:runner:1.0.2'
          androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2
          }





          share|improve this answer


























          • this exists by default under dependencies.

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:07













          • @AmirHosseinHasanzadeh what version of android studio you're using

            – Ruchit Patel
            Dec 31 '18 at 13:09











          • Android Studio 3.2.1

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:11











          • Try disabling offline work from settings try updating studio to latest version and in spite of that if and if all fails download an offline version of gradle and install it.

            – Ruchit Patel
            Dec 31 '18 at 13:15













          • i tried these and not works.

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:17














          0












          0








          0







          in your classpath use:



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



          Now in build.gradle copy this code and make it correct as per your application.



          apply plugin: 'com.android.application'

          android {
          compileSdkVersion 28
          defaultConfig {
          applicationId "com.yourapp"
          minSdkVersion 25
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          }
          buildTypes {
          release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
          }
          compileOptions {
          sourceCompatibility = '1.8'
          targetCompatibility = '1.8'
          }
          }

          dependencies {
          implementation fileTree(dir: 'libs', include: ['*.jar'])
          implementation 'com.android.support:appcompat-v7:28.0.0'
          implementation 'com.android.support.constraint:constraint-layout:1.1.3'
          implementation 'com.android.support:design:28.0.0'
          implementation 'com.android.support:support-v4:28.0.0'
          testImplementation 'junit:junit:4.12'
          androidTestImplementation 'com.android.support.test:runner:1.0.2'
          androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2
          }





          share|improve this answer















          in your classpath use:



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



          Now in build.gradle copy this code and make it correct as per your application.



          apply plugin: 'com.android.application'

          android {
          compileSdkVersion 28
          defaultConfig {
          applicationId "com.yourapp"
          minSdkVersion 25
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          }
          buildTypes {
          release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
          }
          compileOptions {
          sourceCompatibility = '1.8'
          targetCompatibility = '1.8'
          }
          }

          dependencies {
          implementation fileTree(dir: 'libs', include: ['*.jar'])
          implementation 'com.android.support:appcompat-v7:28.0.0'
          implementation 'com.android.support.constraint:constraint-layout:1.1.3'
          implementation 'com.android.support:design:28.0.0'
          implementation 'com.android.support:support-v4:28.0.0'
          testImplementation 'junit:junit:4.12'
          androidTestImplementation 'com.android.support.test:runner:1.0.2'
          androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2
          }






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 31 '18 at 13:21

























          answered Dec 31 '18 at 13:03









          Ruchit PatelRuchit Patel

          95




          95













          • this exists by default under dependencies.

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:07













          • @AmirHosseinHasanzadeh what version of android studio you're using

            – Ruchit Patel
            Dec 31 '18 at 13:09











          • Android Studio 3.2.1

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:11











          • Try disabling offline work from settings try updating studio to latest version and in spite of that if and if all fails download an offline version of gradle and install it.

            – Ruchit Patel
            Dec 31 '18 at 13:15













          • i tried these and not works.

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:17



















          • this exists by default under dependencies.

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:07













          • @AmirHosseinHasanzadeh what version of android studio you're using

            – Ruchit Patel
            Dec 31 '18 at 13:09











          • Android Studio 3.2.1

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:11











          • Try disabling offline work from settings try updating studio to latest version and in spite of that if and if all fails download an offline version of gradle and install it.

            – Ruchit Patel
            Dec 31 '18 at 13:15













          • i tried these and not works.

            – AmirHossein Hasanzadeh
            Dec 31 '18 at 13:17

















          this exists by default under dependencies.

          – AmirHossein Hasanzadeh
          Dec 31 '18 at 13:07







          this exists by default under dependencies.

          – AmirHossein Hasanzadeh
          Dec 31 '18 at 13:07















          @AmirHosseinHasanzadeh what version of android studio you're using

          – Ruchit Patel
          Dec 31 '18 at 13:09





          @AmirHosseinHasanzadeh what version of android studio you're using

          – Ruchit Patel
          Dec 31 '18 at 13:09













          Android Studio 3.2.1

          – AmirHossein Hasanzadeh
          Dec 31 '18 at 13:11





          Android Studio 3.2.1

          – AmirHossein Hasanzadeh
          Dec 31 '18 at 13:11













          Try disabling offline work from settings try updating studio to latest version and in spite of that if and if all fails download an offline version of gradle and install it.

          – Ruchit Patel
          Dec 31 '18 at 13:15







          Try disabling offline work from settings try updating studio to latest version and in spite of that if and if all fails download an offline version of gradle and install it.

          – Ruchit Patel
          Dec 31 '18 at 13:15















          i tried these and not works.

          – AmirHossein Hasanzadeh
          Dec 31 '18 at 13:17





          i tried these and not works.

          – AmirHossein Hasanzadeh
          Dec 31 '18 at 13:17




















          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%2f53987788%2fcannot-sync-project-with-gradle-files%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

          Monofisismo

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas