简体   繁体   中英

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. The deep links work correctly with adb commands. Then I created actions.xml in this path:

D:\\Android\\AndroidStudioProjects\\FlutterProjects\\garage_controller\\android\\app\\src\\main\\res\\xml\\actions.xml

I also added the following lines in 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. I have other parts of AndroidManifest highlighted red. I guess these errors are because of Flutter.

I uploaded the app to Google Play and started internal testing. When I ran App Action Test Tool (AATT), I got the following error:

No Android Module with actions file reference found. You need one Android Module with an actions file reference.

My questions are:

Does App Actions work in a Flutter App?

Does AATT work on a Flutter App?

Why do I get the "cannot resolve symbol" error for "@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. The path of actions.xml was also correct. The issue is with AATT which does not know where to find actions.xml in a Flutter app. I just had to open the Android portion of the app in Android Studio. Then AATT knew where to find the file. Google did not put a lot of AI in its tool. More details in here: https://issuetracker.google.com/issues/204233238

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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