我想將abs整合到我的應用程序,但我不斷收到有關不能膨脹com.actionbarsherlock.internal.widget.ActionBarContainer的錯誤。誰能幫忙?錯誤膨脹類com.actionbarsherlock.internal.widget.ActionBarContainer
「Styles.xml」
<resources>
<style name="AppTheme" parent="Theme.Sherlock.Light" />
</resources>
「activity_main.xml中」
<RelativeLayout 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" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/hello_world"
tools:context=".MainActivity" />
</RelativeLayout>
「的Android的Manifest.xml」
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.e.ffgh"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
「MainActivity.java」
package com.e.ffgh;
import com.actionbarsherlock.app.SherlockActivity;
import android.os.Bundle;
public class MainActivity extends SherlockActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
08-26 06:13:36.442:E/AndroidRuntime(1464):java.lang.RuntimeException:無法啓動活動ComponentInfo {com.e.ffgh/com.e.ffgh.MainActivity}:android.view .InflateException:二進制XML文件行#26:錯誤充氣類com.actionbarsherlock.internal.widget.ActionBarContainer
UPDATE:精簡下來後。以最低限度開始一個BS項目。它適用於ICS,但仍然給我薑餅或Froyo「錯誤膨脹類com.actionbarsherlock.internal.widget.ActionBarContainer」錯誤
在AndroidManifest.xml中將'android:theme =「@ style/AppTheme」'更改爲'android:theme =「@ style/Theme.Sherlock」'' –