久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

找不到參數(shù)的方法 android()

Could not find method android() for arguments(找不到參數(shù)的方法 android())
本文介紹了找不到參數(shù)的方法 android()的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我一直在嘗試將項(xiàng)目導(dǎo)入 Android Studio,這就是我卡住的地方,Stack Overflow 但它沒有為我的特定錯(cuò)誤提供解決方案.

I've been trying to import a project to Android Studio and this is where I am stuck, there is a similar question on Stack Overflow but it did not provide a solution to my particular error.

這是我的錯(cuò)誤日志:

C:<some location>uild.gradle

Error:(24, 1) A problem occurred evaluating root project '<project name>'.
> Could not find method android() for arguments [build_4fli1jm76ubcnxesnhqnhie47$_run_closure3@6e71db85] on root project '<project name>'.
Information:BUILD FAILED

Gradle 同步消息是:

The Gradle sync messages are:

錯(cuò)誤:(24, 0) Gradle DSL 方法未找到: 'android()' 可能原因:

  • PoojaPeople"項(xiàng)目可能正在使用不包含該方法的 Gradle.Gradle 設(shè)置
  • 構(gòu)建文件可能缺少 Gradle 插件.申請Gradle 插件
  • Error:(24, 0) Gradle DSL method not found: 'android()' Possible causes:

  • The project 'PoojaPeople' may be using a version of Gradle that does not contain the method. Gradle settings
  • The build file may be missing a Gradle plugin. Apply Gradle plugin
  • 我不太確定這個(gè)方法 android() 的確切位置.如果它是位于 Application 的 build.gradle 文件中的那個(gè),我仍然不知道從這里去哪里.任何幫助表示贊賞.

    I'm not too sure where exactly this method android() is located. If it is the one located in Application's build.gradle file, I still don't exactly know where to go from here. Any help is appreciated.

    我的 build.gradle

    buildscript {
        repositories {
            maven { url "http://dl.bintray.com/populov/maven" }
            mavenCentral()
        }
         dependencies {
            classpath 'com.android.tools.build:gradle:2.1.0'
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    allprojects {
        repositories {
            maven { url "http://dl.bintray.com/populov/maven" }
            mavenCentral()
    
        }
    }
    task clean(type: Delete) {
        delete rootProject.buildDir
    }
    
    android {
        compileSdkVersion 17
        buildToolsVersion '23.0.0'
    }
    dependencies {
        compile files('app/libs/junit-4.12-JavaDoc.jar')
    }
    apply plugin: 'maven'
    

    推薦答案

    你使用了錯(cuò)誤的 build.gradle 文件.

    在您的頂級文件中,您無法定義 android 塊.

    In your top-level file you can't define an android block.

    只需將此部分移動(dòng)到 module/build.gradle 文件中即可.

    Just move this part inside the module/build.gradle file.

    android {
        compileSdkVersion 17
        buildToolsVersion '23.0.0'
    }
    dependencies {
        compile files('app/libs/junit-4.12-JavaDoc.jar')
    }
    apply plugin: 'maven'
    

    這篇關(guān)于找不到參數(shù)的方法 android()的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

    【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

    相關(guān)文檔推薦

    IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現(xiàn) IncompatibleClassChangeError)
    How to get current flavor in gradle(如何在 gradle 中獲取當(dāng)前風(fēng)味)
    How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復(fù)“意外元素lt;查詢gt;在“清單中找到錯(cuò)誤?)
    Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風(fēng)味庫的多風(fēng)味應(yīng)用)
    Android dependency has different version for the compile and runtime(Android 依賴在編譯和運(yùn)行時(shí)有不同的版本)
    Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
    主站蜘蛛池模板: 久久视频精品 | 久久国际精品 | 成人国产精品久久 | 一区二区三区日韩精品 | 久久久妇女国产精品影视 | 3级毛片 | 人人干人人舔 | 黄色a三级 | 亚洲欧美日韩国产综合 | 婷婷国产一区 | 久久激情网| 九九精品在线 | 亚洲一区二区在线视频 | 操久久| 国产精品区一区二 | 国产精品永久免费视频 | 亚洲欧洲成人 | 亚洲精彩视频在线观看 | 一区二区三区视频在线观看 | 91免费电影 | 天天操夜夜爽 | 91视频大全| www国产精品 | 日本一级淫片免费啪啪3 | 国产精品一码二码三码在线 | 国产精品爱久久久久久久 | 久久三区| 亚洲成人三级 | 视频一区中文字幕 | 亚洲天堂一区 | 欧美 日韩 国产 成人 | 亚洲 欧美 激情 另类 校园 | 国产日韩欧美在线观看 | 亚洲 精品 综合 精品 自拍 | 国产在线97 | 特级做a爰片毛片免费看108 | xxxcom在线观看 | 日日骚网| 欧美成年网站 | 瑞克和莫蒂第五季在线观看 | 91精品国产91久久综合桃花 |