I created a brand new project using the Cocos tool, and I cannot get it to run on Android (I haven’t tried any other platforms yet). I have done absolutely nothing but create the project and try to run it with the command “cocos run . -p android -m debug”.
Here’s what I selected when creating the project:
Here’s the error that I get:
Starting: Intent { cmp=org.cocos2dx.TestProject/org.cocos2dx.javascript.AppActivity }
Error type 3
Error: Activity class {org.cocos2dx.TestProject/org.cocos2dx.javascript.AppActivity} does not exist.
Maybe messing with the package parameter in the manifest file would fix this, but I’m not familiar enough with Android development to know for sure, does anybody else have any ideas?
So, I bet, if you create a project and don’t select any SDKs, it will compile.
My guess, is that this error happens when multiple SDKBOX plugins are selected?
I don’t believe this is a compilation error, the project builds successfully. This looks like a classpath issue, where the AppActivity can’t be properly located because some bizarre package is being created somehow.
I dug around before posting here, and AppActivity class is defined in the package: org.cocos2dx.javascript
The actual java file is located in the folder: <PATH_TO_PROJECT FOLDER>/frameworks/runtime-src/proj.android/src/org/cocos2dx/javascript/AppActivity.java
However, looking at that error, it’s trying to find the class in “org.cocos2dx.TestProject/org.cocos2dx.javascript.AppActivity”. It’s somehow adding some weird package based off of my project’s name to the search path for the AppActivity class.
I’ll try it your way just to see what happens, but I get the feeling it’s not going to help the sitaution.
Unchecking all SDKBOX plugins doesn’t work, neither does selecting precompiled library instead of source code.
As of right now, I do not believe it is possible to run a newly created Android project created by Cocos. At least not in debug mode, I haven’t tried release mode yet.
Let me try on my end as well.
Thanks, I’m interested to see what you find out. I’ve tried creating new projects from the command line also, and I get the same exact error.
I can’t be the only person who has tried to run an Android project in debug mode, so I’m very curious to figure out what’s going on. I can only assume I’m missing some important step(s) that I just don’t know about.
Same error on my side, have you been able figure it out?
Cocos GUI Launcher has been deprecated for years. How did you come across it?