id为“com.android.application”的插件未找到Android工作室

时间:2016-10-10 05:48:12

标签: android

在我的应用中添加一个库项目后,我的应用中出现“ 插件,其中包含id'com.android.application'未找到 ”错误,但现在我从我的应用程序中删除了该库项目,但仍然存在相同的错误。我google了很多,并尝试了几乎所有的解决方案但但无法解决此错误。有关更多信息,请查看以下“app module的build.gradle” -

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.3'

    defaultConfig {
        applicationId "com.lemo.wikinews"
        minSdkVersion 15
        targetSdkVersion 23
        multiDexEnabled true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE-FIREBASE.txt'
        exclude 'META-INF/NOTICE'
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }

}

dependencies {
    compile project(':easyAndroidAnimationsLibrary')
    compile project(':liveSdk')
    compile project(':main')
    compile project(':zbarSample')
    compile project(':stickyHeaderLibrary')
    compile project(':starBar')
    compile project(':facebookSDK')
    compile project(':library')
    compile project(':ffmpeg4android_lib')
    compile project(':socialNetworkingLib')    
    compile 'com.google.android.gms:play-services:9.6.1'
    compile files('libs/nmdp_speech_kit.jar')
    compile files('libs/AndroidSwipeLayout-v1.1.8.jar')   
    compile group: 'commons-logging', name: 'commons-logging', version: '1.2'
    compile files('libs/CWAC-SackOfViewsAdapter.jar')
    compile files('libs/devsmartandroid.jar')   
    compile group: 'com.google.api-client', name: 'google-api-client', version: '1.6.0-beta'

    compile files('libs/google-api-services--v1-1.3.0-beta.jar')   
    compile files('libs/httpclient-4.4.jar')    
    compile group: 'oauth.signpost', name: 'signpost-commonshttp4', version: '1.2'

    compile group: 'oauth.signpost', name: 'signpost-core', version: '1.2.1.2'

    compile group: 'oauth.signpost', name: 'signpost-jetty6', version: '1.2.1.1'

    compile 'com.android.support:multidex:1.0.0'

  '4.4-alpha1'
    compile 'com.squareup.picasso:picasso:2.4.0'
    compile 'com.google.android.gms:play-services-gcm:8.4.0'
    compile 'org.apache.httpcomponents:httpclient:4.5'
    compile 'org.apache.httpcomponents:httpcore:4.4.1'
    compile 'org.apache.httpcomponents:httpmime:4.3.5'


version: '4.3.5.1'
    compile('org.apache.httpcomponents:httpmime:4.3')
            {
                exclude module: "httpclient"
            }
}

以下是我的顶级'builg.gradle' -

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

如果我能提供更多信息来了解问题,请告诉我。谢谢。

1 个答案:

答案 0 :(得分:1)

Bellow是我解决导入问题的方法,该项目使用旧的工作室插件。原谅我可怜的英语。

编辑你的top moudle build.gradle,编辑gradle插件到你的工作室。然后可能会显示这个, 错误:支持的最低Gradle版本为2.14.1。当前版本是2.2.1。如果使用gradle包装器,请尝试将C:\ Users \ Administrator \ Desktop \ SelectCityDome \ gradle \ wrapper \ gradle-wrapper.properties中的distributionUrl编辑为gradle-2.14.1-all.zip 修复Gradle包装并重新导入项目 Gradle设置按照步骤修复它。

只是看看这张照片

enter image description here