У меня есть маленький Ionic Android, который работал очень хорошо.После обновления до Android 7.1 SDK я получаю следующую ошибку при запуске cordova run --target=emulator-5554 android --verbose
:
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl444999769.tmp/base.apk (at Binary XML file line #103): <provider> has empty authorities attribute]
Это строка 103 из platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml
:
<provider
android:name="com.marianhello.bgloc.sync.DummyContentProvider"
android:authorities="@string/content_authority"
android:exported="false"
android:syncable="true" />
Мне кажется, что атрибут полномочий определен, но в некоторых онлайн-примерах я вижу, что там есть имя приложения, а вместо этого у меня @string/content_authority
.К сожалению, редактирование AndroidManifest.xml
ничего не стоит, поскольку оно генерируется.
Package.json:
{
"name": "travellogapp",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"start": "ionic-app-scripts serve",
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint"
},
"dependencies": {
"@angular/animations": "5.2.11",
"@angular/common": "5.2.11",
"@angular/compiler": "5.2.11",
"@angular/compiler-cli": "5.2.11",
"@angular/core": "5.2.11",
"@angular/forms": "5.2.11",
"@angular/http": "^6.1.10",
"@angular/platform-browser": "5.2.11",
"@angular/platform-browser-dynamic": "5.2.11",
"@ionic-native/background-geolocation": "^4.15.0",
"@ionic-native/core": "^4.15.0",
"@ionic-native/geolocation": "^4.15.0",
"@ionic-native/google-maps": "^4.14.0",
"@ionic-native/splash-screen": "~4.15.0",
"@ionic-native/status-bar": "~4.15.0",
"@ionic/storage": "2.2.0",
"cordova-android": "^7.1.1",
"cordova-android-play-services-gradle-release": "^1.4.4",
"cordova-browser": "^5.0.4",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-geolocation": "^4.0.1",
"cordova-plugin-googlemaps": "^2.4.6",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^2.2.0",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"rxjs": "5.5.11",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@ionic/app-scripts": "^3.2.0",
"typescript": "~2.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-mauron85-background-geolocation": {
"ICON": "@mipmap/icon",
"SMALL_ICON": "@mipmap/icon",
"ACCOUNT_NAME": "@string/app_name",
"ACCOUNT_LABEL": "@string/app_name",
"ACCOUNT_TYPE": ".account",
"CONTENT_AUTHORITY": "",
"GOOGLE_PLAY_SERVICES_VERSION": "11+",
"ANDROID_SUPPORT_LIBRARY_VERSION": "23+"
},
"cordova-android-play-services-gradle-release": {
"PLAY_SERVICES_VERSION": "15.+"
},
"cordova-plugin-geolocation": {},
"cordova-plugin-googlemaps": {
"API_KEY_FOR_ANDROID": "AIzaSyCplUKcqiMjv8-OJHQu1yoCmm0uK_rEtrA",
"API_KEY_FOR_IOS": "AIzaSyCplUKcqiMjv8-OJHQu1yoCmm0uK_rEtrA",
"PLAY_SERVICES_VERSION": "15.0.1",
"ANDROID_SUPPORT_V4_VERSION": "27.+"
}
},
"platforms": [
"browser",
"android"
]
}
}