
回复
@toc
安装系统应用Launcher时,出现如上问题,猜想是apiReleaseType的与系统不一致。
{"app" :{"apiReleaseType" : "Beta5","bundleName" : "com.ohos.launcher","distributedNotificationEnabled" : true,"icon" : "$media:app_icon","iconId" : 218103809,"label" : "$string:app_name","labelId" : 218103808,"minAPIVersion" : 9,"targetAPIVersion" : 9,"userDataClearable" : false,"vendor" : "ohos","versionCode" : 1000000,"versionName" : "1.0.0"},"module" :{"compileMode" : "jsbundle","deliveryWithInstall" : true,"description" : "$string:mainability_description","descriptionId" : 218103843,"deviceTypes" :["default","tablet"],"extensionAbilities" :[{"description" : "$string:mainability_description","descriptionId" : 218103843,"icon" : "$media:icon","iconId" : 218103857,"label" : "$string:entry_MainAbility","labelId" : 218103832,"name" : "com.ohos.launcher.MainAbility","priority" : 2,"skills" :[{"actions" :["action.system.home","com.ohos.action.main","action.form.publish"],"entities" :["entity.system.home","flag.home.intent.from.system"]}],"srcEntrance" : "./ets/MainAbility/MainAbility.ts","type" : "service","visible" : false}],"installationFree" : false,"mainElement" : "com.ohos.launcher.MainAbility","metadata" :[{"name" : "ArkTSPartialUpdate","value" : "true"}],"name" : "phone-launcher","pages" : "$profile:main_pages","requestPermissions" :[{"name" : "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"},{"name" : "ohos.permission.INSTALL_BUNDLE"},{"name" : "ohos.permission.LISTEN_BUNDLE_CHANGE"},{"name" : "ohos.permission.MANAGE_MISSIONS"},{"name" : "ohos.permission.REQUIRE_FORM"},{"name" : "ohos.permission.INPUT_MONITORING"},{"name" : "ohos.permission.NOTIFICATION_CONTROLLER"},{"name" : "ohos.permission.MANAGE_SECURE_SETTINGS"},{"name" : "ohos.permission.START_ABILITIES_FROM_BACKGROUND"}],"srcEntrance" : "./ets/Application/AbilityStage.ts","type" : "entry","uiSyntax" : "ets","virtualMachine" : "ark9.0.0.0"}}
其中最主要信息的是:“apiReleaseType” : “Beta5”;
{"summary":{"app":{"bundleName":"com.ohos.launcher","version":{"code":1000000,"name":"1.0.0"}},"modules":[{"mainAbility":"com.ohos.launcher.MainAbility","deviceType":["default","tablet"],"extensionAbilities":[{"name":"com.ohos.launcher.MainAbility"}],"distro":{"moduleType":"entry","installationFree":false,"deliveryWithInstall":true,"moduleName":"phone-launcher"},"apiVersion":{"compatible":9,"releaseType":"Release","target":9}}]},"packages":[{"deviceType":["default","tablet"],"moduleType":"entry","deliveryWithInstall":true,"name":"phone-launcher-default"}]}
其中重要信息为:“releaseType”:“Release”,说明先前修改的内容并没有起作用,查看设置中的sdk属性又已经更新为Beta5,最后重启应用并且新建Launcher项目,再次编译生成的pack.info文件更新了"releaseType":“Beta5”,再次安装成功!!