Android-packageName

Hi,

My project crashes when i change the package name org.cocos2dx.tests to com.cocos2dx.guru ., here am attaching logs of particular crash .,

Thanks,
Gurusagar


cocos2dxlogs.rtf.zip (1.1 KB)

I also troubled by this problem a few days ago.
OK, I will write a document soon

Hi,

can you please give me temporary solution

Thanks,
Gurusagar

Hi,

can you please give me temporary solution

Thanks,
Gurusagar

Have changed AndroidMenifest.xml -> package=“org.cocos2dx.tests”?
On what step does it crash?

hi ,

i have changed the package name in the android manifest file , but still it is crashing in appdelegate , when i change it to default package name it is working fine

Thanks,
Gurusagar

ok, I simply post here.
Besides AndroidMenifest.xml, you have to

  1. rename the folder from
    yourgame/android/gen/org/cocos2d/application/
    to
    yourgame/android/gen/org/cocos2d/guru/

  2. rename the folder from
    yourgame/android/src/org/cocos2dx/application/
    to
    yourgame/android/src/org/cocos2dx/guru/

  3. modify the first line of yourgame/android/src/org/cocos2dx/guru/ApplicationDemo.java from
    package org.cocos2dx.application
    to
    package org.cocos2dx.guru

That’s all. Have I missed anything?

2 Likes

Thanks ,

we got it

You can also use a grep-like tool to find (and replace) those names. Much easier than doing it by looking into it without any help.

Also, could you please post without using the pre-tag for normal text? It makes it hard to read longer posts because of the horizontal scrollbar.

The easiest way is use eclipse:

new package
drag the java file into new package
delete old package
build project

2 Likes

Hi, how can we get android application package name from C++ code?