Build file ‘/Applications/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/android/libco

CocosCreator构建安卓项目报错

Build file '/Applications/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/android/libcocos2dx/build.gradle' line: 9


A problem occurred evaluating project ':libcocos2dx'.
> Could not get unknown property 'PROP_TARGET_SDK_VERSION' for DefaultConfig_Decorated{name=main, dimension=null, minSdkVersion=DefaultApiVersion{mApiLevel=10, mCodename='null'}, targetSdkVersion=null, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptSupportModeBlasEnabled=null, renderscriptNdkModeEnabled=null, versionCode=null, versionName=null, applicationId=null, testApplicationId=null, testInstrumentationRunner=null, testInstrumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=null, signingConfig=SigningConfig_Decorated{name=debug, storeFile=/Users/nick/.android/debug.keystore, storePassword=android, keyAlias=AndroidDebugKey, keyPassword=android, storeType=jks, v1SigningEnabled=true, v2SigningEnabled=true, v1SigningConfigured=false, v2SigningConfigured=false}, resConfig=[], buildConfigFields={}, resValues={}, proguardFiles=[], consumerProguardFiles=[], manifestPlaceholders={}, wearAppUnbundled=null} of type com.android.build.gradle.internal.dsl.DefaultConfig.

解决方案:

1.打开/Applications/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/android/libcocos2dx/build.gradle

2.将里面的targetSdkVersion的值PROP_TARGET_SDK_VERSION替换为安卓工程中build.gradle(Project)下ext中targetSdkVersion的值

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值