CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Jun 2021

    IllegalAccessError, cannot acces class

    Please, I am using AIDE IDE on android with libgdx and everything was okay until I got error message:
    06-25 22:38:02.730 14459 14484 E   AndroidRuntime                ava.lang.IllegalAccessError: 
                   jIllegal class access ('com.hmmmgames.dungroll.DungeonRollcall' attempting to access 'com.hmmmgames.dungroll.creatures.Creature') 
                   jin attempt to invoke virtual method java.lang.String com.hmmmgames.dungroll.creatures.Creature.myid() 
                   j(declaration of 'com.hmmmgames.dungroll.DungeonRollcall' appears in /data/app/com.hmmmgames.dungroll-1/base.apk)
    06-25 22:38:02.730 14459 14484 E   AndroidRuntime                               at com.hmmmgames.dungroll.DungeonRollcall.add(
    Please, how do I fix?
    class Creature
        public static class Action {
            public String name;
        public static final int ME = -1;
        public static final int MY_CLAN_FRIEND = 1;
        public static final int MY_FOREIGN_FRIEND = 2;
        public static final int MY_CLAN = 3;
        public static final int MY_CLAN_ALLY = 4;
        public static final int UNKNOWN_CREATURE = 5;
        public static final int UNKNOWN_CLAN = 6;
        public static final int MY_CLAN_ENEMY = 7;
        public static final int MY_FOREIGN_ENEMY = 8;
        public static final int ENEMY_CLAN = 9;
        public static final int TOTAL_TARGETS = 9;
        public Map<String, Double> stats;
        public Map<String, Double> liking;
        //holds knowledge of what each creature is doing
        //can be outdated... that's the fun :P.
        //Some may choose to tell you knowledge or not.
        public Map<String, String> knowledge;
        public String name;
        public ClanWrap clan;
        public GroupWrap group;
        public GroupWrap previousGroup;
        public CreatureWrap target;
        public boolean toKill = false;
        public boolean isFighting = false;
        public boolean retreating = false;
        public double startingEnemyHealth;
        //use this to find action of creature
        public String action;
        public int rampageTime = 0;
        public int regard = 0;
        public double startingHealth = 0;
        public String currentAction = "";
        public String pendingAction = "";
        public DungeonRoomWrap currentRoom;
        public ArrayList<Clan.Surname> bloodline;
        private double movingProgress;
        public static String[] tactical = {"wisdom","patience","sanity"};
        public boolean played = false;
        private String uuid;
    	public String myid() {
    		return uuid;
        public Creature(Group parentGroup) {
            group = new GroupWrap(parentGroup);
            clan = new ClanWrap(group.get().clan.get());
            liking = new HashMap<>();
            bloodline = new ArrayList<>();
            stats = new HashMap<>();
            knowledge = new HashMap<>();
            uuid = DungeonRollcall.uuid();
        public static boolean add(Creature data) {
            allCreatures.put(data.myid(), data);
            addedData = true;
            return true;
        public static boolean add(Group data) {
            allGroups.put(data.uuid, data);
            addedData = true;
            return true;
        public static boolean add(Clan data) {
            allClans.put(data.uuid, data);
            addedData = true;
            return true;
        public static boolean add(DungeonRoom data) {
            allDungeonRooms.put(data.uuid, data);
            addedData = true;
            return true;
        public static boolean add(DungeonFloor data) {
            allDungeonFloors.put(data.uuid, data);
            addedData = true;
            return true;
        public static String uuid() {
            if (!addedData) {
                log("old UUID not used");
            addedData = false;
            return UUID.randomUUID().toString();
    I've tried making uuid field public before, it didn't work. Also removed getter, still didn't work. Can still access toString() of Creature from DungeonRollcall. Why? Please how do I fix?
    Last edited by VictorN; June 26th, 2021 at 06:53 AM. Reason: Inserted line breaks in the error message

Posting Permissions

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

Click Here to Expand Forum to Full Width