需要帮助整合面料为Android工作室

时间:2015-04-16 03:22:29

标签: android twitter-fabric

我将代码复制并粘贴为

buildscript {
    repositories {
        jcenter()
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.1.0'

        // The Fabric Gradle plugin uses an open ended version to
        // react quickly to Android tooling updates
        classpath 'io.fabric.tools:gradle:1.+'

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

apply plugin: 'com.android.application'

//Put Fabric plugin after Android plugin
apply plugin: 'io.fabric'

allprojects {
    repositories {
        jcenter()
        maven { url 'https://maven.fabric.io/public' }
    }
}

但是当我同步gradle时,它表示没有compile.minimumSdkVersion。我没有在说明书上看到这个

1 个答案:

答案 0 :(得分:1)

我的文件项目 /app/build.gradle

buildscript {
    repositories {
        jcenter()
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

apply plugin: 'com.android.application'

repositories {
    jcenter()
    maven { url 'https://maven.fabric.io/public' }
}

apply plugin: 'io.fabric'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "<YOUR_APP>"
        minSdkVersion 9
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile('com.twitter.sdk.android:twitter:1.12.1@aar') {
        transitive = true;
    }
}