我正在尝试使用GreenDroid创建一个简单的标签活动,下面是我的代码
public class TabBarActivity extends GDTabActivity {
private static final String TAB1 = "tab_one";
private static final String TAB2 = "tab_two";
private static final String TAB3 = "tab_three";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle("Screen 2");
Intent intent = new Intent(this, JobActivity.class);
addTab(TAB1, "Tab One", intent);
intent = new Intent(this, ContactListActivity.class);
addTab(TAB2, "Tab Two", intent);
intent = new Intent(this, ParentActivity.class);
addTab(TAB3, "Tab Three", intent);
}
}
我收到以下错误...
09-11 11:18:37.571:W / dalvikvm(20395):threadid = 1:线程退出,未捕获异常(group = 0x40ee9438) 09-11 11:18:37.601:E / AndroidRuntime(20395):致命异乎寻常:主要 09-11 11:18:37.601:E / AndroidRuntime(20395):java.lang.RuntimeException:无法启动活动ComponentInfo {com.cybergeniesolutions.bb/com.cybergeniesolutions.bb.TabBarActivity}:android.view.InflateException:Binary XML文件行#27:错误膨胀类greendroid.widget.ActionBar 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2114) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2139) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.app.ActivityThread.access $ 700(ActivityThread.java:143) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1241) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.os.Handler.dispatchMessage(Handler.java:99) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.os.Looper.loop(Looper.java:137) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.app.ActivityThread.main(ActivityThread.java:4963) 09-11 11:18:37.601:E / AndroidRuntime(20395):at java.lang.reflect.Method.invokeNative(Native Method) 09-11 11:18:37.601:E / AndroidRuntime(20395):at java.lang.reflect.Method.invoke(Method.java:511) 09-11 11:18:37.601:E / AndroidRuntime(20395):at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:1038) 09-11 11:18:37.601:E / AndroidRuntime(20395):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) 09-11 11:18:37.601:E / AndroidRuntime(20395):at dalvik.system.NativeStart.main(Native Method) 09-11 11:18:37.601:E / AndroidRuntime(20395):引起:android.view.InflateException:二进制XML文件行#27:错误膨胀类greendroid.widget.ActionBar 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.view.LayoutInflater.createView(LayoutInflater.java:619) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:693) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.view.LayoutInflater.rInflate(LayoutInflater.java:752) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.view.LayoutInflater.inflate(LayoutInflater.java:495) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.view.LayoutInflater.inflate(LayoutInflater.java:397) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.view.LayoutInflater.inflate(LayoutInflater.java:353) 09-11 11:18:37.601:E / AndroidRuntime(20395):at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:318) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.app.Activity.setContentView(Activity.java:1924) 09-11 11:18:37.601:E / AndroidRuntime(20395):at greendroid.app.GDTabActivity.onCreate(GDTabActivity.java:52) 09-11 11:18:37.601:E / AndroidRuntime(20395):at com.cybergeniesolutions.bb.TabBarActivity.onCreate(TabBarActivity.java:18) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.app.Activity.performCreate(Activity.java:5184) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2078) 09-11 11:18:37.601:E / AndroidRuntime(20395):......还有11个 09-11 11:18:37.601:E / AndroidRuntime(20395):引起:java.lang.reflect.InvocationTargetException 09-11 11:18:37.601:E / AndroidRuntime(20395):at java.lang.reflect.Constructor.constructNative(Native Method) 09-11 11:18:37.601:E / AndroidRuntime(20395):at java.lang.reflect.Constructor.newInstance(Constructor.java:417) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.view.LayoutInflater.createView(LayoutInflater.java:593) 09-11 11:18:37.601:E / AndroidRuntime(20395):......还有23个 09-11 11:18:37.601:E / AndroidRuntime(20395):引起:android.content.res.Resources $ NotFoundException:资源不是Drawable(颜色或路径):TypedValue {t = 0x2 / d = 0x7f01002a a = -1} 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.content.res.Resources.loadDrawable(Resources.java:2239) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.content.res.TypedArray.getDrawable(TypedArray.java:601) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.view.View。(View.java:3419) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.view.ViewGroup。(ViewGroup.java:432) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.widget.LinearLayout。(LinearLayout.java:176) 09-11 11:18:37.601:E / AndroidRuntime(20395):在android.widget.LinearLayout。(LinearLayout.java:172) 09-11 11:18:37.601:E / AndroidRuntime(20395):在greendroid.widget.ActionBar。(ActionBar.java:134) 09-11 11:18:37.601:E / AndroidRuntime(20395):在greendroid.widget.ActionBar。(ActionBar.java:130) 09-11 11:18:37.601:E / AndroidRuntime(20395):... 26更多