Could not find com.android.tools.lint:lint-gradle Android Studio 3

后端 未结 12 1624
青春惊慌失措
青春惊慌失措 2020-12-02 16:12

I have updated Android Studio to 3.0 and now received a lot of issues.. now stoped on point with such issue:

Could not resolve all files for configuration \'         


        
相关标签:
12条回答
  • 2020-12-02 17:02

    Try this,

    File -> Settings -> Build,Execution,Deployment -> Gradle -> Android Studio -> Select -Enable embedded maven repository - Apply.

    0 讨论(0)
  • 2020-12-02 17:03

    My answer is for everyone that Already have google() in repositories but still have same error

    1. goto android studio settings and search for "HTTP Proxy" and make sure you haven't set a wrong proxy there. (set it to auto-detect proxy settings if not sure)
    2. close android studio
    3. goto C:/Users/DESKTOP-NAME/ and Delete .gradle folder (yes, it's big folder but don't be scared its just keeping all versions of your old gradle files that is not needed now)
    4. goto you project folder and delete .gradle folder and app/build folder (make a backup before this just in case)
    5. restart your PROXY server Or VPN provider (if you use one) and make sure you have a working internet connection.
    6. Open Android Studio and wait until successful build (it's gonna take a little longer).
    0 讨论(0)
  • 2020-12-02 17:05

    just comment google and sync project

       repositories {
        google()
        jcenter()
       }
    

    Disable offline mode and uncomment google() and sync again...

    0 讨论(0)
  • 2020-12-02 17:05

    add below code to your build.gradle (Module) to skip error

    lintOptions {
            abortOnError false
    }
    
    0 讨论(0)
  • 2020-12-02 17:10

    It looks to me like you're missing the google() repository in order to fetch the dependency.

    Here's the link to the pom file that you're looking for: https://dl.google.com/dl/android/maven2/com/android/tools/testutils/26.1.0-alpha01/testutils-26.1.0-alpha01.pom

    0 讨论(0)
  • 2020-12-02 17:10

    Another option is

    ./gradlew -x:app:lintVitalRelease assemble
    

    To quote Gradle Docs:

    Excluding tasks from execution

    You can exclude a task from being executed using the -x or --exclude-task command-line option and providing the name of the task to exclude.

    Reference: https://docs.gradle.org/current/userguide/command_line_interface.html#sec:excluding_tasks_from_the_command_line

    Archived link: http://archive.is/TsPPJ#sec:excluding_tasks_from_the_command_line

    0 讨论(0)
提交回复
热议问题