here-maps-msdkui-ussie-in-xml编译

np8igboo  于 2021-07-03  发布在  Java
关注(0)|答案(4)|浏览(283)

我正试图使用msdkui从这里mpas以下的文件,https://github.com/heremaps/msdkui-android/blob/master/documentation/guides/quickstart.md,但每次我遇到这个错误:

android.view.InflateException: 
Binary XML file line # 18: Binary XML file line # 18: You must supply a layout_width attribute.

所以,我什么都试了,什么都没解决。只要有这个xml。此错误仅在我使用msdkui中的类“<com.here.msdkui.routing.waypointlist”时出现。

jdzmm42g

jdzmm42g2#

--

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <com.here.msdkui.routing.WaypointList
        android:id="@+id/waypointList"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

    <fragment
        class="com.here.android.mpa.mapping.AndroidXMapFragment"
        android:id="@+id/mapFragment"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"/>
</LinearLayout>

I'm trying to use Msdkui from Here following this documentation, https://github.com/heremaps/msdkui-android/blob/master/Documentation/Guides/QuickStart.md, but every time I get this error "android.view.InflateException: Binary XML file line # 18: Binary XML file line # 18: You must supply a layout_width attribute. ", I tried everything and nothing to solve. Just have this xml. This error only appears when I use a class in msdkui either "<com.here.msdkui.routing.WaypointList".
d6kp6zgx

d6kp6zgx3#


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.here.msdkui.vamosdenovo">

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.VamosDeNovo">

        <meta-data
            android:name="com.here.android.maps.appid"
            android:value="---------------" />
        <meta-data
            android:name="com.here.android.maps.apptoken"
            android:value="------------" />
        <meta-data
            android:name="com.here.android.maps.license.key"---------" />

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

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

</manifest>

相关问题