gpt4 book ai didi

android - 实验性 gradle : The android plugin must be applied to the project 问题

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:57:38 26 4
gpt4 key购买 nike

我正在尝试在 Android Studio 中使用 NDK 运行一些 native 代码。我已按照显示的步骤进行操作 HERE使用实验性的 Gradle,但显然并不是一帆风顺。我收到此错误:必须将 android 或 android-library 插件应用于项目
这是我的 gradle 文件:

apply plugin: 'com.android.model.application'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'io.fabric'

model {
android {
compileSdkVersion = 22
buildToolsVersion = "22.0.1"

android.ndk {
moduleName = "test"
}

defaultConfig.with {
applicationId = "com.shaperstudio.dartboard"
minSdkVersion.apiLevel = 15
targetSdkVersion.apiLevel = 22
versionCode = 1
versionName = "1.0"
}
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.pro')
}
}
packagingOptions {
exclude = 'META-INF/services/javax.annotation.processing.Processor'
}
}

repositories {
maven {
url "https://jitpack.io"
}
maven { url 'https://maven.fabric.io/public' }
}

buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
classpath 'io.fabric.tools:gradle:1.+'
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.android.support:design:22.2.0'
compile 'com.jakewharton:butterknife:6.1.0'
compile 'de.greenrobot:eventbus:2.4.0'
apt 'com.bluelinelabs:logansquare-compiler:1.1.0'
compile 'com.bluelinelabs:logansquare:1.1.0'
compile 'com.birbit:android-priority-jobqueue:1.3'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
compile 'com.parse.bolts:bolts-android:1.+'
compile fileTree(dir: 'libs', include: '*.jar')
compile('com.crashlytics.sdk.android:crashlytics:2.4.0@aar') {
transitive = true;
}
}

任何关于为什么我会收到此错误的帮助将不胜感激

最佳答案

尝试使用这个插件

https://bitbucket.org/pvoid/android-apt-experemental/overview

代替android-apt

关于android - 实验性 gradle : The android plugin must be applied to the project 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32001570/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com