Debug to android device not working

Hi,

I’m new to cocos2d-x (or android development). I had some computer problems the past week so I reinstalled c2dx, studio, etc.

When I debug to windows in c2d studio, it works. When I debug to my android device, it gives me install runtime error:INSTALL_PARSE_FAILED_NO_CERTIFICATES

adb devices:

Preferences:


Debug settings:

Environment variables:

1 User variables:

  • COCOS_CONSOLE_ROOT = C:\android\cocos2d-x-3.2\tools\cocos2d-console\bin
  • path = C:\android\cocos2d-x-3.2\tools\cocos2d-console\bin;[…]
    2 System variables:
  • ANDROID_SDK_ROOT = C:\android\adt\sdk
      - ANT_ROOT = c:\android\ant
      - COCOS2DX_ROOT = c:\android\cocos2d-x-3.2    
      - JAVA_HOME = C:\Program Files\Java\jdk1.7.0_67
      - NDK_ROOT = C:\android\ndk
  • NDK_MODULE_PATH = %COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
      - Path = C:\Program Files(x86)\Python278;[…];C:\android\adt\sdk\platform-tools

What am I doing wrong?

It’s the problem of JDK.
We have integrated correct jdk into the Cocos Code IDE rc2, please download that version and try again.

I’m running the version from this installer: cocos-code-ide-win64-1.0.0-rc2.exe

But you are using JDK installed by yourself.

The integrated JDK is located at {IDE_Install_Dir}/jdk

Hi,
I am having the same issue. I get this error when i attempt to debug a new project on android using the cocos code ide:

my settings are as folows:

any ideas what i’m doing wrong?

If i right click on the project and select:
Cocos Tools -> package to apk for android…
and select publish with debug keystore then install it is successful and I can manually run the application on my tablet, it just seems to be debugging that does not work.

any help would be appreciated.

best regards,
Simon

Cocos Code IDE 1.0.1 have fixed this bug. Please use this latest version to create a new project , or copy a PrebuiltRuntime*.apk from engines to your project/runtime/android.

We have a tutorial series for the latest version

1 Like

I have downloaded the latest version and everything seems to be working now.
Thanks for your assistance.

“copy a PrebuiltRuntime*.apk from engines to your project/runtime/android” --> where are these engines?

I am following the new tutorials to setup Cocos Code IDE but I can’t find a JDK Location anywhere. I downloaded the IDE from the Cocos download site.

Have you tried to browse?

Also what version of Cocos Code IDE are you using?

I am using the following:
Cocos Code IDE v1.2.0
Latest Android SDK
Android NDK r9d
Apache ANT 1.9.5
JDK 8u45 from: http://cocos2d-x.org/programmersguide/B/

When I tried to browse, there was no Cocos Code IDE.app/JDK/bin folder that I was able to find or select.

Try JDK v7

I tried JDK v7 using this link: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html but nothing different happened, same thing, no option to select even when I browse/custom.

When I install the JDK it does not ask me what folder to select to put it in, it just installs it. I was following this tutorial video: https://www.youtube.com/watch?v=Tvcvw4wfJ34 but there was no indication of where to get the Cocos Code IDE.app/JDK file.

NOTE: I have not tried running/deploying a project on Android yet so I’m not sure if missing this JDK path will cause a problem or not. Should I try that before spending more time on JDK?

Do I need to setup JAVA_HOME or anything like that?

I had no problem running a sample cocosJSGame on my Android phone.

Have you tried using the latest version of Cocos Code IDE?

Lastest version of Cocos Code IDE is 2.0? I ran it like IDEA IntelliJ
How to use cocos code ide to debug Cocos2d-x C++ project ? I can’t find and help

This is the best we could find http://www.cocos2d-x.org/wiki/How_to_debug_the_C++_with_script_side-by-side_simultaneously

The wiki is too short for me to understand how could I do that. Since I’m newbie

Generally we recommend you use Eclipse for C++