我已经创建了我创建本机项目的.apk。它在Android 5和6版本设备中工作正常。它在设备的更高版本中失败。
我使用以下链接来创建签名的APK文件。
https://facebook.github.io/react-native/docs/signed-apk-android#docsNav
当我使用React-Native Run Android在更高版本的设备中安装了React-native项目时,它的工作正常。但是,如果.apk失败。
您能帮我解决这个问题吗
我的package.json文件是
{
"name": "awsUpload",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"aws-sdk": "^2.395.0",
"link": "^0.1.5",
"react": "16.6.3",
"react-native": "^0.58.3",
"react-native-aws3": "0.0.8",
"react-native-device-info": "^0.26.2",
"react-native-fetch-blob": "^0.10.8",
"react-native-file-upload": "^1.0.4",
"react-native-image-picker": "^0.28.0",
"react-native-material-dropdown": "^0.11.1",
"react-native-navigator": "^0.4.2",
"react-native-router-flux": "^4.0.6",
"react-navigator": "0.0.0-0",
"uniqid": "^5.0.3"
},
"devDependencies": {
"babel-core": "7.0.0-bridge.0",
"babel-jest": "24.0.0",
"jest": "24.0.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
在日志中,它给出以下错误,
Failed to get property persist.sys.media.traces
java.lang.IllegalStateException: Handler (android.os.Handler) {e12e3b3} sending message to a Handler on a dead thread
i使用一组代码来获取设备位置。在由于安全原因引起的更高版本的Android设备中,它不允许我的应用程序获取它。我通过引用以下链接来添加Android设备的权限。
链接是
https://stackoverflow.com/questions/45822318/how-do-i-request-permission-for-android-device-location-in-react-native-at-run-t