Results 1 to 3 of 3

Thread: Problem with changing package name on Android

  1. #1
    Squire
    Join Date
    Dec 2010
    Posts
    10

    Default Problem with changing package name on Android

    I'm having problem changing the package name of RTSimpleApp from com.rtsoft.rtsimpleapp to my own package name : com.bullno1.metalwar

    Here's what I've done:
    -Followed the wiki tutorial and successfully built and ran RTSimpleApp on the simulator.
    -Duplicated RTSimpleApp folder and rename it MetalWar
    -Use vsrename on the folder
    -Edit app_info_setup.bat, build.sh, AndroidManifest.xml, replacing all instances of rtsimpleapp with metalwar and rtsoft with bullno1
    -Rename src/com/rtsoft/rtsimpleapp/Main.java to src/com/bullno1/metalwar/Main.java
    -Edit Main.java,changing "package com.rtsoft.rtsimpleapp;" to "package com.bullno1.metalwar;", PackageName= "com.bullno1.metalwar";

    The app builds fine however it crashes on the simulator.
    Here's the log
    Code:
    I/ActivityManager(   59): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.bullno1.metalwar/.Main }
    I/ActivityManager(   59): Start proc com.bullno1.metalwar for activity com.bullno1.metalwar/.Main: pid=658 uid=10032 gids={3003, 1015}
    I/WindowManager(   59): Setting rotation to 1, animFlags=1
    I/ActivityManager(   59): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=3/1 orien=2 layout=18 uiMode=17 seq=14}
    D/com.bullno1.metalwar(  658): SDK version: 8
    D/dalvikvm(  658): Trying to load lib /data/data/com.bullno1.metalwar/lib/libmetalwar.so 0x43e374e0
    E/SimpleApp(  658): File manager initted
    D/dalvikvm(  658): Added shared lib /data/data/com.bullno1.metalwar/lib/libmetalwar.so 0x43e374e0
    D/qemud   (   38): fdhandler_accept_event: accepting on fd 10
    D/qemud   (   38): created client 0x42258 listening on fd 15
    D/qemud   (   38): client_fd_receive: attempting registration for service 'sensors'
    D/qemud   (   38): client_fd_receive:    -> received channel id 13
    D/qemud   (   38): client_registration: registration succeeded for client 13
    D/qemud   (   38): fdhandler_event: disconnect on fd 15
    I/ActivityManager(   59): Displayed activity com.bullno1.metalwar/.Main: 1754 ms (total 1754 ms)
    D/libEGL  (  658): egl.cfg not found, using default config
    D/libEGL  (  658): loaded /system/lib/egl/libGLES_android.so
    E/SimpleApp(  658): Initializing BaseApp...
    W/dalvikvm(  658): JNI WARNING: JNI method called with exception raised
    W/dalvikvm(  658):              in Lcom/rtsoft/shared/AppRenderer;.nativeResize
    (II)V (GetStaticMethodID)
    W/dalvikvm(  658): Pending exception is:
    I/dalvikvm(  658): Ljava/lang/NoClassDefFoundError;: com.rtsoft.metalwar.Main
    I/dalvikvm(  658):      at com.rtsoft.shared.AppRenderer.nativeResize(Native Method)
    I/dalvikvm(  658):      at com.rtsoft.shared.AppRenderer.onSurfaceChanged(SharedActivity.java:833)
    I/dalvikvm(  658):      at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1325)
    I/dalvikvm(  658):      at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
    I/dalvikvm(  658): Caused by:
    I/dalvikvm(  658): Ljava/lang/ClassNotFoundException;: com.rtsoft.metalwar.Main
    in loader dalvik.system.PathClassLoader[/mnt/asec/com.bullno1.metalwar-1/pkg.apk]
    I/dalvikvm(  658):      at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
    I/dalvikvm(  658):      at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
    I/dalvikvm(  658):      at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
    I/dalvikvm(  658):      at com.rtsoft.shared.AppRenderer.nativeResize(Native Method)
    I/dalvikvm(  658):      at com.rtsoft.shared.AppRenderer.onSurfaceChanged(SharedActivity.java:833)
    I/dalvikvm(  658):      at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1325)
    I/dalvikvm(  658):      at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
    I/dalvikvm(  658): "GLThread 10" prio=5 tid=9 NATIVE
    I/dalvikvm(  658):   | group="main" sCount=0 dsCount=0 s=N obj=0x43e41720 self=0x21ae60
    I/dalvikvm(  658):   | sysTid=666 nice=0 sched=0/0 cgrp=default handle=2207648
    I/dalvikvm(  658):   | schedstat=( 79406825 107926825 55 )
    I/dalvikvm(  658):   at com.rtsoft.shared.AppRenderer.nativeResize(Native Method)
    I/dalvikvm(  658):   at com.rtsoft.shared.AppRenderer.onSurfaceChanged(SharedActivity.java:833)
    I/dalvikvm(  658):   at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1325)
    I/dalvikvm(  658):   at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
    I/dalvikvm(  658):
    E/dalvikvm(  658): VM aborting
    I/DEBUG   (   31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    I/DEBUG   (   31): Build fingerprint: 'generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys'
    I/DEBUG   (   31): pid: 658, tid: 666  >>> com.bullno1.metalwar <<<
    I/DEBUG   (   31): signal 11 (SIGSEGV), fault addr deadd00d
    I/DEBUG   (   31):  r0 00000374  r1 0000000c  r2 0000000c  r3 deadd00d
    I/DEBUG   (   31):  r4 00000026  r5 80887fc4  r6 00000000  r7 fffe6624
    I/DEBUG   (   31):  r8 45b8dd58  r9 428ddf40  10 428ddf2c  fp 0021ae60
    I/DEBUG   (   31):  ip 808881ec  sp 45b8dc78  lr afd154c5  pc 8083b162  cpsr 20000030
    I/DEBUG   (   31):          #00  pc 0003b162  /system/lib/libdvm.so
    I/DEBUG   (   31):          #01  pc 0002cff4  /system/lib/libdvm.so
    I/DEBUG   (   31):          #02  pc 0002d11a  /system/lib/libdvm.so
    I/DEBUG   (   31):          #03  pc 000314b6  /system/lib/libdvm.so
    I/DEBUG   (   31):
    I/DEBUG   (   31): code around pc:
    I/DEBUG   (   31): 8083b140 1861447c 200618a2 e878f7d8 f7d82000
    I/DEBUG   (   31): 8083b150 4808e9e4 6bdb5823 d0002b00 4b064798
    I/DEBUG   (   31): 8083b160 701c2426 ea5cf7d8 0004ce80 fffe4ae0
    I/DEBUG   (   31): 8083b170 fffe801c 00000374 deadd00d b510b40e
    I/DEBUG   (   31): 8083b180 4c0a4b09 447bb083 aa05591b 6b5bca02
    I/DEBUG   (   31):
    I/DEBUG   (   31): code around lr:
    I/DEBUG   (   31): afd154a4 b0834a0d 589c447b 26009001 686768a5
    I/DEBUG   (   31): afd154b4 220ce008 2b005eab 1c28d003 47889901
    I/DEBUG   (   31): afd154c4 35544306 d5f43f01 2c006824 b003d1ee
    I/DEBUG   (   31): afd154d4 bdf01c30 0002ae7c 000000d4 1c0fb5f0
    I/DEBUG   (   31): afd154e4 43551c3d a904b087 1c16ac01 604d9004
    I/DEBUG   (   31):
    I/DEBUG   (   31): stack:
    I/DEBUG   (   31):     45b8dc38  00000015
    I/DEBUG   (   31):     45b8dc3c  afd1453b  /system/lib/libc.so
    I/DEBUG   (   31):     45b8dc40  afd405a0  /system/lib/libc.so
    I/DEBUG   (   31):     45b8dc44  afd4054c  /system/lib/libc.so
    I/DEBUG   (   31):     45b8dc48  00000000
    I/DEBUG   (   31):     45b8dc4c  afd154c5  /system/lib/libc.so
    I/DEBUG   (   31):     45b8dc50  0021ae60  [heap]
    I/DEBUG   (   31):     45b8dc54  afd1450d  /system/lib/libc.so
    I/DEBUG   (   31):     45b8dc58  fffe6624
    I/DEBUG   (   31):     45b8dc5c  80887fc4  /system/lib/libdvm.so
    I/DEBUG   (   31):     45b8dc60  80887fc4  /system/lib/libdvm.so
    I/DEBUG   (   31):     45b8dc64  00000000
    I/DEBUG   (   31):     45b8dc68  fffe6624
    I/DEBUG   (   31):     45b8dc6c  afd1456b  /system/lib/libc.so
    I/DEBUG   (   31):     45b8dc70  df002777
    I/DEBUG   (   31):     45b8dc74  e3a070ad
    I/DEBUG   (   31): #00 45b8dc78  00000001
    I/DEBUG   (   31):     45b8dc7c  8082cff9  /system/lib/libdvm.so
    I/DEBUG   (   31): #01 45b8dc80  00000001
    I/DEBUG   (   31):     45b8dc84  8082d11f  /system/lib/libdvm.so
    W/WindowManager(   59): Window freeze timeout expired.
    W/WindowManager(   59): Force clearing orientation change: Window{43fa4770 com.bullno1.metalwar/com.bullno1.metalwar.Main paused=false}
    W/WindowManager(   59): Force clearing orientation change: Window{44031800 SurfaceView paused=false}
    D/Zygote  (   33): Process 658 terminated by signal (11)
    I/ActivityManager(   59): Process com.bullno1.metalwar (pid 658) has died.
    I/WindowManager(   59): WIN DEATH: Window{43fa4770 com.bullno1.metalwar/com.bullno1.metalwar.Main paused=false}
    I/WindowManager(   59): WIN DEATH: Window{44031800 SurfaceView paused=false}
    D/dalvikvm(   59): GC_EXPLICIT freed 2846 objects / 197352 bytes in 114ms
    I/BootReceiver(   59): Copying /data/tombstones/tombstone_02 to DropBox (SYSTEM_TOMBSTONE)
    I/WindowManager(   59): Setting rotation to 0, animFlags=1
    I/ActivityManager(   59): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=3/1 orien=1 layout=18 uiMode=17 seq=15}
    D/dalvikvm(   59): GC_FOR_MALLOC freed 640 objects / 256976 bytes in 206ms
    W/InputManagerService(   59): Got RemoteException sending setActive(false) notification to pid 658 uid 10032
    I/UsageStats(   59): Unexpected resume of com.android.launcher while already resumed in com.bullno1.metalwar
    Please pay attention at the bold lines. The C++ lib is loaded, so I think I'm not doing anything wrong at the C++ side. However, mabe I'm missing something at the Java side, thus, it's still trying to load some package at com.rtsoft.*

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,375

    Default

    Hmm, check yourproject/source/App.cpp, near the bottom you should see this:

    const char * GetBundlePrefix()
    {

    return "com.rtsoft."; //or something like it
    }

    That probably needs to be changed.
    Seth A. Robinson
    Robinson Technologies

  3. #3
    Squire
    Join Date
    Dec 2010
    Posts
    10

    Default

    Thank you very much.
    That fixes the problem.

    Maybe it's time for something like a "new project script/wizard" or a proper tutorial?

Similar Threads

  1. Replies: 5
    Last Post: 02-21-2011, 10:54 PM
  2. Changing Novashell source - Linear Filter
    By garcia in forum Novashell Game Creation System
    Replies: 8
    Last Post: 11-15-2010, 12:00 AM
  3. Debian ClanLib Package
    By rombust in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 10-25-2009, 11:11 AM
  4. Fedora YUM Package
    By computerquip in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 09-30-2009, 06:24 AM
  5. changing the size of CL_Font_Sprite
    By xrubio in forum Official ClanLib SDK Forums
    Replies: 8
    Last Post: 07-27-2009, 09:49 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •