小编Emi*_*tis的帖子

无法让android-apt工作

已经两次我已经尝试让android-apt工作了,因为我想要使用的第三方库(AndroidAnnotations和PermissionsDispatcher)需要它,并且两次我把头撞到墙上直到我厌倦了听到压扁声音.

问题?Android Studio无法找到或获取依赖项:

Error:Could not find com.neenbedankt.gradle:plugins:android-apt.
Searched in the following locations:
    file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/neenbedankt/gradle/plugins/android-apt/plugins-android-apt.pom
    file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/neenbedankt/gradle/plugins/android-apt/plugins-android-apt-1.8.jar
    https://jcenter.bintray.com/com/neenbedankt/gradle/plugins/android-apt/plugins-android-apt.pom
    https://jcenter.bintray.com/com/neenbedankt/gradle/plugins/android-apt/plugins-android-apt-1.8.jar
    https://repo1.maven.org/maven2/com/neenbedankt/gradle/plugins/android-apt/plugins-android-apt.pom
    https://repo1.maven.org/maven2/com/neenbedankt/gradle/plugins/android-apt/plugins-android-apt-1.8.jar
Required by:
    :MaterialQuoter:unspecified
Run Code Online (Sandbox Code Playgroud)

我可能做了某种可笑的错误的(我的意思是,这些库将不会看到任何用途,否则,对吧?),但我不能看到我在做什么错.

我正在运行Android Studio 1.4,以防它以某种方式相关.

这是项目的gradle文件:

buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'
        classpath 'com.neenbedankt.gradle:plugins:android-apt:1.8'
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        mavenLocal()
    }
}

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'

dependencies {
    compile 'com.github.hotchemi:permissionsdispatcher:1.2.1'
    apt 'com.github.hotchemi:permissionsdispatcher-processor:1.2.1'
}
Run Code Online (Sandbox Code Playgroud)

这是我主要处理的模块的gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId …
Run Code Online (Sandbox Code Playgroud)

android android-apt

5
推荐指数
1
解决办法
7966
查看次数

标签 统计

android ×1

android-apt ×1