Hi all, I want to write some code in AppActivity.java file, but it is hard to do as VS code doesn’t show my any help and intellisense. It even doesn’t show my errors I can do.
My question is what IDE should I use, or what should I install to achieve intellisense for .java files?
I installed some VS Code extensions, but it doesn’t help. I also tried IntelliJ IDEA IDE, but the result the same: Thanks,
I am not exactly sure, but let me ask engineering to have a reply.
VSC for android? Maybe it’s better to use Android Studio for this? Build your project in CC. Then open it in Andriod Studio and then add activities and other logic.
Hello, thanks for replay.
I tried Android Studio, but there I don’t see intellisense too:
I want to achieve such help what I see in Type Script files:
If there are no hints in Android Studio either, none of the other software should have them either.
I think here you need to look at Android Studio and its settings, and this has nothing to do with CC. I would suggest trying to create a simple android project in Android Studio and see if intellisense works there.
Hi, thanks for replay, I figured out and created project in the native folder of my cocos project,
but now imports aren’t working:
Did you set up the environment according to this guide: Installation and Configuration of Native Development Environment? I remember testing CC (3.4.1) in Android Studio and everything worked, including the intellisense.
And earlier I had in mind the creation of a simple android application without the participation of Cocos. Just to check if the intellisense works in the native android application (whether the environment is set up correctly and whether the SDK and other necessary tools are installed).
Hi, thanks for reply. I tried to create empty Java project in Android Studio and looks like intellisense is working:
I think the problem is the current cocos project folder isn’t recognized as an Android project, because there even .java files looks different:
- Build in CC:

- In Android Studio:
- Selecting the resulting android project:
- This will open the project and start building Gradle, indexing the project, etc. After that it should be like this:
Profit! ![]()
I tried to do the same as you by installing a bunch of VSCode extensions so that I could have intellisense working without having to open up Android Studio. But it made VSCode sluggish.
I’d also advice you to use Android Studio as others have mentioned.
VSCode extensions make the editor slow. Why go through the headache when you already have Android studio, which is built for this.
Thanks for your reply, it really works, I just wanted to make this path to work:
native/engine/android/app/src/com/cocos/game/AppActivity.java
because if I am not wrong, path build/android/proj will be recreated every time I make a build, so I need to edit .java file under this path after every build of the project I will do.
But now intellisense work in native/engine/android/app/src/com/cocos/game/AppActivity.java so it is much easier to figure some errors, thanks.
So I just wanted to use one IDE when I am creating a project, to not switch between two IDEs (VSCode and Android Studio).
Also, VSCode works much faster.
You are right about recreating the project’s build folder, but. If you look at the path where the project activity is located, or even if you create your own activity, you will notice that they do not lead to the build folder that is being created.
It might be easier to show. I created a project in the above way and opened it in AS (Android Studio). Then:
- Added a line to the activity created by CC:
- Added my activity:
- Rebuilt the project:

- Opened the project in AS and:
If you look at the path, for example, of an activity created by CC, it will not contain the build folder. This way you don’t have to edit the .java files again because those sources are not in the build folder that CC creates. ![]()
For some reason, mine takes a longer time to load initially and fails to work properly sometimes.
Maybe I installed the wrong plugins.
But I simply use the Android Studio since it has everything configured.
Maybe I’ll look into VSCode sometime later.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.













