2017-07-08 65 views
0

我正在使用畢加索圖書館更新資料圖片。我得到以下問題

android.content.res.Resources$NotFoundException: Resource "com.adamas.selfiereporter:id/profile_picture" (7f100176) is not a Drawable (color or path): TypedValue{t=0x12/d=0x0 a=2 r=0x7f100176} 

這是畢加索對象

Picasso.with(getContext()) 
           .load(profileImageUrl) 
           .placeholder(R.id.profile_picture) 
           .transform(new PicassoRoundedTransformation()) 
           .fit() 
           .noFade() 
           .into(personImagee); 

.into(personImagee); 
越來越問題

請別人幫我

+0

問題就在這裏'.placeholder(R.id.profile_picture)' –

+0

自我解釋的錯誤消息的... ID資源值'不是可繪製的(顏色或路徑)' –

回答

1

你傳入ID的佔位符,你必須在那裏傳遞一個drawable。

Picasso.with(getContext()) 
     .load(profileImageUrl) 
     .placeholder(R.drawable.profile_picture) 
     .transform(new PicassoRoundedTransformation()) 
     .fit() 
     .noFade() 
     .into(personImagee); 
+0

請提供我的代碼 – basha

+0

立即檢查@Basha – krishan

+0

您必須在資源文件夾中添加一個名爲profile_picture的drawable。 – krishan

0

把你profile_picture.png到drawble文件夾,然後 改變這一行.placeholder(R.id.profile_picture).placeholder(R.drawable.profile_picture)

相關問題