Path requests must specify a user by using UserEnvironment
来源:互联网 发布:淘宝回复差评专业术语 编辑:程序博客网 时间:2024/05/29 08:56
String is = Environment.getExternalStorageState();
if (is.equals("mounted")) {
File sdRoot = null;
try {
Class<?> environmentcls = Class.forName("android.os.Environment");
Method setUserRequiredM = environmentcls.getMethod("setUserRequired", boolean.class);
setUserRequiredM.invoke(null, false);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
sdRoot = Environment.getExternalStorageDirectory();
}
}
if (is.equals("mounted")) {
File sdRoot = null;
//Environment.setUserRequired(false);
try {
Class<?> environmentcls = Class.forName("android.os.Environment");
Method setUserRequiredM = environmentcls.getMethod("setUserRequired", boolean.class);
setUserRequiredM.invoke(null, false);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
sdRoot = Environment.getExternalStorageDirectory();
}
}
0 0
- Path requests must specify a user by using UserEnvironment
- Caused by: java.lang.IllegalArgumentException: you must specify a way to create the tab indicator.
- CentOS安装Chrome及Please start Google Chrome as a normal user. To run as root, you must specify an ...
- Caused by: org.hibernate.MappingException: must specify an identifier type:
- you must specify a way to create the tab indicator.
- 122 The user SYS creates a job by using the following command: BEGIN DBMS_SCHEDULER.CREATE_JOB ( job
- 异常:Caused by: org.hibernate.MappingException: must specify an identifier type:
- android Caused by: java.lang.IllegalArgumentException: Binary XML file line #7: Must specify unique
- Caused by: java.lang.IllegalArgumentException: Binary XML file line #7: Must specify unique android
- Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal
- ValueError: cannot index a corpus with zero features (you must specify either `num_features` or a no
- Filter mapping must specify either a <url-pattern> or a <servlet-name>问题的处理
- Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal
- a new client --- using httpclient or curl or requests
- SharePoint 2010 Error: You must specify a value for this required field
- you must specify a host type if you use `--no-verify'
- Configuration problem: <property> element for property 'articleService' must specify a ref or value
- java.lang.IllegalArgumentException: you must specify a way to create the tab content
- ios实现基于socket tcp/ip的通讯
- 【转】COMMIT后恢复
- C语言自加自减的问题
- 读JavaScript语言精粹后部分知识的总结
- Spring MVC漏洞学习总结
- Path requests must specify a user by using UserEnvironment
- sed 使用
- freemarker学习笔记---assign标签
- LitJson 的使用
- HTTP 协议实现
- NOIP提高组2003 神经网络
- Linux下查看PCI-E插槽信息的方法【转载】
- Android应用从后台切换到前台因为数据被GC报异常
- 添加图片水印