世博许可在发布APK中不起作用

时间:2020-01-10 07:40:00

标签: android react-native react-native-android expo

嗨,朋友,我在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阅读!

0 个答案:

没有答案