[英]App Action Test Tool Error "No Android Module with actions file reference found" with Flutter
I have written a Flutter app which implements several deep links with package uni_links.我编写了一个 Flutter 应用程序,它使用包 uni_links 实现了几个深层链接。 The deep links work correctly with adb commands.深层链接与 adb 命令一起正常工作。 Then I created actions.xml in this path:然后我在这个路径中创建了 actions.xml:
D:\\Android\\AndroidStudioProjects\\FlutterProjects\\garage_controller\\android\\app\\src\\main\\res\\xml\\actions.xml D:\\Android\\AndroidStudioProjects\\FlutterProjects\\garage_controller\\android\\app\\src\\main\\res\\xml\\actions.xml
I also added the following lines in AndroidManifest.xml:我还在 AndroidManifest.xml 中添加了以下几行:
<meta-data
android:name="com.google.android.actions"
android:resource="@xml/actions" />
Android Studio highlighted "@xml/actions" in red and complains that it cannot resolve the symbol. Android Studio 以红色突出显示“@xml/actions”并抱怨它无法解析该符号。 I have other parts of AndroidManifest highlighted red.我有 AndroidManifest 的其他部分突出显示为红色。 I guess these errors are because of Flutter.我猜这些错误是因为 Flutter。
I uploaded the app to Google Play and started internal testing.我将应用上传到 Google Play 并开始内部测试。 When I ran App Action Test Tool (AATT), I got the following error:当我运行 App Action Test Tool (AATT) 时,出现以下错误:
No Android Module with actions file reference found.未找到带有操作文件参考的 Android 模块。 You need one Android Module with an actions file reference.您需要一个带有操作文件参考的 Android 模块。
My questions are:我的问题是:
Does App Actions work in a Flutter App?应用操作在 Flutter 应用中是否有效?
Does AATT work on a Flutter App? AATT 是否适用于 Flutter 应用程序?
Why do I get the "cannot resolve symbol" error for "@xml/actions"?为什么我会收到“@xml/actions”的“无法解析符号”错误? I think I put everything in the right place.我想我把所有东西都放在了正确的地方。 Thanks for your help.谢谢你的帮助。
I got it fixed.我搞定了。 Basically everything was done correctly in my Flutter app.基本上一切都在我的 Flutter 应用程序中正确完成。 The path of actions.xml was also correct. actions.xml 的路径也是正确的。 The issue is with AATT which does not know where to find actions.xml in a Flutter app.问题在于 AATT,它不知道在 Flutter 应用程序中在哪里可以找到 actions.xml。 I just had to open the Android portion of the app in Android Studio.我只需要在 Android Studio 中打开应用程序的 Android 部分。 Then AATT knew where to find the file.然后 AATT 知道在哪里可以找到该文件。 Google did not put a lot of AI in its tool.谷歌并没有在其工具中加入大量人工智能。 More details in here: https://issuetracker.google.com/issues/204233238此处有更多详细信息: https : //issuetracker.google.com/issues/204233238
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.