本文主要是介绍flutter工程,无法运行,报错:The ‘java‘ plugin has been applied, but it is not compatible,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
新建的flutter工程,无法运行,报错:
Build file 'I:\workspace_flutter\flutter_app_2\android\build.gradle' line: 32
* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
> The 'java' plugin has been applied, but it is not compatible with the Android plugins.
现象:
GeneratedPluginRegistrant里面飘红,androidx.annotation.NonNull等无法找到依赖,
无法运行新建的flutter工程
原因:
本机gradle本地库下面的init.gradle文件以前做过java项目改过的,将init.gradle直接改名为bak后缀,或者删除
就可以编译运行了, 即使GeneratedPluginRegistrant里面飘红报错 都不影响运行.
参考:
gradle - Error:The 'java' plugin has been applied, but it is not compatible with the Android plugins. AndroidStudio 3.0 - Stack Overflow https://stackoverflow.com/questions/47109815/errorthe-java-plugin-has-been-applied-but-it-is-not-compatible-with-the-andr
这篇关于flutter工程,无法运行,报错:The ‘java‘ plugin has been applied, but it is not compatible的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!