我正在开发本机上的墙纸应用程序,并遇到此问题,但我不知道为什么得到它。我正确地安装了模块... 使用ManageWallpaper节点模块时出现错误。 这是代码:
_callback = res => {
console.log('Response: ', res);
};
_setWallpaper = () => {
console.log(images[brc]);
ManageWallpaper.setWallpaper(
{
uri:
'https://i.pinimg.com/originals/76/5e/1d/765e1dc8cb1cc115fb3b0b39a895fdeb.jpg',
},
this._callback,
ManageWallpaper.TYPE.HOME,
);
};
<View style={styles.barContainer}>{barArray}</View>
<View style={{zIndex: 2, position:'absolute', bottom: 0}}>
<Button title="Set as Wallpaper" color="blue" onPress={_setWallpaper}/>