我已經很快樂的ABS用戶了很多年了,但自從我上次更新到maven-android-plugin後,我無法讓構建的應用在沒有本機操作的設備上運行酒吧...即蜂窩之前的任何事情。Maven-Android-Plugin 3.8.2會導致ActionBarSherlock問題
我得到的例外是;
01-11 15:47:04.413: E/AndroidRuntime(1479): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1768)
01-11 15:47:04.413: E/AndroidRuntime(1479): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
01-11 15:47:04.413: E/AndroidRuntime(1479): at android.app.ActivityThread.access$1500(ActivityThread.java:123)
01-11 15:47:04.413: E/AndroidRuntime(1479): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
01-11 15:47:04.413: E/AndroidRuntime(1479): at android.os.Handler.dispatchMessage(Handler.java:99)
01-11 15:47:04.413: E/AndroidRuntime(1479): at android.os.Looper.loop(Looper.java:130)
01-11 15:47:04.413: E/AndroidRuntime(1479): at android.app.ActivityThread.main(ActivityThread.java:3835)
01-11 15:47:04.413: E/AndroidRuntime(1479): at java.lang.reflect.Method.invokeNative(Native Method)
01-11 15:47:04.413: E/AndroidRuntime(1479): at java.lang.reflect.Method.invoke(Method.java:507)
01-11 15:47:04.413: E/AndroidRuntime(1479): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
01-11 15:47:04.413: E/AndroidRuntime(1479): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
01-11 15:47:04.413: E/AndroidRuntime(1479): at dalvik.system.NativeStart.main(Native Method)
01-11 15:47:04.413: E/AndroidRuntime(1479): Caused by: java.lang.RuntimeException: Couldn't find content container view
01-11 15:47:04.413: E/AndroidRuntime(1479): at com.actionbarsherlock.internal.ActionBarSherlockCompat.generateLayout(ActionBarSherlockCompat.java:1015)
01-11 15:47:04.413: E/AndroidRuntime(1479): at com.actionbarsherlock.internal.ActionBarSherlockCompat.installDecor(ActionBarSherlockCompat.java:902)
01-11 15:47:04.413: E/AndroidRuntime(1479): at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:836)
01-11 15:47:04.413: E/AndroidRuntime(1479): at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:261)
01-11 15:47:04.413: E/AndroidRuntime(1479): at com.oceanlife.core.activity.AbstractThemedActionBarActivity.onCreate(AbstractThemedActionBarActivity.java:32)
01-11 15:47:04.413: E/AndroidRuntime(1479): at com.oceanlife.activity.SpotListingActivity.onCreate(SpotListingActivity.java:119)
01-11 15:47:04.413: E/AndroidRuntime(1479): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-11 15:47:04.413: E/AndroidRuntime(1479): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1722)
01-11 15:47:04.413: E/AndroidRuntime(1479): ... 11 more
我懷疑我升級到一起所需要升級的Maven 3.1.1 Android系統的Maven的插件v3.8.2引起了這個問題(而不是ABS本身)...所以我的問題是,我怎樣才能診斷什麼是錯的?有趣的是,當調試導致問題ActionBarSherlockCompat#generateLayout
的代碼部分時,佈局可以正確找到,但底層ID不是,查看下面的內聯註釋;
對這個id的子視圖唯一不正常的是它有下面的命名空間;
com.actionbarsherlock.internal.nineoldandroids.widget.NineFrameLayout
任何幫助讓我的構建回薑餅設備工作最受讚賞。對於SDK 14+艦隊,這是我最後一次發佈給薑餅。先謝謝你。
更新:我已經確認這是升級到Maven的Android的插件在v3.8.2的直接影響(以及相應的Maven 3.1.1升級)。
謝謝Manfred。當v3.8.3發佈並提供更新時,我會回到這裏。在此期間,我已降級...對我來說沒有太大的影響,因爲3.8.1版本對我來說都是好的。 – OceanLife