当我点击导航栏上的方形按钮(最近的应用程序)时,我得到一个systemUI fc ..我已经记录了一个详细日志..
<div id="background">
</div>
这是日志
这是错误在第384行的RecentsActivity.java
第384行: - `//设置最近的布局 的setContentView(R.layout.recents);
和RecentsActivity.java的一部分
E/AndroidRuntime( 2748): FATAL EXCEPTION: main
E/AndroidRuntime( 2748): Process: com.android.systemui, PID: 2748
E/AndroidRuntime( 2748): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.systemui/com.android.systemui.recents.RecentsActivity}: android.view.InflateException: Binary XML file line #18: Error inflating class <unknown>
E/AndroidRuntime( 2748): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2340)
E/AndroidRuntime( 2748): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2402)
E/AndroidRuntime( 2748): at android.app.ActivityThread.access$900(ActivityThread.java:151)
E/AndroidRuntime( 2748): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1318)
E/AndroidRuntime( 2748): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 2748): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 2748): at android.app.ActivityThread.main(ActivityThread.java:5269)
E/AndroidRuntime( 2748): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 2748): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 2748): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
E/AndroidRuntime( 2748): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
E/AndroidRuntime( 2748): Caused by: android.view.InflateException: Binary XML file line #18: Error inflating class <unknown>
E/AndroidRuntime( 2748): at android.view.LayoutInflater.createView(LayoutInflater.java:633)
E/AndroidRuntime( 2748): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
E/AndroidRuntime( 2748): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682)
E/AndroidRuntime( 2748): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
E/AndroidRuntime( 2748): at android.view.LayoutInflater.parseInclude(LayoutInflater.java:892)
E/AndroidRuntime( 2748): at android.view.LayoutInflater.rInflate(LayoutInflater.java:802)
E/AndroidRuntime( 2748): at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
E/AndroidRuntime( 2748): at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
E/AndroidRuntime( 2748): at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
E/AndroidRuntime( 2748): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:378)
E/AndroidRuntime( 2748): at android.app.Activity.setContentView(Activity.java:2145)
E/AndroidRuntime( 2748): at com.android.systemui.recents.RecentsActivity.onCreate(RecentsActivity.java:384)
E/AndroidRuntime( 2748): at android.app.Activity.performCreate(Activity.java:5990)
E/AndroidRuntime( 2748): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
E/AndroidRuntime( 2748): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2293)
E/AndroidRuntime( 2748): ... 10 more
E/AndroidRuntime( 2748): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime( 2748): at java.lang.reflect.Constructor.newInstance(Native Method)
E/AndroidRuntime( 2748): at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
E/AndroidRuntime( 2748): at android.view.LayoutInflater.createView(LayoutInflater.java:607)
E/AndroidRuntime( 2748): ... 24 more
E/AndroidRuntime( 2748): Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x1
E/AndroidRuntime( 2748): at android.content.res.TypedArray.getDimensionPixelOffset(TypedArray.java:533)
E/AndroidRuntime( 2748): at android.view.View.<init>(View.java:3798)
E/AndroidRuntime( 2748): at android.view.ViewGroup.<init>(ViewGroup.java:497)
E/AndroidRuntime( 2748): at android.widget.FrameLayout.<init>(FrameLayout.java:115)
E/AndroidRuntime( 2748): at android.widget.FrameLayout.<init>(FrameLayout.java:111)
E/AndroidRuntime( 2748): at android.widget.FrameLayout.<init>(FrameLayout.java:107)
E/AndroidRuntime( 2748): ... 27 more
这是位于packages / systemui / res / layout / recents.xml
中的recents.xml/** Called with the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// For the non-primary user, ensure that the SystemServicesProxy and configuration is
// initialized
RecentsTaskLoader.initialize(this);
SystemServicesProxy ssp = RecentsTaskLoader.getInstance().getSystemServicesProxy();
mConfig = RecentsConfiguration.reinitialize(this, ssp);
// Initialize the widget host (the host id is static and does not change)
mAppWidgetHost = new RecentsAppWidgetHost(this, Constants.Values.App.AppWidgetHostId);
// Set the Recents layout
setContentView(R.layout.recents);
mRecentsView = (RecentsView) findViewById(R.id.recents_view);
mRecentsView.setCallbacks(this);
mRecentsView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
mEmptyViewStub = (ViewStub) findViewById(R.id.empty_view_stub);
mDebugOverlayStub = (ViewStub) findViewById(R.id.debug_overlay_stub);
mScrimViews = new SystemBarScrimViews(this, mConfig);
mStatusBar = ((SystemUIApplication) getApplication())
.getComponent(PhoneStatusBar.class);
inflateDebugOverlay();
请帮帮我,我该怎么做...
希望有一个修复
谢谢
答案 0 :(得分:1)
我认为,使用“com.android.systemui.recents.views.RecentsView”的问题,这是用于系统应用程序层的。
请检查已编译的SDK和目标SDK版本。