Cocos Compile --android-studio

Cocos Compile --android-studio
0.0 0

#1

‘Standard’ compile command works fine:
cocos compile -p android -m debug --ap android-23

I get an apparent link error when I compile using this command:
cocos compile -p android -m debug --ap android-23 –android-studio

Error:
jni/…/…/…/Classes/AppDelegate.cpp:289: error: undefined reference to ‘MainMenu::createScene()’
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi/libMyGame.so] Error 1
Error running command, return code: 2.

Struggling with this - any ideas please?


#2

have you updated android.mk under proj.android-studio/app/jni ?

also all files one more level up compared to eclipse project setup in android.mk


#3

Ahh, building now thank you. Made me look foolish :confused:

In my proj.android/res folder I have my various icons resolutions:

res/drawable-hdpi/icon.png 72x72 res icon

res/drawable-xxxhdpi/icon.png 192x192 res icon

do I need to include similar versions of my icons in:

proj.android-studio/app/res/mipmap-hdpi

res/mipmap-xxxhdpi etc. ?

If so, where/how are these used?

Thanks again.


#4

Definetly u need to add icon to all of this folder, naming of icon file was changed in android studio compared to eclipse.

We using this site to generate full set of icons from big one:


#5

Thanks :slight_smile: