LoginSignup
1
0

More than 1 year has passed since last update.

【Flutter】Android12で実行出来なかったけど解決![INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl764624764.tmp/base.apk (at Binary XML file line #21): intent tag may have at most one action.]

Posted at

エラー内容

FlutterをAndroid12で実行したときに下記のエラーが出ていた。

Error: ADB exited with exit code 1
Performing Streamed Install

adb: failed to install path/build/app/outputs/flutter-apk/app.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl764624764.tmp/base.apk (at Binary XML file line #21): intent tag may have at most one action.]
Error: Failed to install APK again.
Error launching application on Pixel 4.

解決方法

下記の部分が重要で、intent タグは最大1つのactionタグしか持てないらしい。

intent tag may have at most one action.
# intent タグは最大1つのアクションを持つことができます。

下記のようにAndroidManifest.xmlの内容を変更する!

変更前

/android/app/src/main/AndroidManifest.xml
 <queries>
        <intent>
            <action android:name="android.support.customtabs.action.CustomTabsService" />
            <action android:name="android.speech.RecognitionService" />
        </intent>
 </queries>

変更後

/android/app/src/main/AndroidManifest.xml
 <queries>
        <intent>
            <action android:name="android.support.customtabs.action.CustomTabsService" />
        </intent>
        <intent>
            <action android:name="android.speech.RecognitionService" />
        </intent>
 </queries>

これでAndroid12で実行できるようになりました!!

参考

Flutterから始めてAndroidよくわかってないマンですがとりあえず解決して良かったです。下記参考になりました。
Android11からなってたっぽい?誰かの参考になれば嬉しいです。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0