Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
2013.9.1 Android export bug in package name — Gideros Forum

2013.9.1 Android export bug in package name

ricvieiraricvieira Member
edited October 2013 in Bugs and issues
Hi, I've noticed a bug in this 2013.9.1 gideros version, it didnt happened with the older one, when I export to android, it asks to change the package name, if I do it, for example from "com.giderosmobile.android" to "com.mypackage.myapp" when I open in eclipse, I need to refactor the main activitiy package name, because it stays has "com.giderosmobile.android", and because of that, despite being in the manifest has "com.giderosmobile.android.MyActivity" it will not find the class giving the error:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.mypackage.myapp/com.giderosmobile.android.StrikeGhostsActivity}:
 java.lang.ClassNotFoundException: com.giderosmobile.android.StrikeGhostsActivity 
 in loader dalvik.system.PathClassLoader[/mnt/asec/com.mypackage.myapp-1/pkg.apk]
I've got it to work, by refactoring the package, including the plugin with the googlebilling, just wanted to let you know in case you havent noticed it yet

tnx

Comments

  • Hello @ricvieira ;)
    unfortunately I have not seen this bug on latest version. Do you use Windows or Mac version and on which version of the OS do you see it specifically.

    And how does it exactly force to change it, what is the error message? Does the error message appear in Gideros Studio?

    And maybe I misunderstand something, but MainActivity is never related to your package name. It will always be com.giderosmobile.android.ProjectnameActivity, not matter what is your real package for the apk. As you said it yourself, because it is stated so in the AndroidManifest.

    So most probably this error relates to some misconfiguration on Android or Eclipse side, that it does not take the settings in manifest.

    Have you changed anything in Android/Eclipse settings since the last upgrade? :)
  • ricvieiraricvieira Member
    edited November 2013
    Im using Windows, and yes I know the activity name will always be the project name,

    I havent changed anything in android or eclipse, I used to program in pure android/java in this eclipse, and before this update I hadnt had a problem with the first gideros tests I made exporting to android.

    the package your thinking is the package name in android manifest, like: package="com.mypackage.myapp" which android will save in the device under it, but in this case, the dalvik PathClassLoader cant find the default gideros code package, "com.giderosmobile.android", the one the ProjectnameActivity belongs too.

    Ive used android 2.2 to build the project, and then tried with android 4.1 also, the same error.

    when you put in the manifest the activity name like this: android:name="com.giderosmobile.android.ProjectnameActivity "
    and set your package name when exporting from gideros to android like:
    "com.mypackage.myapp"

    the dalvik PathClassLoader will search for the activity in:
    "om.mypackage.myapp/com.giderosmobile.android.ProjectnameActivity" this is not working, it cant find it, Ive checked the manifest, theres nothing different there that would do this bug

    and checked the build path, and my "src" folder is there, same has gideros jar, which I moved into the libs folder

    EDIT: ok, I tried to do it all over again, to get the error logs again, and now it worked fine, it exported without a problem to eclipse (except for the screensize in androidmanifest, but thats not necessary) and works great in my device

    So i dunno what I did last night to get this error, lol, it was late, so probably not a bug, but my mistake, sry about that and tnx for the support :D

    Likes: ar2rsawseen

    +1 -1 (+1 / -0 )Share on Facebook
  • It's just great to know that issue is resolved ;)
  • I am using the latest version of Gideros and I have this problem as well that, even though on the export, I change the package, it still has com.giderosmobile.android in the export to Android. (Using the Android Studio template).
  • @mydoghasworms what do you mean by "still has com.giderosmobile.android" ? In Android manifest?

    If you mean in packages (as in folders) then it is the way it should be, because all internal packages are linked to com.giderosmobile.android, but that does not change your app's package name (which should be the one you provided in export and should appear in Android Manifest)
Sign In or Register to comment.