1.7.0 beta7版本,构建安卓项目binary模板异常

Executing tasks: [:hello_world:generateDebugSources, :hello_world:generateDebugAndroidTestSources, :hello_world:mockableAndroidJar, :hello_world:compileDebugAndroidTestSources, :hello_world:compileDebugUnitTestSources, :hello_world:compileDebugSources, :libcocos2dx:generateDebugSources, :libcocos2dx:generateDebugAndroidTestSources, :libcocos2dx:mockableAndroidJar, :libcocos2dx:compileDebugAndroidTestSources, :libcocos2dx:compileDebugUnitTestSources, :libcocos2dx:compileDebugSources]

Configuration on demand is an incubating feature.
Configuration ‘compile’ in project ‘:hello_world’ is deprecated. Use ‘implementation’ instead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
Configuration ‘compile’ in project ‘:libcocos2dx’ is deprecated. Use ‘implementation’ instead.
:hello_world:preBuild UP-TO-DATE
:libcocos2dx:preBuild UP-TO-DATE
:libcocos2dx:preDebugBuild UP-TO-DATE
:libcocos2dx:checkDebugManifest UP-TO-DATE
:libcocos2dx:processDebugManifest UP-TO-DATE
:hello_world:preDebugBuild UP-TO-DATE
:libcocos2dx:compileDebugAidl UP-TO-DATE
:hello_world:compileDebugAidl UP-TO-DATE
:libcocos2dx:packageDebugRenderscript NO-SOURCE
:hello_world:compileDebugRenderscript UP-TO-DATE
:hello_world:checkDebugManifest UP-TO-DATE
:hello_world:generateDebugBuildConfig UP-TO-DATE
:hello_world:prepareLintJar UP-TO-DATE
:hello_world:generateDebugResValues UP-TO-DATE
:hello_world:generateDebugResources UP-TO-DATE
:libcocos2dx:compileDebugRenderscript UP-TO-DATE
:libcocos2dx:generateDebugResValues UP-TO-DATE
:libcocos2dx:generateDebugResources UP-TO-DATE
:libcocos2dx:packageDebugResources UP-TO-DATE
:hello_world:mergeDebugResources UP-TO-DATE
:hello_world:createDebugCompatibleScreenManifests UP-TO-DATE
:hello_world:processDebugManifest UP-TO-DATE
:hello_world:splitsDiscoveryTaskDebug UP-TO-DATE
:libcocos2dx:platformAttrExtractor UP-TO-DATE
:libcocos2dx:processDebugResources UP-TO-DATE
:hello_world:processDebugResources UP-TO-DATE
:hello_world:generateDebugSources UP-TO-DATE
:hello_world:preDebugAndroidTestBuild UP-TO-DATE
:hello_world:compileDebugAndroidTestAidl UP-TO-DATE
:hello_world:processDebugAndroidTestManifest UP-TO-DATE
:hello_world:compileDebugAndroidTestRenderscript UP-TO-DATE
:hello_world:generateDebugAndroidTestBuildConfig UP-TO-DATE
:hello_world:generateDebugAndroidTestResValues UP-TO-DATE
:hello_world:generateDebugAndroidTestResources UP-TO-DATE
:hello_world:mergeDebugAndroidTestResources UP-TO-DATE
:hello_world:splitsDiscoveryTaskDebugAndroidTest UP-TO-DATE
:hello_world:processDebugAndroidTestResources UP-TO-DATE
:hello_world:generateDebugAndroidTestSources UP-TO-DATE
:hello_world:mockableAndroidJar UP-TO-DATE
:libcocos2dx:generateDebugBuildConfig UP-TO-DATE
:libcocos2dx:prepareLintJar UP-TO-DATE
:libcocos2dx:generateDebugSources UP-TO-DATE
:libcocos2dx:javaPreCompileDebug UP-TO-DATE
:libcocos2dx:compileDebugJavaWithJavac UP-TO-DATE
:libcocos2dx:processDebugJavaRes NO-SOURCE
:libcocos2dx:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:hello_world:javaPreCompileDebug UP-TO-DATE
:hello_world:nativeLibsToJar UP-TO-DATE
:hello_world:compileDebugJavaWithJavac UP-TO-DATE
:hello_world:bundleAppClassesDebug UP-TO-DATE
:hello_world:javaPreCompileDebugAndroidTest UP-TO-DATE
:hello_world:compileDebugAndroidTestJavaWithJavac UP-TO-DATE
:hello_world:compileDebugAndroidTestSources UP-TO-DATE
:hello_world:preDebugUnitTestBuild UP-TO-DATE
:hello_world:javaPreCompileDebugUnitTest UP-TO-DATE
:hello_world:compileDebugUnitTestJavaWithJavac NO-SOURCE
:hello_world:processDebugJavaRes NO-SOURCE
:hello_world:processDebugUnitTestJavaRes NO-SOURCE
:hello_world:compileDebugUnitTestSources UP-TO-DATE
:hello_world:generateJsonModelDebug UP-TO-DATE
:hello_world:externalNativeBuildDebug
Build cocos2djs armeabi
[armeabi] SharedLibrary : libcocos2djs.so
C
:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionGrid3D.o):function cocos2d::Shaky3D::update(float): error: undefined reference to ‘rand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionGrid3D.o):function cocos2d::Shaky3D::update(float): error: undefined reference to ‘rand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionGrid3D.o):function cocos2d::Shaky3D::update(float): error: undefined reference to ‘rand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionTiledGrid.o):function cocos2d::ShakyTiles3D::update(float): error: undefined reference to ‘rand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionTiledGrid.o):function cocos2d::ShuffleTiles::startWithTarget(cocos2d::Node*): error: undefined reference to ‘srand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionTiledGrid.o):function cocos2d::TurnOffTiles::startWithTarget(cocos2d::Node*): error: undefined reference to ‘srand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCTMXXMLParser.o):function .LTHUNK4: error: undefined reference to ‘atof’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCTMXXMLParser.o):function .LTHUNK4: error: undefined reference to ‘atof’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCTMXXMLParser.o):function .LTHUNK4: error: undefined reference to ‘atof’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCTMXXMLParser.o):function .LTHUNK4: error: undefined reference
to ‘atof’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCConsole.o):function cocos2d::Console::commandTouchSubCommandTap(int, std::string const&): error: undefined reference to ‘srand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCConsole.o):function cocos2d::Console::commandTouchSubCommandSwipe(int, std::string const&): error: undefined reference to 'srand

collect2.exe: error: ld returned 1 exit status
make.exe: *** [F:/Cocos/android/1.7.0/ceshi/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/armeabi/libcocos2djs.so] Error 1
:hello_world:externalNativeBuildDebug FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:hello_world:externalNativeBuildDebug’.

Build command failed.
Error while executing process D:\androidSDK\cocosNdk\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=F:\Cocos\android\1.7.0\ceshi\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=F:\Cocos\android\1.7.0\ceshi\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=armeabi NDK_ALL_ABIS=armeabi NDK_DEBUG=1 APP_PLATFORM=android-14 NDK_OUT=F:/Cocos/android/1.7.0/ceshi/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=F:\Cocos\android\1.7.0\ceshi\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\debug\lib NDK_TOOLCHAIN_VERSION=4.9 APP_PLATFORM=android-14 NDK_MODULE_PATH=C:\CocosCreator\170\resources\cocos2d-x;C:\CocosCreator\170\resources\cocos2d-x\cocos;C:\CocosCreator\170\resources\cocos2d-x\external -j4 NDK_DEBUG=1 F:/Cocos/android/1.7.0/ceshi/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/armeabi/libcocos2djs.so}
[armeabi] SharedLibrary : libcocos2djs.so
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionGrid3D.o):function cocos2d::Shaky3D::update(float): error: undefined reference to ‘rand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionGrid3D.o):function cocos2d::Shaky3D::update(float): error: undefined reference to ‘rand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionGrid3D.o):function cocos2d::Shaky3D::update(float): error: undefined reference to ‘rand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionTiledGrid.o):function cocos2d::ShakyTiles3D::update(float): error: undefined reference to ‘rand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionTiledGrid.o):function cocos2d::ShuffleTiles::startWithTarget(cocos2d::Node*): error: undefined reference to ‘srand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionTiledGrid.o):function cocos2d::TurnOffTiles::startWithTarget(cocos2d::Node*): error: undefined reference to ‘srand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCTMXXMLParser.o):function .LTHUNK4: error: undefined reference to ‘atof’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCTMXXMLParser.o):function .LTHUNK4: error: undefined reference to ‘atof’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCTMXXMLParser.o):function .LTHUNK4: error: undefined reference to ‘atof’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCTMXXMLParser.o):function .LTHUNK4: error: undefined reference to ‘atof’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCConsole.o):function cocos2d::Console::commandTouchSubCommandTap(int, std::string const&): error: undefined reference to ‘srand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCConsole.o):function cocos2d::Console::commandTouchSubCommandSwipe(int, std::string const&): error: undefined reference to ‘srand’
collect2.exe: error: ld returned 1 exit status
make.exe: *** [F:/Cocos/android/1.7.0/ceshi/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/armeabi/libcocos2djs.so] Error 1

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

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

BUILD FAILED in 8s

44 actionable tasks: 1 executed, 43 up-to-date

@dumganhar

帮你顶顶,我也遇到这个问题,折腾了一夜;升级过sdk(26.),换过ndk(升到14b或者降到10e,12b)都不行;
选择编译的时候,API-Level 选择大于22时能编译过去,但是运行是崩溃的。

编译link问题,是ndk不同API Level之前兼容性不好导致的。由于是二进制库,肯定编译的时候就选择了一个版本,游戏工程必须配套使用对应的版本才行。

运行崩溃,能贴下日志么?

1.7.3beta8开始,如果用binary模版,必须要API Level 22版本及以上。API Level选高不代表不能在低于这个Level的设备上运行。

    compileSdkVersion 26 // 编译的sdk用的版本
    defaultConfig {
        applicationId "test.test.com.myapplication"
        minSdkVersion 14 // 能在最低那个版本的设备上运行,creator用的是10
        targetSdkVersion 26 // 目标测试机型是那个版本

如果想低版本,请用default或者link模版。

compileSdkVersion 26
buildToolsVersion '26.0.2'

defaultConfig {
    applicationId "cc.liyou.dwc.ceshi"
    minSdkVersion PROP_TARGET_SDK_VERSION
    targetSdkVersion 26
    versionCode 7
    versionName "2.0"

    externalNativeBuild {
        ndkBuild {

我编译时候使用的信息是这样的

PROP_TARGET_SDK_VERSION=14
PROP_APP_ABI=armeabi

崩溃日志
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:hello_world:externalNativeBuildDebug’.

Build command failed.
Error while executing process D:\androidSDK\cocosNdk\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=F:\Cocos\android\1.7.0\ceshi\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=F:\Cocos\android\1.7.0\ceshi\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=armeabi NDK_ALL_ABIS=armeabi NDK_DEBUG=1 APP_PLATFORM=android-14 NDK_OUT=F:/Cocos/android/1.7.0/ceshi/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=F:\Cocos\android\1.7.0\ceshi\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\debug\lib NDK_TOOLCHAIN_VERSION=4.9 APP_PLATFORM=android-14 NDK_MODULE_PATH=C:\CocosCreator\170\resources\cocos2d-x;C:\CocosCreator\170\resources\cocos2d-x\cocos;C:\CocosCreator\170\resources\cocos2d-x\external -j4 NDK_DEBUG=1 F:/Cocos/android/1.7.0/ceshi/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/armeabi/libcocos2djs.so}
[armeabi] SharedLibrary : libcocos2djs.so
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionGrid3D.o):function cocos2d::Shaky3D::update(float): error: undefined reference to ‘rand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionGrid3D.o):function cocos2d::Shaky3D::update(float): error: undefined reference to ‘rand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionGrid3D.o):function cocos2d::Shaky3D::update(float): error: undefined reference to ‘rand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionTiledGrid.o):function cocos2d::ShakyTiles3D::update(float): error: undefined reference to ‘rand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionTiledGrid.o):function cocos2d::ShuffleTiles::startWithTarget(cocos2d::Node*): error: undefined reference to ‘srand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCActionTiledGrid.o):function cocos2d::TurnOffTiles::startWithTarget(cocos2d::Node*): error: undefined reference to ‘srand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCTMXXMLParser.o):function .LTHUNK4: error: undefined reference to ‘atof’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCTMXXMLParser.o):function .LTHUNK4: error: undefined reference to ‘atof’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCTMXXMLParser.o):function .LTHUNK4: error: undefined reference to ‘atof’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCTMXXMLParser.o):function .LTHUNK4: error: undefined reference to ‘atof’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCConsole.o):function cocos2d::Console::commandTouchSubCommandTap(int, std::string const&): error: undefined reference to ‘srand’
C:/CocosCreator/170/resources/cocos2d-x/cocos/prebuilt-mk/…/…/prebuilt/android/armeabi/libcocos2dxinternal.a(CCConsole.o):function cocos2d::Console::commandTouchSubCommandSwipe(int, std::string const&): error: undefined reference to ‘srand’
collect2.exe: error: ld returned 1 exit status
make.exe: *** [F:/Cocos/android/1.7.0/ceshi/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/armeabi/libcocos2djs.so] Error 1

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

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

BUILD FAILED in 9s

明白了,
在ndkbulid中有
ndkBuild {
if (!project.hasProperty(“PROP_NDK_MODE”) || PROP_NDK_MODE.compareTo(‘none’) != 0) {
// skip the NDK Build step if PROP_NDK_MODE is none
targets ‘cocos2djs’
arguments ‘NDK_TOOLCHAIN_VERSION=4.9’
arguments ‘APP_PLATFORM=android-’+PROP_TARGET_SDK_VERSION

其中指定了了APP_PLATFORM,由于已经编译好的.a文件至少大于22
所以需要修改PROP_TARGET_SDK_VERSION>22

问一下,这样是否只在android5.1之后的设备才能运行?
还是说必须使用default或者link模板才行?

@dumganhar引擎开发团队

主要是 dlopen failed: cannot locate symbol “rand” referenced by

崩溃日志如下:
> FATAL EXCEPTION: main
> Process: com.sencatech.game.xx, PID: 16540
> java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol “rand” referenced by “xx.so”…
> at java.lang.Runtime.loadLibrary(Runtime.java:364)
> at java.lang.System.loadLibrary(System.java:538)
> at org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Unknown Source)
> at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Unknown Source)
> at org.cocos2dx.javascript.AppActivity.onCreate(Unknown Source)
> at com.sencatech.game.BaseGamePlayerActivity.onCreate(Unknown Source)
> at com.sencatech.game.arfun.UnityPlayerActivity.onCreate(UnityPlayerActivity.java:11)
> at android.app.Activity.performCreate(Activity.java:5310)
> at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
> at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2179)
> at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2264)
> at android.app.ActivityThread.access$800(ActivityThread.java:136)
> at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1219)
> at android.os.Handler.dispatchMessage(Handler.java:102)
> at android.os.Looper.loop(Looper.java:136)
> at android.app.ActivityThread.main(ActivityThread.java:5032)
> at java.lang.reflect.Method.invokeNative(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:515)
> at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
> at dalvik.system.NativeStart.main(Native Method)

使用的是binary编译arm与arm7 (选择API-22编译),运行机器是android4.4;
项目工程是android studio 2.3,其他设置

compileSdkVersion 25
buildToolsVersion '25.0.2'

defaultConfig {
	minSdkVersion 16
	targetSdkVersion 23
}

可以跑,你可以找台低版本设备试一下。不过我建议出包不要用binary啦。
用default和link模版靠谱。

别用binary这鸡肋了,用default或者link,然后构建的时候,选择API Level 10,再跑跑看看。

用default的好处是方便修改调整引擎相关的源码么?我的项目一期发包的时候,当时我要的功能引擎版本不满足,在panda的帮助下,用的default版本,修改了panda提供的相关代码。现在需要发二期的包,研发的过程频繁更新引擎版本,就用的binary方式,现在需要发包了,是不是改为default更稳妥?

用binary模版,你怎么接bugly,上传symbo文件?

开发验证可以用binary,出包请用link或者default。

default和link模板,每debug一次要等10分钟:3:

1赞

算快的了

编译一次不是会缓存住么。没改引擎不会重新编译

哪个正儿八经的引擎不是这样……

构建的时候 选择default 模板,API Level 有 10 这个选项?看到 是最低18。。。

楼主你是怎么解决的啊,看了半天没看懂?

PROP_TARGET_SDK_VERSION这个在哪修改啊?