亚洲视频二区_亚洲欧洲日本天天堂在线观看_日韩一区二区在线观看_中文字幕不卡一区

公告:魔扣目錄網為廣大站長提供免費收錄網站服務,提交前請做好本站友鏈:【 網站目錄:http://www.430618.com 】, 免友鏈快審服務(50元/站),

點擊這里在線咨詢客服
新站提交
  • 網站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

本文介紹了谷歌地圖試圖創建未注冊類型的平臺視圖的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我有應用程序我正在處理它在我升級1.12之前的Android項目之前工作正常,而不是它給我一個錯誤google maps Trying to create a platform view of unregistered type

和地圖在iOS中運行良好,使用的Google API密鑰與我在Android中使用的相同

我已執行了多個flutter clean并卸載了應用程序并使用了不同的仿真器,錯誤相同

androidManifest.xml

  <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="come.example.appid">

    <uses-permission android:name="android.permission.INTERNET"/>
    <!-- Speech To Text configration -->
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <!-- Geolocator Configration Start -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <!-- Geolocator Configration end -->
    <!-- Local Notification -->
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <!-- Local Notification -->

    <application
        tools:replace="android:label"
        android:label="appname"
        android:icon="@mipmap/launcher_icon">

        <!-- Google Maps -->
        <meta-data android:name="com.google.android.geo.API_KEY"
             android:value="APIKeyyyyyyyyyyyy-xxxxxxxx"/>

        <!-- Google Maps -->
        <meta-data
            android:name="com.google.firebase.messaging.default_notification_channel_id"
            android:value="@string/default_notification_channel_id"/>

        <!-- Facebook Configration Start -->
        <!-- <meta-data android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id"/> -->


        <activity android:name="com.facebook.FacebookActivity"
            android:configChanges=
                    "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name" />

        <activity
            android:name="com.facebook.CustomTabActivity"
            android:exported="true">

            <!-- FCM Configration start -->
            <intent-filter>
                <action android:name="FLUTTER_NOTIFICATION_CLICK" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <!-- FCM Configration end -->

            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="@string/fb_login_protocol_scheme" />
            </intent-filter>
        </activity>
        <!-- Facebook Configration end -->

        <!-- Local Notification -->
        <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
        <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"></action>
            </intent-filter>
        </receiver>


        <activity
            android:name="io.flutter.embedding.android.FlutterActivity"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">

            <!-- Specify that the launch screen should continue being displayed -->
            <!-- until Flutter renders its first frame. -->
            <meta-data
                android:name="io.flutter.embedding.android.SplashScreenDrawable"
                android:resource="@drawable/launch_background" />

            <!-- Theme to apply as soon as Flutter begins rendering frames -->
            <meta-data
                android:name="io.flutter.embedding.android.NormalTheme"
                android:resource="@style/NormalTheme"
                />

            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>


        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />

    </application>
</manifest>

錯誤

E/Ffltter(8262):[錯誤:Ffltter/lib/ui/ui_dart_state.cc(157)]
未處理的異常:平臺異常(Error,
異常:嘗試創建的平臺視圖
未注冊類型:plugins.fltter.io/GOOGLE_MAPPS E/Ffltter(8262):
在…
Io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView(PlatformViewsController.java:91)
E/撲翼(8262):在
Io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:96)
E/撲翼(8262):在
Io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60)
E/撲翼(8262):在
Io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:231)
電子/顫動(8262):

推薦答案

我在安卓系統上也遇到了同樣的錯誤,但我的代碼在執行以下步驟后可以正常工作:

    清除應用數據(&A)卸載當前應用。
    干凈運行撲翼構建(&A)。
    再次運行您的應用程序

這篇關于谷歌地圖試圖創建未注冊類型的平臺視圖的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,

分享到:
標簽:創建 地圖 平臺 未注冊 類型 視圖 試圖
用戶無頭像

網友整理

注冊時間:

網站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網站吧!
最新入駐小程序

數獨大挑戰2018-06-03

數獨一種數學游戲,玩家需要根據9

答題星2018-06-03

您可以通過答題星輕松地創建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學四六

運動步數有氧達人2018-06-03

記錄運動步數,積累氧氣值。還可偷

每日養生app2018-06-03

每日養生,天天健康

體育訓練成績評定2018-06-03

通用課目體育訓練成績評定