简体   繁体   English

依赖项列表中的无效项“Flutter for Android”

[英]invalid item 'Flutter for Android' in the dependencies list

I want to add native android library in my flutter project, I am trying to perform platform channelling but Flutter Activity is not getting imported in my android code, I founded out that it may be because of this as this is showing as a problem, I have tried updating the flutter plugin, restarting ide but nothing is working. I want to add native android library in my flutter project, I am trying to perform platform channelling but Flutter Activity is not getting imported in my android code, I founded out that it may be because of this as this is showing as a problem, I已尝试更新 flutter 插件,重新启动 ide 但没有任何效果。 What can I do that flutter for android can get imported?我该怎么做才能导入 android 的 flutter? Flutter Activity not getting imported Thank you. Flutter 活动未导入谢谢。

I also got errors opening Android-specific code in my Flutter project.在我的 Flutter 项目中打开特定于 Android 的代码时,我也遇到了错误。 If the Flutter app compiles and run without issues, then you should be fine.如果 Flutter 应用程序编译和运行没有问题,那么你应该没问题。 For full Android Studio support on your Android code, you can click 'Open for Editing in Android Studio' displayed on the active tab.对于 Android 代码上的完整 Android Studio 支持,您可以单击活动选项卡上显示的“在 Android Studio 中打开以进行编辑”。 This should help check for any errors or warnings in your Android code.这应该有助于检查 Android 代码中的任何错误或警告。 You can check this documentation for more details regarding editing Android code in Flutter projects on Android Studio.您可以查看此文档以获取有关在 Android Studio 上的 Flutter 项目中编辑 Android 代码的更多详细信息。

There's also an experimental feature that supports Android code checks in a Flutter project.还有一个实验功能支持 Flutter 项目中的 Android 代码检查。 To try it out, you can enable this feature in the Preferences by ticking the Enable code completion, navigation, etc. for Java / Kotlin checkbox.要试用它,您可以通过勾选Enable code completion, navigation, etc. for Java / Kotlin在首选项中启用此功能。 You can check this GitHub ticket for more details.您可以查看此GitHub 票以获取更多详细信息。

you can go to file project structure and follow is img.. [1]: https://i.stack.imgur.com/mhHj4.png您可以 go 归档项目结构并遵循 img .. [1]: https://i.stack.imgur.com/mhHj4.png

Run the command gradlew clean and, then run gradlew build运行命令 gradlew clean 然后运行 gradlew build

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM