2016-07-11 44 views
-1

這是我的代碼Android的畢加索不工作

Picasso.with(getActivity()) 
        .load("https://dev.tfic.aviation.go.th/timthumb/?src=%2Fcontents%2Ftravel%2Fkrabi%2F190556-travel-02-03-mayha.jpg&w=684&h=342") 
        .placeholder(R.mipmap.placeholder) 
        .error(R.mipmap.placeholder)      
        .into(img); 
+0

你在清單中添加Internet權限? – Blackbelt

+0

在manifest.xml中檢查您的互聯網權限 –

+0

是您的連接徹底的商業WIFI? –

回答

0

檢查。

AndroidManifest.xml中

<uses-permission android:name="android.permission.INTERNET"/> 

在java中,

Picasso.with(this) 
.load("YOUR IMAGE URL HERE") 
.placeholder(Your Drawable Resource) //this is optional the image to display while the url image is downloading 
.error(Your Drawable Resource)   //this is also optional if some error has occurred in downloading the image this image would be displayed 
.into(imageView); 

這可能有助於你