[問題] 我遇到了一個在V19遇到的crash~

作者: freedom74569   2016-07-14 00:15:21
在V19 SAMSUNG NOTE2遇到了一個問題,不過在以上的版本S5,S6,S7就沒有問題
Error log 是這樣子的:
Caused by: android.content.res.Resources$NotFoundException:
Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f02004c a=-1 r=0x7f02004c}
at android.content.res.Resources.loadDrawable(Resources.java:3394)
at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
我有上網爬一些solution:
就是可以改一下我的一些圖片資源的地方,試過了還是不行。
不過改了values-19的styles,在values-21就長得一樣沒有加上parent:
<style name="AppTheme.NoActionBar" 加了->parent="android:Theme" >
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
他的Error log 就改變成:
Binary XML file line #14: You must supply a layout_height attribute.
然後又去找了這個問題的一些solution就找了哪邊沒有加入layout_height,
或是檢查xml檔的寫法,目前是沒有問題的。
就是在4.4.2以上的版本目前是可以正常run的,所以真的debug de不到,
所以冒昧上來版上問問,有沒有人遇到同樣問題有解決的。
作者: marfha   2016-07-14 00:46:00
如果有code會比較好,不然光看error log只能用猜的

Links booklink

Contact Us: admin [ a t ] ucptt.com