gpt4 book ai didi

android - 3rd-party Gradle插件可能是导致错误的原因

转载 作者:行者123 更新时间:2023-12-03 04:19:58 25 4
gpt4 key购买 nike

我知道之前曾有人问过这个问题,但是没有一个答案能解决我的问题。错误“3rd-party Gradle插件可能是原因”仍然在android studio中,并且我已经尝试了所有方法:取消了Instant App Provisioning,使缓存无效并重新启动android studio ...无济于事。

这是我的代码

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

android {
compileSdkVersion 25
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "android.example.com.squawker"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:25.1.0'
testImplementation 'junit:junit:4.12'

// RecyclerView
implementation 'com.android.support:recyclerview-v7:25.1.0'

// Schematic dependencies for ContentProvider
apt 'net.simonvt.schematic:schematic-compiler:0.6.3'
implementation 'net.simonvt.schematic:schematic:0.6.3'

// Preferences Dependencies
implementation 'com.android.support:preference-v7:25.1.0'

// Firebase dependency
implementation 'com.google.firebase:firebase-messaging:10.0.1'
implementation 'com.google.firebase:firebase-core:16.0.0'
}
// Apply the Google Services plugin. Make sure to add the google-services.json file in the app
// folder. You download it from the Firebase console
apply plugin: 'com.google.gms.google-services'


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

buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2'
classpath 'com.android.tools.build:gradle:3.1.3'

// Google Services plugin
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}

}

allprojects {
repositories {
jcenter()
google()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

先感谢您!

最佳答案

在错误的上方,您是否看到其中包含“kaptKotlin”的文件路径?如果您这样做,请查看此跟踪的issue

"The root issue with Kapt is that the Kapt resolver in IDEA from JetBrains registers those folders as 'being in a invalid path'. This is a misuse of the API."

解决方法似乎是检查消息并禁止显示有关实际有效路径的消息。

关于android - 3rd-party Gradle插件可能是导致错误的原因,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51528162/

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