小编Jon*_*Net的帖子

通过ClipData.Item.getUri暴露在app之外

嗨我想在android文件系统中添加新功能后修复问题,但是我收到此错误:

android.os.FileUriExposedException:file:///storage/emulated/0/MyApp/Camera_20180105_172234.jpg通过ClipData.Item.getUri()暴露在app之外

所以我希望有人可以帮我解决这个问题:)

谢谢

android.os.FileUriExposedException: file:///storage/emulated/0/MyApp/Camera_20180105_172234.jpg exposed beyond app through ClipData.Item.getUri()
Run Code Online (Sandbox Code Playgroud)

java android

77
推荐指数
2
解决办法
5万
查看次数

检查/ etc/hosts中是否存在IP

我正在尝试创建一个.sh脚本,检查/ etc/hosts中是否存在某些类似"teamspeak.com"的IP /域,如果没有,那么我想在hosts文件中添加一些东西.

现在我正在尝试这个:

if ! grep -q "teamspeak.com == teamspeak.com" /etc/hosts; then
    echo "Exists"
else
    echo "Add to etc host ting here" >> /etc/hosts;

fi
Run Code Online (Sandbox Code Playgroud)

linux bash sh synology

6
推荐指数
1
解决办法
2633
查看次数

标签 统计

android ×1

bash ×1

java ×1

linux ×1

sh ×1

synology ×1