2015-01-18 1 views
0

build.gradle 파일에서 IntelliJ 14.0.2로 가져올 때, sourceSet에 manifest.srcFile을 지정하면 .iml이 생성되지 않고 contentRoot는 절대로 생성되지 않습니다 set - 기본적으로 프로젝트가 없으며 단순히 파일 목록입니다.manifest.src IntelliJ 가져 오기에서 contentRoot가 해제되는 파일

누구에게이 문제가 있습니까?

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    repositories { 
     mavenCentral() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:1.0.0' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

repositories { 
    mavenCentral() 
} 

apply plugin: 'android' 

android { 
    compileSdkVersion 21 
    buildToolsVersion "21.1.2" 

    defaultConfig { 
     minSdkVersion 14 
     targetSdkVersion 19 
     versionCode 1 
     versionName "0.01" 
    } 
    sourceSets { 
     main { 
      manifest.srcFile 'AndroidManifest.xml' 
     } 
    } 
    buildTypes { 
     release { 
      minifyEnabled true 
      proguardFiles getDefaultProguardFile('proguard-android.txt') 
     } 
     debug { 
      debuggable true 
     } 
    } 
} 

dependencies { 
    // all *.jar files in the libs dir 
    compile fileTree(dir: 'libs', include: ['*.jar']) 

    // remote dependencies 
    compile 'com.android.support:appcompat-v7:21.0.3' 
} 

답변

0

적용한 플러그인이 올바르지 않아 Android 전용 프로젝트가 설정되지 않았습니다. 다음과 같아야합니다.

apply plugin: 'com.android.application' 
+0

행운이 없으면 작동하지 않습니다. – BinaryShrub

관련 문제