将Github工程导入Android Studio后,sync代码时报找不到'com.android.application' 的错误


build.gradle示例:
apply plugin: 'com.android.application'android {    compileSdkVersion 23    buildToolsVersion "23.0.1"    defaultConfig {        applicationId "com.sample.test"        minSdkVersion 8        targetSdkVersion 23        versionCode 1        versionName "1.0"    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }    }}dependencies {    compile fileTree(dir: 'libs', include: ['*.jar'])    compile 'com.android.support:appcompat-v7:23.1.1'    compile 'com.android.support:support-v4:23.1.1'}

gradle版本导致的问题,解决方法,在文件顶层加上
buildscript {    repositories {        mavenCentral()    }    dependencies {        classpath 'com.android.tools.build:gradle:1.2.3'    }}




更多相关文章

  1. Spring for Android(安卓)探究
  2. 使用Eclipse开发Android时整个工程或第三方jar包的正确使用
  3. Spring for Android(安卓)探究
  4. Android(安卓)studio导入Android(安卓)studio项目出错
  5. Android中VectorDrawableCompat的使用注意事项
  6. Android(安卓)Jni代码示例讲解
  7. Android(安卓)统计图表引擎 AChartEngine(三) - 示例源码折线图
  8. TableLayout常用细节
  9. Android关机重启实现

随机推荐

  1. Android(安卓)随笔
  2. 【笔记】Android开发中从EditText中获取
  3. android memory
  4. Android(安卓)判断手机的Rom类型
  5. Android(安卓)获取播放视频的相关 内容,
  6. 一些常用SD卡操作的方法,APk管理之类的方
  7. android音量控制以及硬件同步
  8. Android(安卓)Bad notification for star
  9. Android调用自定义Dialog中的控件
  10. Android(安卓)Support Multidex原理分析