creator打包APK提交Goolgle Play失败,提示API等级最低26,怎么办

cocoscreator版本2.0.5,studio版本3.2.1,proj.android-studio下的build.gradle版本3.0.0,打包Android时选择的ndk版本r16,API Level 19,真机测试都没什么问题,但是打出包上传谷歌提示上传失败,提示版本太低,如图:



至少要求API级别到26,但是如果选择API Level 26编译就直接失败了,出错如下:
Shutdown finished in 62ms
:libcocos2dx:verifyReleaseResources FAILED
:libcocos2dx:verifyReleaseResources (Thread[Task worker for ‘:’ Thread 3,5,main]) completed. Took 0.226 secs.
:libcocos2dx:platformAttrExtractor (Thread[Task worker for ‘:’,5,main]) completed. Took 0.414 secs.
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= main.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= AppDelegate.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= jsb_module_register.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= SDKManager.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= jsb_anysdk_basic_conversions.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= manualanysdkbindings.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= jsb_anysdk_protocols_auto.cpp
[armeabi-v7a] SharedLibrary : libcocos2djs.so
externalNativeBuildRelease: check expected build outputs
externalNativeBuildRelease: build complete
:EatGame:externalNativeBuildRelease (Thread[Daemon worker Thread 5,5,main]) completed. Took 22.196 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:libcocos2dx:verifyReleaseResources’.

java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

现在不知道改怎么配置了,求救下!!!

1赞

android studio 打开,修改该文件的这个值。

按照你这个设置27,17,17,27来改么?编译的时候API level选择多少呢?

17换成26,你的问题改这些配置可以解决。

参考文档:发布到 Google Play Instant
编译的时候 API level 选择 android-26 及以上。

cc.Node.EventType.TOUCH_MOVE得到的event.currentTarget 一直是同一个对象 不对吧?

gradle.properties文件已修改成如下参数,编译打包的时候的参数已修改成API LEVEL 26,其他配置没变

Android SDK version that will be used as the compile project

PROP_COMPILE_SDK_VERSION=26

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

PROP_MIN_SDK_VERSION=26

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

PROP_TARGET_SDK_VERSION=26

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

PROP_BUILD_TOOLS_VERSION=27.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

编译最后还是报同样的错误Unable do incremental execution: full task run
:libcocos2dx:mergeReleaseResources (Thread[Task worker for ‘:’,5,main]) completed. Took 0.092 secs.
:libcocos2dx:verifyReleaseResources (Thread[Task worker for ‘:’,5,main]) started.
:libcocos2dx:verifyReleaseResources
Putting task artifact state for task ‘:libcocos2dx:verifyReleaseResources’ into context took 0.0 secs.
Executing task ‘:libcocos2dx:verifyReleaseResources’ (up-to-date check took 0.002 secs) due to:
Input property ‘manifestFiles’ file E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml has changed.
Aapt2QueuedResourceProcessor is using D:\eclipse\android_sdk_new\build-tools\27.0.3\aapt2.exe

Trying to start D:\eclipse\android_sdk_new\build-tools\27.0.3\aapt2.exe
Trying to start D:\eclipse\android_sdk_new\build-tools\27.0.3\aapt2.exe
Trying to start D:\eclipse\android_sdk_new\build-tools\27.0.3\aapt2.exe
Trying to start D:\eclipse\android_sdk_new\build-tools\27.0.3\aapt2.exe
Started 2111878048
Started 1826547785
Started 1550935415
Started 805199466
Slave 805199466 is ready
Slave 1826547785 is ready
Slave 2111878048 is ready
Slave 1550935415 is ready
AAPT2 processed(805199466) AndroidManifest.xml job:QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@2139b5e5}
AAPT1 err(Facade for 805199466): error: invalid file path ‘E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml’. -> QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@2139b5e5}
AAPT warning(599767669), Job(QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@2139b5e5}): error: invalid file path ‘E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml’.
AAPT1 err(Facade for 805199466): Error -> QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@2139b5e5}
AAPT warning(599767669), Job(QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@2139b5e5}): Error
AAPT1 err(Facade for 805199466): Done -> QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@2139b5e5}
error: invalid file path ‘E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml’.

AAPT warning(599767669), Job(QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@2139b5e5}): Done
Exception while processing job : QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=E:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@2139b5e5} : com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Process (2111878048) processed 0 files
Thread(queued-resource-processor_2): Process(2111878048), after shutdown queue_size=3
Process (805199466) processed 1 files
Thread(queued-resource-processor_1): Process(805199466), after shutdown queue_size=2
Process (1550935415) processed 0 files
Thread(queued-resource-processor_4): Process(1550935415), after shutdown queue_size=1
Process (1826547785) processed 0 files
Thread(queued-resource-processor_3): Process(1826547785), after shutdown queue_size=0
Shutdown finished in 185ms
:libcocos2dx:verifyReleaseResources FAILED
:libcocos2dx:verifyReleaseResources (Thread[Task worker for ‘:’,5,main]) completed. Took 2.443 secs.
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= main.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= AppDelegate.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= jsb_module_register.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= SDKManager.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= jsb_anysdk_basic_conversions.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= manualanysdkbindings.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= jsb_anysdk_protocols_auto.cpp
[armeabi-v7a] SharedLibrary : libcocos2djs.so
externalNativeBuildRelease: check expected build outputs
externalNativeBuildRelease: build complete
:EatGame:externalNativeBuildRelease (Thread[Task worker for ‘:’ Thread 3,5,main]) completed. Took 57.702 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:libcocos2dx:verifyReleaseResources’.

java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 1s
38 actionable tasks: 8 executed, 30 up-to-date
执行命令出错,返回值:1。

查看一下log

建议在android studio里面clean下工程再rebuild。或者删除工程(记得做好改动的备份),再从构建发布面板选择level26之后重现构建工程。

1赞

参考 https://forum.cocos.com/t/play-8-api-level-26/60501/11?u=leda

按照 Google 的建议,应该改成 28/16/28,构建时选最高的 API Level > 26

这个问题是资源冲突,可以按楼上的说法进行新的构建,避免之前的干扰。

1赞