请帮忙。发生什么了?错误的原因是什么,我该如何解决?谢谢你的帮助!
> java.lang.RuntimeException: Unable to start activity
> ComponentInfo{com.example.interviewhelpers/com.example.interviewhelpers.Dashboard}:
> android.view.InflateException: Binary XML file line #192: Error
> inflating class fragment
Caused by: android.view.InflateException: Binary XML file line #192: Error inflating class fragment
这是我的代码:主类...
public class Dashboard extends Activity implements OnClickListener {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dashboard);
activity_dashboard... 有更多的元素和布局,而且这个:
<fragment
android:id="@+id/listFragment"
android:layout_width="150dip"
android:layout_height="match_parent"
android:name="com.example.interviewhelpers.ClientDetailActivity" ></fragment>
和...
package com.example.interviewhelpers;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
public class ClientDetailActivity extends FragmentActivity {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.cliente_detailed, container, false);
TextView textView = (TextView) view.findViewById(R.id.detailsText);
return view;
}
}