You cannot start a load on a not yet attached View or a Fragment ...
專案app出現標題上的錯誤,定位到程式碼中的這句:
Glide.with(getContext()).load(hairdresserDetail.getHead_photo())
.into((CircleImageView) newsHeader.findViewById(R.id.head_photo));
Glide載入圖片報錯?百度下,還真有類似的情況,詳解請看如下連結
https://blog.csdn.net/loners_/article/details/73521968
看了上面博主的文章分析,可能是activity被銷燬,而getContext()傳入了空值導致的。加上以下判斷
if(getContext()!=null){
Glide.with(getContext()).load(hairdresserDetail.getHead_photo())
.into((CircleImageView) newsHeader.findViewById(R.id.head_photo));
}
再測未復現標題所示的錯誤。
相關推薦
You cannot start a load on a not yet attached View or a Fragment ...
專案app出現標題上的錯誤,定位到程式碼中的這句: Glide.with(getContext()).load(hairdresserDetail.getHead_photo()) .into((CircleImageView) newsHeader.fi
Glide-You cannot start a load for a destroyed activity
場景: 在獲取本地相簿的時候,載入大量資料,開啟介面,然後很快finish介面,就會出現You cannot start a load for a destroyed activity,因為finish的時候,圖片還沒有被夾在完,Glide.with(mContext).load(bitmapL
RecyclerView在Fragment Activity切換報錯You cannot start a load for a destroyed activity
java.lang.IllegalArgumentException: You cannot start a load for a destroyed activity BottomNavigationView中Fragment切換或者各種Activity切換的時候(這些Activity,F
Glide錯誤java.lang.IllegalArgumentException: You cannot start a load for a destr
解決辦法 在使用Glide的那段程式碼加是否在主執行緒判斷 if(Util.isOnMainThread()) { Glide.with(ClassifyItemDetailActivity.this).lo
android 在佈局檔案中報錯:This text field does not specify an inputType or a hint
在安卓專案開發中,在設計專案樣式使用到EditText這個標籤時,有的時候會有警告:This text field does not specify an inputType ora hint 原因是: EditText需要指定預設輸入型別 在標籤中加入android:inpu
IDEA:Cannot start compiler:the SDK is not specified for module...錯誤修復
IDEA出現報錯 解決方法: 一、在Project Structure中選擇SDKs,點選右側的+號 二、選擇JDK,後找到JDK的安裝位置,點選應用。 三、在Project中的Project SDK中選擇剛剛新增的JDK,點選應用 問題解決
java.sql.SQLException: QueryRunner requires a DataSource to be invoked in this way, or a Connection
我在使用org.apache.commons.dbutils和c3p0操作資料庫時,報的錯,翻譯過來就是: QueryRunner需要以這種方式呼叫資料來源,或者需要傳遞連線 排查: 1、是否有資料來源,即是否正常載入c3p0-config.xml檔案。 2、資料
Glide異常:You cannot load start a load for a destory activity
使用glide載入圖片,在一個Activity中使用了glide載入圖片後,首次進入頁面顯示正常,退出二次進入崩潰,直接報引數異常:You cannot start a load for on a destory activity。g
hue整合hadoop發生問題:Cannot access: /user/hue. Note: you are a Hue admin but not a HDFS superuser, "hadoo
1.問題描述 當進入hue介面,點選File Browser,然後報錯403: Cannot access: /user/hue. Note: you are a Hue admin but not a HDFS superuser, "hadoop" or part of HDFS sup
cdh Cannot access: user/hive/warehouse. Note: you are a Hue admin but not a HDFS
Cannot access: user/hive/warehouse. Note: you are a Hue admin but not a HDFS hue中建立角色的時候,選擇url的時候,用的
Error:Cannot start process, the path specified for working directory is not a directory
If I open one file such as "hw3_prob4Sol.py", the code can run. However, there is an error: Cannot start process, the path specified for working direc
Failed to load resource: the server responded with a status of 404 (Not Found)
PE nbsp ava col AI div short rtc not Failed to load resource: the server responded with a status of 404 (Not Found) 報錯情況:圖標加載失敗 原因分析:路徑錯誤
You cannot push a "root" repository.
push a[root@docker1 ~]# docker push sshd:centosError response from daemon: You cannot push a "root" repository. Please rename your repository to
WebService客戶端出現A WebService annotation is not present on class: com.java1234.service.IUserService
去客戶端找你的類,注意看報錯 加上WebService註解 即可 附上webService建立過程 1.分別建立兩個專案,右鍵web service 2.webserviceClient 直接啟動 服務端 訪問wsdl即可 packa
Cannot get Jedis connection,Could not get a resource from the pool,DENIED Redis is running in protec
一個新專案使用redis做純快取,在本機中無障礙使用,redis放到伺服器就出現上面的錯誤。 折騰了小一天排查各種可能性終於解決問題。最後不使用任何框架直接使用jedis 才發現問題的根本是redis開啟了保護模式。 解決如下:連線redis客戶端,使用命令 127.0.0.1:63
實際開發中String轉換為json串作為入參發生"JSON parse error:Cannot deserialize value of type Date......not a valid解決
實際開發中,String拼接成json串作為入參請求介面,發生以下錯誤 { "timestamp": "2018-11-09 14:55:49", "status": 400, "error": "Bad R
雙擊Eclipse提示“The default workspace “xxxx” is in use or cannot be created Please choose a different on
原因 出現這種情況一般是workspace的配置檔案中出現了.lock檔案(workspace/.metadata/.lock),鎖定了workspace。 解決 把.lock檔案刪除即可。 如果該檔案不能刪除,可能是因為javaw.exe程序未結束,結束該程序及eclipse
redis遠端連線異常:Cannot get Jedis connection/Could not get a resource from the pool
如果是遠端連線redis,多數情況下是沒有禁用127.0.0.1 redis預設是隻允許本機訪問的,需要在redis.conf配置檔案將127.0.0.1給禁用掉,註釋掉即可。允許外部訪問 redis還有個保護模式,預設為yes 改為no, protected-mod
java.lang.IllegalArgumentException: Called attach on a child which is not detached: ViewHolder
轉載請標明出處,維權必究:https://www.cnblogs.com/tangZH/p/10116298.html 在專案過程中出現了上述錯誤。 會出現這樣的錯誤是在我使用: notifyItemRemoved(position); notifyItemRangeChanged(pos
Original error: Failed to start Chromedriver session: A new session could not be created.
chrome與driver對應關係(轉):https://blog.csdn.net/huilan_same/article/details/51896672 driver下載: https://github.com/appium/appium/blob/master/docs/e