2016-10-10 51 views
1

我得到“插件ID为‘com.android.application’未找到”中添加一个库项目后的错误在我的应用我的应用程序,但现在我从应用程序中删除了该库项目,但仍然存在相同的错误。我GOOGLE了很多,并尝试几乎所有的解决方案,但仍无法解决这个错误。欲了解更多信息,请查看下面的“应用程序模块的build.gradle” -插件ID为“com.android.application”未找到Android的工作室

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() 
    } 
} 

也请让我知道如果我可以提供更多的信息来了解问题。谢谢。

+0

更新gradle这个版本new..before查收,使用此... **文件 - >无效缓存/重启**选项重新启动该项目。 –

+0

你使用的是什么版本的gradle wrapper? –

+0

@Aram Tchekrekjian gradle包装版本是2.8 –

回答

1

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

编辑您的顶级模块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设置按照步骤修复它。

JUST看到这张照片

enter image description here

相关问题