嗨,朋友,我在Expo上制作了一个APK,并做出了反应,在导出所有工作之前都做出了反应,但之后在APK中却无法工作……无论是安装时,还是在应用程序中,我的app.JSON中都有这个
{
"expo": {
"name": "Petra",
"slug": "Petra",
"privacy": "public",
"sdkVersion": "35.0.0",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"package": "com.petra.petraseguridad",
"versionCode": 1,
"icon":"./assets/icon.png",
"permissions": [
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE",
"CAMERA",
"ACCESS_FINE_LOCATION"
],
"googleServicesFile": "./google-services.json",
"config": {
"googleMaps": {
"apiKey": "AIzaSyDw1OkOB0-g3BqJXjxi5NFYmWQoB0FK_I0"
}
}
}
}
}
//my permission functions:
_getLocationAsync = async () => {
let { status } = await Permissions.askAsync(Permissions.LOCATION);
if (status !== 'granted') {
this.setState({
errorMessage: 'Para Acceder a la función de panico es necesario saber tu ubicación',
});
}else {
let location = await Location.getCurrentPositionAsync({});
let latitud = parseFloat( location.coords.latitude )
let longitud = parseFloat( location.coords.longitude )
this.setState({ latitude : latitud, longitude : longitud});
}
};
没有错误消息,什么也没有,此工作在博览会上运行 谢谢4阅读!