更新Gradle比这些错误

时间:2018-09-05 08:08:24

标签: android-studio android-fragments

E/GAv4: Successfully bound to service but never got onServiceConnected callback
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.robotemplates.cookbook, PID: 8793
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.robotemplates.cookbook/com.robotemplates.cookbook.activity.RecipeDetailActivity}: android.view.InflateException: Binary XML file line #9: Error inflating class com.robotemplates.cookbook.view.ObservableStickyScrollView
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2342)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
        at android.app.ActivityThread.access$800(ActivityThread.java:151)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1266)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5421)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:979)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:795)
        at dalvik.system.NativeStart.main(Native Method)
     Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class com.robotemplates.cookbook.view.ObservableStickyScrollView
        at android.view.LayoutInflater.createView(LayoutInflater.java:620)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
        at com.robotemplates.cookbook.fragment.RecipeDetailFragment.onCreateView(RecipeDetailFragment.java:125)
        at android.support.v4.app.Fragment.performCreateView(Fragment.java:1786)
        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:922)
        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1114)
        at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1216)
        at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2169)
        at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:297)
        at android.support.v7.app.ActionBarActivity.onCreateView(ActionBarActivity.java:547)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
        at android.support.v7.app.ActionBarActivityDelegateBase.setContentView(ActionBarActivityDelegateBase.java:228)
        at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:102)
        at com.robotemplates.cookbook.activity.RecipeDetailActivity.onCreate(RecipeDetailActivity.java:36)
        at android.app.Activity.performCreate(Activity.java:5264)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1099)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2282)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392) 
        at android.app.ActivityThread.access$800(ActivityThread.java:151) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1266) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:136) 
        at android.app.ActivityThread.main(ActivityThread.java:5421) 
        at java.lang.reflect.Method.invokeNative(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:515) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:979) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:795) 
        at dalvik.system.NativeStart.main(Native Method) 
     Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Constructor.constructNative(Native Method)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at android.view.LayoutInflater.createView(LayoutInflater.java:594)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
        at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
        at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
        at com.robotemplates.cookbook.fragment.RecipeDetailFragment.onCreateView(RecipeDetailFragment.java:125) 
        at android.support.v4.app.Fragment.performCreateView(Fragment.java:1786) 
        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:922) 
        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1114) 
        at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1216) 
        at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2169) 
        at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:297) 
        at android.support.v7.app.ActionBarActivity.onCreateView(ActionBarActivity.java:547) 
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685) 
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
        at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
        at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
        at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
        at android.support.v7.app.ActionBarActivityDelegateBase.setContentView(ActionBarActivityDelegateBase.java:228) 
        at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:102) 
        at com.robotemplates.cookbook.activity.RecipeDetailActivity.onCreate(RecipeDetailActivity.java:36) 
        at android.app.Activity.performCreate(Activity.java:5264) 
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1099) 
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2282) 
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392) 
        at android.app.ActivityThread.access$800(ActivityThread.java:151) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1266) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:136) 
        at android.app.ActivityThread.main(ActivityThread.java:5421) 
        at java.lang.reflect.Method.invokeNative(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:515) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:979) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:795) 
        at dalvik.system.NativeStart.main(Native Method) 
     Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x3
        at android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:500)
        at com.emilsjolander.components.StickyScrollViewItems.StickyScrollView.<init>(StickyScrollView.java:90)
        at com.emilsjolander.components.StickyScrollViewItems.StickyScrollView.<init>(StickyScrollView.java:75)
        at com.robotemplates.cookbook.view.ObservableStickyScrollView.<init>(ObservableStickyScrollView.java:29)
        at java.lang.reflect.Constructor.constructNative(Native Method) 
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
        at android.view.LayoutInflater.createView(LayoutInflater.java:594) 
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
        at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
        at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
        at com.robotemplates.cookbook.fragment.RecipeDetailFragment.onCreateView(RecipeDetailFragment.java:125) 
        at android.support.v4.app.Fragment.performCreateView(Fragment.java:1786) 
        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:922) 
        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1114) 
        at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1216) 
        at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2169) 
        at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:297) 
        at android.support.v7.app.ActionBarActivity.onCreateView(ActionBarActivity.java:547) 
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685) 
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
        at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
        at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
        at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
        at android.support.v7.app.ActionBarActivityDelegateBase.setContentView(ActionBarActivityDelegateBase.java:228) 
        at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:102) 
        at com.robotemplates.cookbook.activity.RecipeDetailActivity.onCreate(RecipeDetailActivity.java:36) 
        at android.app.Activity.performCreate(Activity.java:5264) 
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1099) 
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2282) 
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392) 
        at android.app.ActivityThread.access$800(ActivityThread.java:151) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1266) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:136) 
        at android.app.ActivityThread.main(ActivityThread.java:5421) 
        at java.lang.reflect.Method.invokeNative(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:515) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:979) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:795) 
        at dalvik.system.NativeStart.main(Native Method) 
Application terminated.

0 个答案:

没有答案