Ошибки карты Android - PullRequest
       18

Ошибки карты Android

0 голосов
/ 29 ноября 2018

, поэтому я пытаюсь добавить автозаполнение места в свое приложение, но я еще ничего не добавил в класс java, но у меня очень длинная ошибка, и я не знаю, откуда это происходит.xml:

<android.support.v7.widget.CardView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentStart="true"
    android:layout_centerVertical="true"
    >

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <fragment
            android:id="@+id/place_autocomplete_fragment"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"
            />

    </RelativeLayout>
</android.support.v7.widget.CardView>

java:

 private String location;

Task<Void> mDatabase;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_selector);


}

ошибка:

E/UncaughtException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/R$layout;
    at com.google.android.gms.location.places.ui.PlaceAutocompleteFragment.onCreateView(Unknown Source)
    at android.app.Fragment.performCreateView(Fragment.java:2112)
    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:874)
    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1061)
    at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1163)
    at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2132)
    at android.app.Activity.onCreateView(Activity.java:5461)
    at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:389)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
    at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
    at com.apps.ayodkay.services.selector.onCreate(selector.java:29)
    at android.app.Activity.performCreate(Activity.java:6112)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1117)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2609)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2721)
    at android.app.ActivityThread.access$900(ActivityThread.java:168)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5753)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
 Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.R$layout" on path: DexPathList[[zip file "/data/app/com.apps.ayodkay.services-1/base.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.apps.ayodkay.services-1/lib/arm, /vendor/lib, /system/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
    at com.google.android.gms.location.places.ui.PlaceAutocompleteFragment.onCreateView(Unknown Source) 
    at android.app.Fragment.performCreateView(Fragment.java:2112) 
    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:874) 
    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1061) 
    at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1163) 
    at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2132) 
    at android.app.Activity.onCreateView(Activity.java:5461) 
    at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:389) 
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 
    at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469) 
    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
    at com.apps.ayodkay.services.selector.onCreate(selector.java:29) 
    at android.app.Activity.performCreate(Activity.java:6112) 
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1117) 
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2609) 
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2721) 
    at android.app.ActivityThread.access$900(ActivityThread.java:168) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393) 
    at android.os.Handler.dispatchMessage(Handler.java:102) 
    at android.os.Looper.loop(Looper.java:135) 
    at android.app.ActivityThread.main(ActivityThread.java:5753) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at java.lang.reflect.Method.invoke(Method.java:372) 
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200) 
    Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.R$layout
    at java.lang.Class.classForName(Native Method)
    at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
    at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
            ... 32 more
 Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

E / AndroidRuntime: ИСКЛЮЧИТЕЛЬНОЕ ИСКЛЮЧЕНИЕ: основной процесс: com.apps.ayodkay.services, PID: 25664 java.lang.NoClassDefFoundError: Ошибка разрешения: Lcom / google / android / gms / R $ layout;на com.google.android.gms.location.places.ui.PlaceAutocompleteFragment.onCreateView (неизвестный источник) на android.app.Fragment.performCreateView (Fragment.java:2112) на android.app.FragmentManagerImpl.moveToState (FragmentManager.j874) в android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1061) в android.app.FragmentManagerImpl.addFragment (FragmentManager.java:1163) в android.app.FragmentManagerImpl.onCreateView и в другом фрагменте (FragmentManager).app.Activity.onCreateView (Activity.java:5461) в android.support.v4.app.FragmentActivity.onCreateView (FragmentActivity.java:389) в android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:733) в android.view.LayoutInflater.rInflate (LayoutInflater.java:806) в android.view.LayoutInflater.rInflate (LayoutInflater.java:809) в android.view.LayoutInflater.rInflate (LayoutInflater.java:809) в android.view.Layoutfla (LayoutInflater.java:504) на android.view.LayoutInflater.inflate (LayoutInflater.java:414) наdroid.view.LayoutInflater.inflate (LayoutInflater.java:365) в android.support.v7.app.AppCompatDelegateImpl.setContentView (AppCompatDelegateImpl.java:469) в android.support.v7.app.AppCompatActivity.Conjj:140) в com.apps.ayodkay.services.selector.onCreate (selector.java:29) в android.app.Activity.performCreate (Activity.java:6112) в android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1117).) на android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2609) на android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2721) на android.app.ActivityThread.access $ 900 (ActivityThread.java:168) на андроиде.app.ActivityThread $ H.handleMessage (ActivityThread.java:1393) в android.os.Handler.dispatchMessage (Handler.java:102) в android.os.Looper.loop (Looper.java:135) в android.app.ActivityThread.main (ActivityThread.java:5753) в java.lang.reflect.Method.invoke (собственный метод) в java.lang.reflect.Method.invoke (Method.java:372) вcom.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:1405) в com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1200), вызванный: java.lang.ClassNotFoundException:класс "com.google.android.gms.R $ layout" найти по пути: DexPathList [[файл zip "/data/app/com.apps.ayodkay.services-1/base.apk", файл zip "/ data/app/com.apps.ayodkay.services-1/split_lib_dependencies_apk.apk ", ZIP-файл" /data/app/com.apps.ayodkay.services-1/split_lib_slice_0_apk.apk ", ZIP-файл" / data / app / com.apps.ayodkay.services-1 / split_lib_slice_1_apk.apk ", ZIP-файл" /data/app/com.apps.ayodkay.services-1/split_lib_slice_2_apk.apk ", ZIP-файл" /data/app/com.apps.ayodkay.services-1 / split_lib_slice_3_apk.apk ", файл zip" /data/app/com.apps.ayodkay.services-1/split_lib_slice_4_apk.apk ", файл zip" /data/app/com.apps.ayodkay.services-1/split_lib_slice_5_apk.apk ", почтовый файл" /data/app/com.apps.ayodkay.services-1/split_lib_slice_6_apk.apk ", почтовый файл" /data/app/com.apps.ayodkay.services-1/split_lib_slice_7_apk.apk ", ZIP-файл" /data/app/com.apps.ayodkay.services-1/split_lib_slice_8_apk.apk ", ZIP-файл" /data/app/com.apps.ayodkay.services-1/split_lib_slice_9_apk.apk "], nativeLibraryDirectories = [/ data / app / com.apps.ayodkay.services-1 / lib / arm, / vendor / lib, / system / lib]]в dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:56) в java.lang.ClassLoader.loadClass (ClassLoader.java:511) в java.lang.ClassLoader.loadClass (ClassLoader.java:469) в com.google.android.gms.location.places.ui.PlaceAutocompleteFragment.onCreateView (неизвестный источник) по адресу android.app.Fragment.performCreateView (Fragment.java:2112) в android.app.FragmentManagerImpl.moveToState (FragmentManager.jroid:874)app.FragmentManagerImpl.moveToState (FragmentManager.java:1061) в android.app.FragmentManagerImpl.addFragment (FragmentManager.java:1163) в android.app.FragmentManagerImpl.onCreateView (FragmentManager.java. aton: 21)(Activity.java:5461) в android.support.v4.app.FragmentActivity.onCreateView (FragmentActivity.java:389) в android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:733) в android.view.LayoutInflater.rInflate (LayoutInflater.java:806) на android.view.LayoutInflater.rInflate (LayoutInflater.java:809) на android.view.LayoutInflater.rInflate (LayoutInflater.java:809) в android.view.LayoutInflater.inflate (LayoutInflater.java:504) в android.view.LayoutInflater.inflate (LayoutInflater.java:414) в android.view.Layoutflater.inflate (LayoutInflater.java:365) в android.support.v7.app.AppCompatDelegateImpl.setContentView (AppCompatDelegateImpl.java:469) в android.support.v7.app.AppCompatActivity.setContentView (AppCompatActivity.jp) com.app.ayodkay.services.selector.onCreate (selector.java:29) в android.app.Activity.performCreate (Activity.java:6112) в android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1117) в android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2609) в android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2721) в android.app.ActivityThread.access $ 900 (ActivityThread.java:168) в android.app.ActivityThread $ H.handleMessage (ActivityThread.java:1393) на android.os.Handler.dispatchMessage (Handler.java:102) на android.os.Looper.loop (Looper.java:135) на android.app.ActivityThread.main (ActivityThread.java:5753) на java.lang.reflect.Method.invoke (собственный метод) на java.lang.reflect.Method.invoke (метод.java: 372) на com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:1405) на com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1200) Подавлено: java.lang.ClassNotFoundException: com.google.android.gms.R $ layout в java.lang.Class.classForName (собственный метод) в java.lang.BootClassLoader.findClass (ClassLoader.java:781) в java.lang.BootClassLoader.loadClass (ClassLoader.java:841) в java.lang.ClassLoader.loadClass (ClassLoader.java:504) ... еще 32 Причина: java.lang.NoClassDefFoundError: Класс не найден при загрузке

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...