我更新了我的支持庫,從R20到R21,現在當我跑我的應用程序我得到這個錯誤在我的主要活動super.onCreate
:java.lang.NoSuchFieldError的:android.support.v7.appcompat
java.lang.NoSuchFieldError: android.support.v7.appcompat.R$styleable.Theme_windowActionBar
at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:145)
at android.support.v7.app.ActionBarActivityDelegateBase.onCreate(ActionBarActivityDelegateBase.java:139)
at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:123)
at (packageName).Main.onCreate(Main.java:64)
at android.app.Activity.performCreate(Activity.java)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java)
at android.app.ActivityThread.access$700(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java)
at android.os.Handler.dispatchMessage(Handler.java)
at android.os.Looper.loop(Looper.java)
at android.app.ActivityThread.main(ActivityThread.java)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
at dalvik.system.NativeStart.main(Native Method)
我theme.xml:
<style name="AppBaseTheme" parent="Theme.AppCompat">
</style>
<style name="AppTheme" parent="AppBaseTheme">
<item> ... </item>
</style>
清單中
:
android:theme="@style/AppTheme"
是什麼問題?
謝謝
你的應用使用什麼主題和父母? – petey 2014-10-30 14:08:53
@petey,發佈更新...,它正在更新 – Virusman 2014-10-30 14:14:34
wats ur'target SDK'和'compile SDK'版本? – Panther 2014-10-30 14:22:55