2.3.2 Android版本编译不通过

  • Creator 版本:

  • 目标平台: Android

  • 详细报错信息,包含调用堆栈:

  • 重现方式:新建工程,Android编译。

  • 之前哪个版本是正常的 :2.2.1

  • 手机型号 :

  • 手机浏览器 :

  • 编辑器操作系统 :

  • 编辑器之前是否有其它报错 :

  • 出现概率:必现

  • 额外线索:

error: error opening ‘C:/helloworld/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/cocos2dx_static/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.o.d’: No such file or directory

但是这个文件是存在的。两个机器都试了,还是报错。

1赞

前面有个警告,不知道有没有关系:
Build cocos2djs x86
Android NDK: WARNING: Unsupported source file extensions in C:\helloworld\build\jsb-default\frameworks\cocos2d-x/cocos/Android.mk for module cocos2dx_static

发现具体的问题了:
工程会编译两次,第一次:

Task :game:externalNativeBuildDebug
Build cocos2djs ${ABI}
Android NDK: WARNING: Unsupported source file extensions in C:\helloworld\build\jsb-default\frameworks\cocos2d-x/cocos/Android.mk for module cocos2dx_static

这个任务是不会失败的。但是下面这个会失败:

Task :game:externalNativeBuildDebugFeature

报错就是上面那个。我自己的NDK项目是没问题的。官方留意一下。

A simpler experience for instant apps
09 April 2019
Posted by Miguel Montemayor and Diana García Ríos

As of Android Gradle plugin 3.4.0 (included in Android Studio 3.4), we are starting the deprecation process of the feature plugin (com.android.feature) and instant app plugin (com.android.instantapp) as a way to build your instant app. When building your app, you will receive a warning flagging com.android.feature as deprecated. If you have an existing instant app built with the feature plugin, migrate your existing app to an instant-enabled app bundle as soon as possible.

这个报错是文件路径长度问题导致的

3赞

我也碰到了,升级ndk之后解决了,你试试

1赞

解决了。谢谢。