Java文件:
java.lang.IllegalArgumentException:找不到配置的root 包含 /storage/emulated/0/Android/data/com.chandan.halo/files/Pictures/JPEG_20170216_233855_-96483920.jpg
行中的错误Uri photouURI = ......
BigInteger::BigInteger(std::string str) {
m_digitCount = str.length();
m_sizeReserved = m_digitCount;
m_number = new std::uint8_t[m_sizeReserved];
std::uint8_t* aArray = new std::uint8_t[m_sizeReserved];
int j = str.length()-1;
for(int i=0; i < m_digitCount; i++, j--) {
aArray[i] = str[j]-'0';
}
for(int i=0; i < m_digitCount; i++) {
m_number[i] = aArray[i];
}
delete[] aArray;
}
file_paths.xml
if (photoFile != null) {
Uri photoURI = FileProvider.getUriForFile(this,
"com.chandan.halo.fileprovider",
photoFile);
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);
startActivityForResult(takePictureIntent, 300);
}
的manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="my_images" path="Android/data/com.chandan.halo/Pictures" />
<!--<external-cache-path name="name" path="path" />-->
</paths>
答案 0 :(得分:1)
替换:
<external-path name="my_images" path="Android/data/com.chandan.halo/Pictures" />
使用:
<external-files-path name="my_images" path="Pictures" />