React native (Android)无法使用react native image marker从路径读取文件
Android:我无法获取路径上的文件,我使用的是最新的npm版本0.5.0 我的路径看起来像“文件:data/data/com.sampleproject/cache/727b3cdc-2ff1-4918-8a71-f00be535e4d9imagemarker.png” 缓存文件夹为空,即使没有隐藏的文件React native (Android)无法使用react native image marker从路径读取文件,react-native,React Native,Android:我无法获取路径上的文件,我使用的是最新的npm版本0.5.0 我的路径看起来像“文件:data/data/com.sampleproject/cache/727b3cdc-2ff1-4918-8a71-f00be535e4d9imagemarker.png” 缓存文件夹为空,即使没有隐藏的文件 markPosition() { //alert(this.state.signature); this.state.signature = Platfor
markPosition() {
//alert(this.state.signature);
this.state.signature =
Platform.OS === 'android'
? 'file://' + this.state.signature
: this.state.signature;
Marker.markText({
src: this.state.signature,
text: this.state.data,
position: 'bottomRight',
color: '#FF0000',
fontName: 'Arial-BoldItalicMT',
fontSize: 44,
scale: 1,
quality: 100,
markerScale: 1,
shadowStyle: {
dx: 10.5,
dy: 20.8,
radius: 20.9,
color: 'transparent',
},
textBackgroundStyle: {
paddingX: 10,
paddingY: 10,
color: 'transparent',
},
saveFormat: this.state.saveFormat,
})
.then(path => {
// alert('saved path');
console.log('path1241asdjaksdjakdqweqw', path);
this.setState(
{
signature: path,
},
() => {
if (this.state.signature !== null) {
// console.log('dsdsfs4234242', this.state.signature);
//Orientation.lockToPortrait();
const getSignatureValue = this.props.navigation.getParam(
'getSignature',
);
getSignatureValue(path);
// this.props.navigation.push('NALGSample', {
// signed: this.state.signature,
// });
Orientation.lockToPortrait();
this.props.navigation.pop();
}
},
);
})
.catch(err => {
console.log('====================================');
// alert(err + 'err');
});
}
环境
“反应本机”:“0.61.4”,
“react native image marker”:“^0.6.1”,与我的问题相同,您找到解决方案了吗?