Error:Unable to find method 'com.android.build.gradle.internal.variant.BaseVariantData.getOutputs()L
来源:互联网 发布:阿里云服务器宽带 编辑:程序博客网 时间:2024/06/05 13:26
KButterKnife
I have found a workaround :
Using the 8.4.0 version ( classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0' )
But it doesn't resolve the compatibility issue with "Feature Module" :
Error:Butterknife plugin can only be applied to android projects
Kotlin with Android Studio Known Issues
This page describes current known issues and limitations when using Kotlin with Android Studio 3.0. For more general issues in Android Studio's stable release, see the other Known Issues page.
To report an issue not already included here, see how to report a bug.
Can't build project with Kotlin
Error:Unable to find method 'com.android.build.gradle.internal.variant.BaseVariantData.getOutputs()Ljava/util/List;'.If you see this error, it's possible you have a pre-existing version of the Kotlin plugin that is incompatible with the new Android Plugin for Gradle that's in Android Studio 3.0. The solution is to delete the old Kotlin plugin.
Open your project-level
build.gradle
file and locateext.kotlin_version
. It should be 1.1.2-4 (or higher). If it shows an older version, you need to delete the old Kotlin plugin so it does not obstruct the version included with Android Studio 3.0. On Windows, it should be located atC:\Users\user_name\AndroidStudio_version\config\plugins\Kotlin\
.
On Mac, look in~/Library/Application\ Support/AndroidStudio_version/Kotlin/
.Gradle sync error using Instant Apps SDK with Kotlin
Error:null cannot be cast to non-null type com.android.build.gradle.BasePluginThe Instant Apps SDK is currently incompatible with the Kotlin plugin.
Compilation error in Login Activity template with Kotlin
Error:(89, 22) None of the following functions can be called with the arguments supplied:@NonNull public open fun make(@NonNull view: View, @NonNull text: CharSequence, duration: Int): Snackbar defined in android.support.design.widget.Snackbar@NonNull public open fun make(@NonNull view: View, @StringRes resId: Int, duration: Int): Snackbar defined in android.support.design.widget.SnackbarThe Login Activity template currently does not convert to Kotlin successfully. Line 89 contains an error because the
mEmailView
object is instantiated asAutoCompleteTextView
, not aView
. But this is easily fixed. You simply need to tell Kotlin to use the non-null value ofView
by adding two exclamation points:Snackbar.make(mEmailView!!, R.string.permission_rationale, Snackbar.LENGTH_INDEFINITE)Code doesn't compile after converting from Java file
In some situations, using Code > Convert Java File to Kotlin File results in Kotlin code that does not compile. This is a known issue with the Kotlin plugin.
Lint checks with Kotlin don't work from command line
Lint checks on Kotlin files only work from the Android Studio IDE. The currently do not run when you run lint directly from Gradle.
Code completion with Kotlin shows private resources
In Kotlin code completion, private resources are not filtered out the way they are from Java code completion. For example, typing
R.drawable.
lists a bunch of internal app compat resources as suggestions.Live templates and postfix completion not fully available with Kotlin
When writing in Java language, you can use live templates or postfix completion, such as typing
variable.for
and presing Tab to generate a for-loop that iterates over the variable. However, these are not fully supported with Kotlin. And due to language difference, it's possible some never will be.Some refactorings not available with Kotlin
Not all code refactorings works with Kotlin, especially those for Android. For example, code refactoring to modularize Kotlin cude currently does not work with Kotlin.
- Error:Unable to find method 'com.android.build.gradle.internal.variant.BaseVariantData.getOutputs()L
- Error:Unable to find method 'com.android.build.gradle.internal.variant.BaseVariantData.getOutputs()L
- Error:Unable to find method 'com.android.build.gradle.internal.variant.BaseVariantData.getOutputs()L
- Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List
- Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List;'.
- Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List;'.
- android studio 3.0 报错 Unable to find method 'com.android.build.gradle.internal.variant.BaseVariantDa
- Error:No such property: zipAlignEnabled for class: com.android.build.gradle.internal.variant.Applica
- 我的Android进阶之旅------>解决Error:Unable to find method 'org.gradle.api.internal.project.ProjectInternal.g
- Android进阶之旅------>解决Error:Unable to find method 'org.gradle.api.internal.project.ProjectInternal.g
- 解决Error:Unable to find method 'org.gradle.api.internal.project.ProjectInternal
- 解决Error:Unable to find method 'org.gradle.api.internal.project.ProjectInternal……
- 解决Error:Unable to find method 'org.gradle.api.internal.project.ProjectInternal.
- Unable to find method 'org.gradle.api.internal.file.DefaultSourceDirectorySet
- Gradle sync failed: Cause: com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List
- Gradle sync failed: Cause: com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List
- Could not find property 'outputFile' on com.android.build.gradle.internal.api.ApplicationVariantImpl
- Could not find property 'zipAlignEnabled' on com.android.build.gradle.internal.api.ApplicationVarian
- mysql存储过程中 declare 和 set 定义变量的区别
- 第一周
- NYOJ 10 Skiing(记忆化搜索)
- 二叉树--实现一颗二叉树的层序遍历
- Spring bean的作用域
- Error:Unable to find method 'com.android.build.gradle.internal.variant.BaseVariantData.getOutputs()L
- 剑指Offer——(36)两个链表的第一个公共结点
- Servlet--ServletContext作用一(获取项目运行路径和文件)
- Python爬取链家地铁房数据
- textarea 标签中placeholder提示信息手动换行(jQuery水印插件watermark.js )
- D-query SPOJ
- Magenta Demos Magenta 实战代码
- XFTP上传文件出现:unknown error的解决方法
- Java接口RandomAccess(判断哪种迭代访问方式更快)