在我的Flatter项目中,在AndroidManifest.xml中添加一个可浏览类别会使我的应用程序无法使用

在我的Flatter项目中,在AndroidManifest.xml中添加一个可浏览类别会使我的应用程序无法使用,android,flutter,deep-linking,Android,Flutter,Deep Linking,最近,我已经将stripe_sdk包添加到我的Flatter项目中。3DS系统需要添加一个深度链接机制,以便在3D OK或KO时返回应用程序 在iOS上,我修改了我的Info.plist来声明这个方案,当我调试和通过diawi部署发布的版本时,它运行良好 在Android上,我修改了我的Android/app/src/main/AndroidManifest.xml以添加意图过滤器: <intent-filter> <action android

最近,我已经将stripe_sdk包添加到我的Flatter项目中。3DS系统需要添加一个深度链接机制,以便在3D OK或KO时返回应用程序

在iOS上,我修改了我的Info.plist来声明这个方案,当我调试和通过diawi部署发布的版本时,它运行良好

在Android上,我修改了我的Android/app/src/main/AndroidManifest.xml以添加意图过滤器:

<intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                
                <category android:name="android.intent.category.BROWSABLE" />
                <data
                    android:scheme="myapp"
                    android:host="3ds.myapp.fr" />
                

            </intent-filter>

没有编译问题,当我在模拟器或设备上调试时,没有问题。 当我使用flatterbuildapk构建发布包并通过diawi分发它时,就会出现这个问题。apk可以很好地下载,安装也可以,但是在安装结束时,“打开”按钮没有激活。该应用不与其他应用一起出现。 如果我转到参数->应用程序,我可以找到我的应用程序,但“打开”按钮也处于非活动状态。我只能卸载我的应用程序。 PS:如果我不使用diawi直接上传我的apk,问题完全相同

我试图修改方案和主机,结果总是一样的:无法打开我的应用程序

如果我修改我的AndroidManifest.xml以删除可浏览类别并重新生成包,那么一切都会再次正常。该应用程序可以启动

问题是什么

谢谢, 卢克

我的完整AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="fr.myapp">
    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
         calls FlutterMain.startInitialization(this); in its onCreate method.
         In most cases you can leave this as-is, but you if you want to provide
         additional functionality it is fine to subclass or reimplement
         FlutterApplication and put your custom class here. -->
    <application
        android:name="io.flutter.app.FlutterApplication"
        android:label="myapp"
        android:icon="@mipmap/ic_launcher">
        <activity
            android:name=".MainActivity"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI. -->
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />
            <!-- Displays an Android View that continues showing the launch screen
                 Drawable until Flutter paints its first frame, then this splash
                 screen fades out. A splash screen is useful to avoid any visual
                 gap between the end of Android's launch screen and the painting of
                 Flutter's first frame. -->
            <meta-data
              android:name="io.flutter.embedding.android.SplashScreenDrawable"
              android:resource="@drawable/launch_background"
              />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />

                <category android:name="android.intent.category.BROWSABLE" />
                <data
                    android:scheme="myapp"
                    android:host="3ds.myapp.fr" />


            </intent-filter>

        </activity>
        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>

    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.INTERNET" />


</manifest>

Android中的标准启动器意图不包含URI,因此它是可用的

仅当筛选器未指定任何URI或MIME类型时,既不包含URI也不包含MIME类型的意图才能通过测试

为了接受URI方案的启动器意图和
ACTION\u视图
intent,MainActivity需要两个intent过滤器:


Android中的标准启动器意图不包含URI,因此它是可用的

仅当筛选器未指定任何URI或MIME类型时,既不包含URI也不包含MIME类型的意图才能通过测试

为了接受URI方案的启动器意图和
ACTION\u视图
intent,MainActivity需要两个intent过滤器:



您是将其添加到现有的
标记中,还是添加了新的
标记?我将其添加到现有的
标记中。我更新了问题中的代码您是将其添加到现有的
标记中,还是添加了新的
标记?我将其添加到现有的
标记中。我更新了问题中的代码你好!你的更正使我的应用程序再次伟大(ooops)。真的,你救了我的一天和我的周末。非常感谢你!我没有意识到发射器意图的行为。你好!你的更正使我的应用程序再次伟大(ooops)。真的,你救了我的一天和我的周末。非常感谢你!我没有意识到发射器意图的行为。