问题描述
Hello Guys,当我在我的应用程序中附加模拟器中的任何内容时出现错误,所以我得到了这个错误抱歉,授予存储权限第一次!
拜托,伙计们,帮助我。谢谢
我尝试过:
public void onActivityResult(int requestCode,int resultCode ,意图意图){
super.onActivityResult(requestCode,resultCode,intent);
try {
Uri mImageCaptureUri = intent.getData() ;
String filePath = PathUtil.getPath(this,mImageCaptureUri);
file = new File(filePath);
imageView =(ImageView) findViewById(R.id.your_image);
imageView.setImageURI(mImageCaptureUri);
attachment = 1;
Log.e(URI文件,mImageCaptureUri +);
} catch(例外e){
Toast.makeText(MainActivity.this,抱歉,Grant Storag e权限FIrst!,Toast.LENGTH_SHORT)。show();
Log.e(异常解码,e +);
}
}
Hello Guys, am getting an error when I attach anything from emulator in my app so am getting this error sorry, Grant Storage Permissions FIrst!
please, guys, help me.Thanks
What I have tried:
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
try {
Uri mImageCaptureUri = intent.getData();
String filePath = PathUtil.getPath(this,mImageCaptureUri);
file = new File(filePath);
imageView = (ImageView) findViewById(R.id.your_image);
imageView.setImageURI(mImageCaptureUri);
attachment = 1;
Log.e("URI File" , mImageCaptureUri+"");
} catch (Exception e) {
Toast.makeText(MainActivity.this, "Sorry, Grant Storage Permissions FIrst !", Toast.LENGTH_SHORT).show();
Log.e("Exception Decode" , e + "");
}
}
推荐答案
这篇关于当我在我的应用程序中的attachement按钮时,我收到一些错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!