錯誤集錄

 

android啓動activity報android.content.res.Resources$NotFoundException: String resource ID #0x0的錯誤。

出現在:有兩個子Fragment繼承於BaseFragment ,所以兩個子Fragment裏覆寫的方法涉及到佈局的方法都要寫。。(網上很多都說是String類型與其他類型不符還有可能是R.id與R.layout用錯了)

出現No Debuggable Processes要在Tools/Android/Enable ADB integration 打鉤
然後在app/build.gradle下添加 如圖:

(retrofit-get請求-
@GET("product.do?productListByHitCount") //value值

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setImageDrawable(android.graphics.drawable.Drawable)' on a null object reference
錯誤出現de位置

java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
                                                                     at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
數組越界,異常信息是從空數組中取數據

SrollView只能有一個子佈局

Retrofit在 url出錯的時候會出現404(so 要細心)

addView(mEmptyPage);
addView重疊會出現錯誤:The specified child already has a parent. You must call removeView() on the

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章