HI
When i try to import cocos game into android studio i get gradle build error, because i dont have android-22 in sdk folder. I tried changing every value of android 22 in gradle files but it didnt work. I also tried compiling it explicitly saying it should be api 25 using command
cocos compile -p android --android-studio --ap android-25
it gets error:
* What went wrong:
A problem occurred configuring project ':game1'.
> A problem occurred configuring project ':libcocos2dx'.
> failed to find target with hash string 'android-22' in: /home/redy/Android-SDK
What am i doing wrong? I would really appreciate help.
Okay, i changed api in lobcocos2dx/build/build.gradle in cocos files, created new game and i got the same error but without the part about libcocos2dx
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':game1'.
> failed to find target with hash string 'android-22' in: /home/redy/Android-SDK
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Make sure both your project’s gradle and cocos2dx’s gradle is using the same Android SDK version and also make sure you have downloaded the specified Android SDK version into your computer