如何在XML android和dart Flutter中结合Java本机 [英] How to combine java native within the XML android and dart Flutter
问题描述
我一直在寻找与结合本机android和dart相关的教程,到目前为止,这是最好的
打开Android Studio,点击文件>打开
,然后选择浮动应用程序项目的 android
文件夹,该文件夹应位于应用程序项目的根目录中。
就是这样。
I've been searching for tutorial that relates to combine native android and dart, so far this is the best https://proandroiddev.com/communication-between-flutter-and-native-modules-9b52c6a72dd2 but it wrote in kotlin, i also try to write the code on java, but when i try to call XML file and the widget using "R" are getting error, it said "cannot resolve symbol", a lot of people said that R problem are solved by clean project or rebuild, but i'm using flutter in android studio which is feature to sync, clean, or rebuild are unavailable. If you guys know the solutions i'm so glad if you wanna help
Here's my code
Open Android Studio, click on File > Open
and choose the android
folder of your flutter app project, it should be in the root directory of your app project.
That's it.
这篇关于如何在XML android和dart Flutter中结合Java本机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!