红色部分一直提示Cannot cast from View to ProgressBar

 

原来是我命名类名跟调用的函数一样 起冲突了。

将ProgressBar类重新命名为ProgressBarTest  问题就解决了


 


OK  这样就行了。