筆記和源碼
https://blog.csdn.net/qq_45453266/article/details/104490971
https://github.com/wantao666/AndroidDemo/tree/master/DownloadDemo
https://blog.csdn.net/qq_45453266/article/details/104490971
https://github.com/wantao666/AndroidDemo/tree/master/DownloadDemo
2020-02-25
筆記和源碼
https://blog.csdn.net/qq_45453266/article/details/104490971
https://github.com/wantao666/AndroidDemo/tree/master/DownloadDemo
https://blog.csdn.net/qq_45453266/article/details/104490971
https://github.com/wantao666/AndroidDemo/tree/master/DownloadDemo
運(yùn)行報(bào)錯(cuò):NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getAction()' on a null object reference
2018-05-16
if(conn.getResponseCode() ==HttpURLConnection.HTTP_OK){
length=conn.getContentLength();
}
這一步的時(shí)候可能沒(méi)有那個(gè)HttpStatu.ok 用上面的就可以了
length=conn.getContentLength();
}
這一步的時(shí)候可能沒(méi)有那個(gè)HttpStatu.ok 用上面的就可以了
那個(gè)ThreadInfo感覺(jué)完全沒(méi)有用處,而且更新進(jìn)度可以通過(guò)接口來(lái)處理
2017-09-12
看到樓下各種吐槽老師程序的問(wèn)題。我想說(shuō)說(shuō)我的感受吧。的確,老師的代碼中是有很多隱藏的BUG,不過(guò)老師最后一句也說(shuō)了,他現(xiàn)在不想去優(yōu)化了(可能為了趕時(shí)間吧)。作為學(xué)生的我們,要抱著“學(xué)而思”的態(tài)度,如果你掌握了老師的所傳授的方法,解決和優(yōu)化老師所講的代碼完全沒(méi)問(wèn)題。少一些吐槽,多一點(diǎn)談?wù)勛约簩?duì)代碼的優(yōu)化和見(jiàn)解,才是端正的學(xué)習(xí)態(tài)度吧。以上純屬個(gè)人見(jiàn)解,不喜勿噴,謝謝。
2017-06-27