Deploying to android in release mode broken (3.0RC1 console)

I’m trying to deploy to android using

cocos deploy -p android -m release

Note that compiling works fine, and compiling & running (+ deploying) in debug mode works fine as well.

However, even for basic projects that were just created using cocos new foo -l cpp -p com.foo.bar I get the following error:

Error type 3
Error: Activity class (com.foo.bar/org.cocos2dx.cpp.Cocos2dxActivity) does not exist.

Where does this error come from and how do I fix it?

Actually, the problem seems to be that the .apk needs to be signed somehow, and it fails in release mode, thus throws error [INSTALL_PARSE_FAILED_NO_CERTIFICATES].

How can I fix this? Android dev noob here.

I have the same problem with you,but the debug mode is OK.

@dotsquid I have tried replicating those steps, i.e. changing the two lines in the two mentioned files, and adding the 4 lines from the stackoverflow question to the ant.properties.

Can I just use the debug keystore (with passwords = android) for testing out the release build?

also, what is “key.alias”? When I try to compile it says it can’t find alias “release_alias”. Tried “debug_alias” as well.

I got it working creating a release (for testing) keystore using this:
http://code.google.com/p/apk-signer/

Hmmm… I’ve just updated to RC1 and it seems that my previous comment is not actual, since that solution was correct for RC0. But now in RC1 release build works fine.
I don’t know why you have any problems. During the first build the script asks for keystore. Here is how you can generate a private key http://developer.android.com/tools/publishing/app-signing.html#cert

@dotsquid Oh, damn. I was still on RC0. Seems like the RC1 contains some fixes in this regard. It works now. Although, I now have a problem with performance. I wanted to test release because I get bad hiccups in debug mode, I thought release would be different. But it’s not. I guess the garbage collector is the culprit here, frames need about 4-6 ms on average, but sometimes they jump to up to 20 ms for a single frame or two. but that’s another topic entirely.

@think1st Maybe you are right concerning the GC. But I found that other apps can affect the performance of the game. E.g. I’ve got the Twilight app on my phone https://play.google.com/store/apps/details?id=com.urbandroid.lux which automatically adjust the color temperature of the screen over the course of the day. It appeared that it causes terrible hiccups in my game.