Variable 'uriUri' initializer 'Uri.parse(uri)' is redundant
时间: 2023-09-12 15:05:21 浏览: 76
这个警告是因为你在定义变量 `uriUri` 时,使用了 `Uri.parse(uri)` 进行初始化。但是在后面的代码中,你并没有使用 `uriUri` 变量,而是直接使用了 `Uri.parse(uri)`,所以编译器认为这个变量的初始化是多余的。为了消除这个警告,你可以直接使用 `Uri.parse(uri)`,不需要定义一个多余的变量。如果你确实需要使用 `uriUri` 变量,那么可以在后面的代码中使用它,这样就不会出现这个警告了。
相关推荐
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![py](https://img-home.csdnimg.cn/images/20210720083646.png)