2017-07-21 124 views
-2

因此,當我試圖運行我的android應用程序,它將無法正確啓動,即使生成是成功的。我得到奇怪的錯誤

這是我的Android顯示器說:

07-21 05:20:59.832 28253-28253/com.example.testingmapingmarker23 W/System: ClassLoader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/00000020/n/armeabi 
07-21 05:20:59.870 28253-28253/com.example.testingmapingmarker23 I/Google Maps Android API: Google Play services client version: 10298000 
07-21 05:20:59.874 28253-28253/com.example.testingmapingmarker23 I/Google Maps Android API: Google Play services package version: 11055438 
07-21 05:21:00.160 28253-28402/com.example.testingmapingmarker23 W/agl: copyMemory is missing from platform - proto runtime falling back to safer methods. 
07-21 05:21:00.179 28253-28384/com.example.testingmapingmarker23 W/System: ClassLoader referenced unknown path: /system/framework/tcmclient.jar 
07-21 05:21:00.300 28253-28253/com.example.testingmapingmarker23 D/AndroidRuntime: Shutting down VM 
07-21 05:21:00.302 28253-28253/com.example.testingmapingmarker23 E/AndroidRuntime: FATAL EXCEPTION: main 
                        Process: com.example.testingmapingmarker23, PID: 28253 
                        Theme: themes:{default=overlay:com.cyngn.hexo, iconPack:system, fontPkg:com.cyngn.hexo, com.android.systemui=overlay:com.cyngn.hexo, com.android.systemui.navbar=overlay:com.cyngn.hexo} 
                        java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.testingmapingmarker23/com.example.testingmapingmarker23.MapsActivity}: android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating class fragment 
                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2450) 
                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510) 
                         at android.app.ActivityThread.-wrap11(ActivityThread.java) 
                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363) 
                         at android.os.Handler.dispatchMessage(Handler.java:102) 
                         at android.os.Looper.loop(Looper.java:148) 
                         at android.app.ActivityThread.main(ActivityThread.java:5461) 
                         at java.lang.reflect.Method.invoke(Native Method) 
                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
                        Caused by: android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating class fragment 
                         at android.view.LayoutInflater.inflate(LayoutInflater.java:539) 
                         at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
                         at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
                         at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292) 
                         at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
                         at com.example.testingmapingmarker23.MapsActivity.onCreate(MapsActivity.java:50) 
                         at android.app.Activity.performCreate(Activity.java:6251) 
                         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) 
                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2403) 
                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)  
                         at android.app.ActivityThread.-wrap11(ActivityThread.java)  
                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)  
                         at android.os.Handler.dispatchMessage(Handler.java:102)  
                         at android.os.Looper.loop(Looper.java:148)  
                         at android.app.ActivityThread.main(ActivityThread.java:5461)  
                         at java.lang.reflect.Method.invoke(Native Method)  
                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)  
                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)  
                        Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class fragment 
                         at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:782) 
                         at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) 
                         at android.view.LayoutInflater.rInflate(LayoutInflater.java:835) 
                         at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
                         at android.view.LayoutInflater.inflate(LayoutInflater.java:515) 
                         at android.view.LayoutInflater.inflate(LayoutInflater.java:423)  
                         at android.view.LayoutInflater.inflate(LayoutInflater.java:374)  
                         at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)  
                         at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)  
                         at com.example.testingmapingmarker23.MapsActivity.onCreate(MapsActivity.java:50)  
                         at android.app.Activity.performCreate(Activity.java:6251)  
                         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)  
                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2403)  
                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)  
                         at android.app.ActivityThread.-wrap11(ActivityThread.java)  
                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)  
                         at android.os.Handler.dispatchMessage(Handler.java:102)  
                         at android.os.Looper.loop(Looper.java:148)  
                         at android.app.ActivityThread.main(ActivityThread.java:5461)  
                         at java.lang.reflect.Method.invoke(Native Method)  
                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)  
                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)  
                        Caused by: java.lang.IllegalArgumentException: Binary XML file line #9: Duplicate id 0x7f0d007d, tag null, or parent id 0xffffffff with another fragment for com.google.android.gms.maps.SupportMapFragment 
                         at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:3447) 
                         at android.support.v4.app.FragmentController.onCreateView(FragmentController.java:120) 
                         at android.support.v4.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:378) 
                         at android.support.v4.app.BaseFragmentActivityHoneycomb.onCreateView(BaseFragmentActivityHoneycomb.java:33) 
                         at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:79) 
                         at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:754) 
                         at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)  
                         at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)  
                         at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)  
                         at android.view.LayoutInflater.inflate(LayoutInflater.java:515)  
                         at android.view.LayoutInflater.inflate(LayoutInflater.java:423)  
                         at android.view.LayoutInflater.inflate(LayoutInflater.java:374)  
                         at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)  
                         at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)  
                         at com.example.testingmapingmarker23.MapsActivity.onCreate(MapsActivity.java:50)  
                         at android.app.Activity.performCreate(Activity.java:6251)  
                         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)  
                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2403)  
                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)  
                         at android.app.ActivityThread.-wrap11(ActivityThread.java)  
                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)  
                         at android.os.Handler.dispatchMessage(Handler.java:102)  
                         at android.os.Looper.loop(Looper.java:148)  
                         at android.app.ActivityThread.main(ActivityThread.java:5461)  
                         at java.lang.reflect.Method.invoke(Native Method)  
                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)  


at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616 

可悲的是我絕對沒有什麼線索,這些錯誤的意思。

有人可以幫助我嗎?

也許它有幫助:我正在工具欄上工作。

我activity_maps.xml:

<?xml version="1.0" encoding="utf-8"?> 

<LinearLayout 
    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=".MapsActivity"> 
    <fragment xmlns:android="http://schemas.android.com/apk/res/android" 
     xmlns:map="http://schemas.android.com/apk/res-auto" 
     xmlns:tools="http://schemas.android.com/tools" 
     android:id="@+id/map" 
     android:name="com.google.android.gms.maps.SupportMapFragment" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:layout_gravity="top" 
     tools:context="com.example.testingmapingmarker23.MapsActivity" 
     /> 




    <android.support.v7.widget.Toolbar 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     xmlns:app="http://schemas.android.com/apk/res-auto" 
     android:id="@+id/toolbar" 
     android:layout_width="match_parent" 
     android:layout_height="?attr/actionBarSize" 
     android:background="?attr/colorPrimary" 
     app:layout_scrollFlags="scroll|enterAlways" 
     android:layout_alignParentBottom="true" 
     android:layout_gravity="bottom" 
     android:theme="@style/ToolbarTheme" 

     android:title="Hello" 
     app:popupTheme="@style/ThemeOverlay.AppCompat.Light"> 

     <TextView 
      android:id="@+id/toolbar_title" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="TEDO" 
      android:textColor="@android:color/white" 
      style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title" 
      android:layout_gravity="center" 
      /> 
    </android.support.v7.widget.Toolbar> 

</LinearLayout> 

而且values.xml(行先打 - 別人有太多的字符)

<?xml version="1.0" encoding="utf-8"?> 
<resources> 
    <color name="design_fab_shadow_end_color">@android:color/transparent</color> 
    <color name="design_fab_shadow_mid_color">#14000000</color> 
    <color name="design_fab_shadow_start_color">#44000000</color> 
    <color name="design_fab_stroke_end_inner_color">#0A000000</color> 
    <color name="design_fab_stroke_end_outer_color">#0F000000</color> 
    <color name="design_fab_stroke_top_inner_color">#1AFFFFFF</color> 
    <color name="design_fab_stroke_top_outer_color">#2EFFFFFF</color> 
    <color name="design_snackbar_background_color">#323232</color> 
    <color name="design_textinput_error_color_dark">#FFFF6E6E</color> 
    <color name="design_textinput_error_color_light">#FFD50000</color> 
    <declare-styleable name="AppBarLayout"><attr name="elevation"/><attr name="android:background"/><attr format="boolean" name="expanded"/></declare-styleable> 
    <declare-styleable name="AppBarLayoutStates"><attr format="boolean" name="state_collapsed"/><attr format="boolean" name="state_collapsible"/></declare-styleable> 
    <declare-styleable name="AppBarLayout_Layout"><attr name="layout_scrollFlags"> 
+1

你的佈局文件#2中的第9行是什麼#Binary XML file line# – Sony

+0

我的styles.xml是二進制xml文件還是我可以在哪裏找到它? – MrHarrison

+0

發佈您的佈局xml文件 – Sony

回答

0

不要

android:name="com.google.android.gms.maps.SupportMapFragment" 

class="com.google.android.gms.maps.SupportMapFragment" 

CLEAN-REBUILD & RUN後。