0

Здравствуйте! Пытаюсь добавить в проект библиотеку android annotations, нашел инструкцию, повторив которую, получаю ошибку, среда ругается на то, что нет дефолтной активити, которую нужно запустить.

И вот кое-что в скриншоте.

Подскажите, пожалуйста, что нужно исправить?

alt text

build.gradle

apply plugin: 'com.android.application'


buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2+'
    }
}

apply plugin: 'android-apt'


apt {
    arguments {
        androidManifestFile variant.processResources.manifestFile
        resourcePackageName "simpls.podlinov.ru.reb"
    }
}

android {
    compileSdkVersion 20
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "simpls.podlinov.ru.reb"
        minSdkVersion 11
        targetSdkVersion 20
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    apt "org.androidannotations:androidannotations:3.0+"
    compile "org.androidannotations:androidannotations-api:3.0+"
    compile 'com.android.support:appcompat-v7:20.0.0'
}

1 ответ 1

1

общий gradle.build

dependencies {
    classpath 'com.android.tools.build:gradle:0.12.+'
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
}

проектный

apply plugin: 'android'
apply plugin: 'android-apt'
....

def AAVersion = '3.1'
dependencies {

    apt "org.androidannotations:androidannotations:$AAVersion"
    compile "org.androidannotations:androidannotations-api:$AAVersion"
    ....
    apt {
    arguments {
        androidManifestFile variant.processResources.manifestFile
        resourcePackageName 'com.my.app'
        compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
    }
}
1
  • кстати, стартовать надо с gradle команды.. например installApp..
    – Gorets
    29 сен 2014 в 10:51

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.