Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / v1088 Android - missing a class R or the R class

Author
Message
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 5th Feb 2013 03:52 Edited at: 5th Feb 2013 03:58
In response to Hodgey's post in another thread.

If you look on the AppGameKit Wiki Templates page, starting about "Android Project and Product NameAND Fix the "Missing Class R" errors:", there is discussion about several files and values that need to be changed to accommodate each project.

I may not have written it as well as it could be (I was in a hurry to get the information up).

I had gotten fairly far in the v1088 Android template. But the app just produces a blank screen. There is a fuller discussion in my original thread, but this post shows what LogCat shows up in Eclipse when I try to run the app. It would seem to indicate that something wasn't communicating properly (and my Nexus 7 fully supports OpenGL 2.0).

EDIT: I added 'AND Fix the "Missing Class R" errors' to the AppGameKit Wiki Templates page header.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 5th Feb 2013 09:29 Edited at: 5th Feb 2013 09:37
I'm not too worried about renaming the project right now (I'll tackle that later). However, the R classes that I've found are not compatible with the source code. The R class (interpreter project) found in gen/com/thegamecreators/agk_player/R.java contains this:



In the source code I can see that it asks for fields such as:


The android one I found seems to contain all of the necessary fields/interfaces but doesn't contain the 'com_' fields and some other fields.

How in the blazes did you get yours to compile?

Edit: regarding the name change, is a *Right-click project*->refactor->rename just as effective as the steps you've listed on the wiki?

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 5th Feb 2013 15:25
The instructions on the wiki page have more than just renaming the project in mind. There are changes that need to be made just to get the different files to recognize each other.

I'm assuming that you changed the package name to something other than com.thegamecreaters.<whateverwastheoriginal> that is in the original AndroidManifest.xml file.

Once you change that package name, it is necessary to edit several other files, specifically the ones starting at step 6. This is what clears up the 'R' issue.

And your shortcut is probably correct, but I hadn't seen that when I was working on the instructions (and they lead into the other package name changes).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 7th Feb 2013 07:46
Righto. I finally fixed the R-class problem. Now I'm getting other errors and they seem to be different with every project so I'm just going to wait until 108 is out of beta. Thanks for your time and efforts AL.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Feb 2013 15:37
No sweat. Good luck and Happy Programming.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-05-07 22:51:23
Your offset time is: 2024-05-07 22:51:23