web-dev-qa-db-fra.com

Error gonflant la classe android.fragment.app.fragmentContainerview, peut-on me dire ce que je manque

Je travaille sur l'API Google Place à apparaître dans une vision de carte.

Le code particulier que je regarde est de GitHub, semble travailler pour tout le monde, mais je ne comprends pas pourquoi cela me jette une erreur.

C'est l'erreur que je reçois:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.rizwanqureshi.kevstaxiscanterbury, PID: 6818
    Java.lang.RuntimeException: Unable to start activity ComponentInfo{com.rizwanqureshi.kevstaxiscanterbury/com.rizwanqureshi.kevstaxiscanterbury.CustomerMapsActivity}: Android.view.InflateException: Binary XML file line #50 in com.rizwanqureshi.kevstaxiscanterbury:layout/activity_customer_maps: Binary XML file line #50 in com.rizwanqureshi.kevstaxiscanterbury:layout/activity_customer_maps: Error inflating class Android.fragment.app.FragmentContainerView
        at Android.app.ActivityThread.performLaunchActivity(ActivityThread.Java:3270)
        at Android.app.ActivityThread.handleLaunchActivity(ActivityThread.Java:3409)
        at Android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.Java:83)
        at Android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.Java:135)
        at Android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.Java:95)
        at Android.app.ActivityThread$H.handleMessage(ActivityThread.Java:2016)
        at Android.os.Handler.dispatchMessage(Handler.Java:107)
        at Android.os.Looper.loop(Looper.Java:214)
        at Android.app.ActivityThread.main(ActivityThread.Java:7356)
        at Java.lang.reflect.Method.invoke(Native Method)
        at com.Android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.Java:492)
        at com.Android.internal.os.ZygoteInit.main(ZygoteInit.Java:930)
     Caused by: Android.view.InflateException: Binary XML file line #50 in com.rizwanqureshi.kevstaxiscanterbury:layout/activity_customer_maps: Binary XML file line #50 in com.rizwanqureshi.kevstaxiscanterbury:layout/activity_customer_maps: Error inflating class Android.fragment.app.FragmentContainerView
     Caused by: Android.view.InflateException: Binary XML file line #50 in com.rizwanqureshi.kevstaxiscanterbury:layout/activity_customer_maps: Error inflating class Android.fragment.app.FragmentContainerView
     Caused by: Java.lang.ClassNotFoundException: Android.fragment.app.FragmentContainerView
        at Java.lang.Class.classForName(Native Method)
        at Java.lang.Class.forName(Class.Java:454)
        at Android.view.LayoutInflater.createView(LayoutInflater.Java:815)
        at Android.view.LayoutInflater.createViewFromTag(LayoutInflater.Java:1006)
        at Android.view.LayoutInflater.createViewFromTag(LayoutInflater.Java:961)
        at Android.view.LayoutInflater.rInflate(LayoutInflater.Java:1123)
        at Android.view.LayoutInflater.rInflateChildren(LayoutInflater.Java:1084)
        at Android.view.LayoutInflater.rInflate(LayoutInflater.Java:1126)
        at Android.view.LayoutInflater.rInflateChildren(LayoutInflater.Java:1084)
        at Android.view.LayoutInflater.rInflate(LayoutInflater.Java:1126)
        at Android.view.LayoutInflater.rInflateChildren(LayoutInflater.Java:1084)
        at Android.view.LayoutInflater.inflate(LayoutInflater.Java:682)
        at Android.view.LayoutInflater.inflate(LayoutInflater.Java:534)
        at Android.view.LayoutInflater.inflate(LayoutInflater.Java:481)
        at com.Android.internal.policy.PhoneWindow.setContentView(PhoneWindow.Java:438)
        at Android.app.Activity.setContentView(Activity.Java:3324)
        at com.rizwanqureshi.kevstaxiscanterbury.CustomerMapsActivity.onCreate(CustomerMapsActivity.Java:116)
        at Android.app.Activity.performCreate(Activity.Java:7802)
        at Android.app.Activity.performCreate(Activity.Java:7791)
        at Android.app.Instrumentation.callActivityOnCreate(Instrumentation.Java:1299)
        at Android.app.ActivityThread.performLaunchActivity(ActivityThread.Java:3245)
        at Android.app.ActivityThread.handleLaunchActivity(ActivityThread.Java:3409)
        at Android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.Java:83)
        at Android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.Java:135)
        at Android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.Java:95)
        at Android.app.ActivityThread$H.handleMessage(ActivityThread.Java:2016)
        at Android.os.Handler.dispatchMessage(Handler.Java:107)
        at Android.os.Looper.loop(Looper.Java:214)
E/AndroidRuntime:     at Android.app.ActivityThread.main(ActivityThread.Java:7356)
        at Java.lang.reflect.Method.invoke(Native Method)
        at com.Android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.Java:492)
        at com.Android.internal.os.ZygoteInit.main(ZygoteInit.Java:930)
     Caused by: Java.lang.ClassNotFoundException: Didn't find class "Android.fragment.app.FragmentContainerView" on path: DexPathList[[Zip file "/data/app/com.rizwanqureshi.kevstaxiscanterbury-Nkg-1mQCfbE8I1MoJKHQuA==/base.apk"],nativeLibraryDirectories=[/data/app/com.rizwanqureshi.kevstaxiscanterbury-Nkg-1mQCfbE8I1MoJKHQuA==/lib/x86, /system/lib, /system/product/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.Java:196)
        at Java.lang.ClassLoader.loadClass(ClassLoader.Java:379)
        at Java.lang.ClassLoader.loadClass(ClassLoader.Java:312)
            ... 32 more

L'emporter principal est qu'il existe une erreur de gonflage de classe android.fragment.app.fragmentContainerview et que le problème est à la ligne 50 du XML.

Ceci est le XML:

<FrameLayout
    xmlns:Android="http://schemas.Android.com/apk/res/Android"
    xmlns:tools="http://schemas.Android.com/tools"
    Android:layout_width="match_parent"
    Android:layout_height="match_parent"
    tools:context=".CustomerLogin" >


    <androidx.fragment.app.FragmentContainerView
        Android:id="@+id/map"
        Android:name="com.google.Android.gms.maps.SupportMapFragment"
        Android:layout_width="match_parent"
        Android:layout_height="match_parent"/>

    <RelativeLayout
        Android:layout_width="wrap_content"
        Android:layout_height="wrap_content">
        <LinearLayout
            Android:layout_width="match_parent"
            Android:layout_height="wrap_content"
            Android:id="@+id/buttons">
            <Button
                Android:layout_weight="1"
                Android:layout_width="0dp"
                Android:layout_height="wrap_content"
                Android:id="@+id/logout"
                Android:text="logout"
                tools:ignore="ButtonStyle" />
            <Button
                Android:layout_weight="1"
                Android:layout_width="0dp"
                Android:layout_height="wrap_content"
                Android:id="@+id/history"
                Android:text="history"
                tools:ignore="ButtonStyle" />
            <Button
                Android:layout_weight="1"
                Android:layout_width="0dp"
                Android:layout_height="wrap_content"
                Android:id="@+id/settings"
                Android:text="Settings"
                tools:ignore="ButtonStyle" />
        </LinearLayout>

        <androidx.cardview.widget.CardView
            Android:layout_below="@+id/buttons"
            Android:layout_width="match_parent"
            Android:layout_height="wrap_content"
            Android:layout_margin="20sp">



//***LINE 50 WHERE THE ERROR IS***



            <Android.fragment.app.FragmentContainerView
                Android:id="@+id/place_autocomplete_fragment"
                Android:layout_width="match_parent"
                Android:layout_height="match_parent"
                tools:ignore="ExtraText">
                Android:name="com.google.Android.gms.location.places.ui.PlaceAutocompleteFragment"
            </Android.fragment.app.FragmentContainerView>
        </androidx.cardview.widget.CardView>
    </RelativeLayout>

    <LinearLayout
        Android:layout_width="match_parent"
        Android:layout_height="wrap_content"
        Android:orientation="vertical"
        Android:layout_gravity="bottom">
        <LinearLayout
            Android:layout_width="match_parent"
            Android:layout_height="wrap_content"
            Android:id="@+id/driverInfo"
            Android:layout_gravity="bottom"
            Android:orientation="horizontal"
            Android:background="@Android:color/white"
            Android:visibility="gone">
            <LinearLayout
                Android:layout_width="wrap_content"
                Android:layout_height="wrap_content"
                Android:orientation="vertical"
                Android:paddingLeft="40sp">
            </LinearLayout>
        </LinearLayout>
        <LinearLayout
            Android:background="@Android:color/white"
            Android:orientation="vertical"
            Android:layout_width="match_parent"
            Android:layout_height="wrap_content">
        </LinearLayout>
    </LinearLayout>
</FrameLayout>

Donc, je suppose qu'il y a quelque chose qui ne va pas avec le fragmentContainerview? Mais je ne reçois aucune erreur dans le code et rien ne voit sur Google.

Je me sens comme peut-être que quelque chose est obsolète plutôt que de manière incorrecte, mais je n'ai pas d'indication.

Merci pour toute entrée.

4
riizwaan

Probablement après -refactor-> Supprimer les ressources inutilisées Vous pouvez perdre ID de votre androidx.fragment.app.FragmentContainerView - ramène le

0
nicolas asinovich