2.4.5打包sdk后安卓低版本不能安装BUG

  • Creator 版本: 2.4.5

  • 目标平台:

  • 重现方式:打包安卓打成apk包,

  • 首个报错: * What went wrong:
    Execution failed for task ‘:hello_world:processReleaseManifest’.

Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 28 declared in library [:libcocos2dx] Y:\Mysoftware\GameEngine\CoCosCreator\Creator\CocosCreator_2.4.5\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\merged_manifests\release\processReleaseManifest\merged\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project’s minSdk version to at least 28,
or use tools:overrideLibrary=“org.cocos2dx.lib” to force usage (may lead to runtime failures)

当把最小版本号从16改成28后可以打包,但是安卓版本较低的手机会解析包出错

  • 之前哪个版本是正常的: 2.4.4
  • 手机型号:
  • 手机浏览器:
  • 编辑器操作系统:
  • 重现概率:100%

此BUG在cocoscreator版本切回2.4.4后消失.

image 应该是这个里面的mincode设置太高了,你改下呗

我知道但最小版本改高了之后,有些低版本安卓就会安装失败,解析安装包失败

CocosCreator_2.4.5\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\merged_manifests\release\processReleaseManifest\merged\AndroidManifest.xml

直接改这个文件


28改成16

不行我改小后,一打包会自动调回去

gradle.properties,PROP_MIN_SDK_VERSION,PROP_TARGET_SDK_VERSION

使用2.4.5版本未解决,降到2.4.4版本正常

Android SDK version that will be used as the compile project

PROP_COMPILE_SDK_VERSION=30

Android SDK version that will be used as the earliest version of android this application can run on

PROP_MIN_SDK_VERSION=16

Android SDK version that will be used as the latest version of android this application has been tested on

PROP_TARGET_SDK_VERSION=30

Android Build Tools version that will be used as the compile project

PROP_BUILD_TOOLS_VERSION=28.0.3

List of CPU Archtexture to build that application with

Available architextures (armeabi-v7a | arm64-v8a | x86)

To build for multiple architexture, use the : between them

Example - PROP_APP_ABI=armeabi-v7a

PROP_APP_ABI=armeabi-v7a

将PROP_MIN_SDK_VERSION = 28可以打包,但低版本安卓会安装包解析失败