skip to Main Content

I keep getting this error in Android Studio Electric Eelenter image description here

// Top-level build file where you can add configuration options common to all sub-projects/modules.

plugins {
    id 'com.android.application' version '7.4.2' apply false
    id 'com.android.library' version '7.4.2' apply false
    id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
}

I’ve tried using the answers these two posts but nothing works maybe because those posts are older and they were using older versions of Android Studio
https://stackoverflow.com/questions/73099487/plugin-id-com-android-application-version-7-2-0-apply-false-was-not-f
https://stackoverflow.com/questions/71427323/gradle-sync-failed-plugin-id-com-android-application-version-7-1-2-app

I also reinstalled Android Studio and it still didn’t work.

2

Answers


  1. Setting>Build, appearance, deployment>Gradle
    enter image description hereGradle JDK: Jbr-11

    I was having the same problem but by using this progress I have solved that problem. You should also try this I hope this will work.

    Login or Signup to reply.
  2. Today I solved it. Previously I set up Gradle JDK: Jbr-11.
    My country has internet restrictions so I use "Proton VPN" (free version), and NetLimiter 4 Pro as a firewall to conect my laptop.

    The problem dissapeared when i turned off my firewall, with the VPN on. Android Studio started to download files it needed. It worked due the firewall was blocking an Android Studio task i hadn’t seen.

    But then another problem appeared in activity_main.xml: "Class referenced in the layout file, ‘androidx.constraintlayout.widget.ConstraintLayout’, was not found in the project or the libraries "

    To solve this, try:

    1. Open your build.gradle (application-level) file and make sure that it has the ConstraintLayout dependency.

      dependencies {
      implementation ‘androidx.constraintlayout:constraintlayout:2.1.4’
      //…
      }

      If the dependency is not there, add the dependency in the build.gradle file and synchronize the project.

    2. If dependency was already there, try cleaning up and rebuilding your project. Build -> Clean Project,
      when it finished:
      Build -> Rebuild Project.

    3. Delete the .idea folder and let these files download when you open Android Studio. (This is what finally worked for me)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search