错误:(22,0)找不到参数的方法android()

时间:2017-07-13 18:10:27

标签: android android-gradle

这是我的gradle文件

我收到此错误

  

错误:(22,0)找不到参数

的方法android()
{{1}}

2 个答案:

答案 0 :(得分:2)

您需要将插件应用于$.fn.tooltipOnOverflow = function(options) { $(this).on("mouseenter", function() { if (this.offsetWidth < this.scrollWidth) { options = options || { placement: "auto"} options.title = $(this).text(); $(this).tooltip(options); $(this).tooltip("show"); } else { if ($(this).data("bs.tooltip")) { $tooltip.tooltip("hide"); $tooltip.removeData("bs.tooltip"); } } }); }; 文件。只有这样,您才能使用build.gradle块。在android文件的顶部添加以下两行中的任意一行:

  • 申请:build.gradle
  • 图书馆:apply plugin: 'com.android.application'

答案 1 :(得分:1)

你的App Gradle看起来应该是这样的

  apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.0"
    defaultConfig {
        applicationId "com.armenhovhannisyan.backpaper.backpaper"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.0.0-beta1'
    testImplementation 'junit:junit:4.12'
    implementation 'com.android.support:design:26.0.0-beta1'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'

}
相关问题