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 / Tier 1 v108 beta 5, Errors in eclipse when building game.

Author
Message
TrezSoft
AGK Tool Maker
12
Years of Service
User Offline
Joined: 8th Nov 2012
Location: UK
Posted: 6th Jan 2013 20:39
Built and deployed the Player without any issues.

Followed the instructions and video to build my game.

I get the following 2 errors in eclipse:

Anyone have any idea how i fix this.

Description Resource Path Location Type
R cannot be resolved to a variable IAPActivity.java /PuckstersStarChallenge/src/com/thegamecreators/agk_player line 162 Java Problem

Description Resource Path Location Type
R cannot be resolved to a variable MyFacebookActivity.java /PuckstersStarChallenge/src/com/thegamecreators/agk_player line 30 Java Problem
SimpleProgram
13
Years of Service
User Offline
Joined: 2nd Oct 2011
Location: Cali
Posted: 6th Jan 2013 20:51 Edited at: 6th Jan 2013 21:08
These errors are caused by changing the package name in the android manifest file.

They are really easy to fix.

Just double click on the error to open the java source file associated with it.

Scroll all the way up, find the one line of code that has something like "
", then click on the plus sign on the left of it.

Scroll down and look through all the lines of import code, there should be one that is commented out with "
".

Change this line to match the package name in the android manifest file that you have for you're project and un-comment it. "
" Make sure to leave the ".R;".

once edited just click on the "x" close mark in the file tab, choose to save changes and the error should be fixed.

Also you might want to update to the V108 BETA 7 since its out, it includes the new help files that explain this.

EDIT: Just by a bit

//simpleprogram

Programming and video games, what else could you need?
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 6th Jan 2013 20:53 Edited at: 6th Jan 2013 20:53
If you have changed your package name to something other than com.thegamecreators.agk_player then there is a line in IAPActivity.java and MyFacebookActivity.java that looks like this

You may have to click the little + icon near the top of the import section to see it. Uncomment this line and change it to your new package name. Don't change the other instances of agk_player in these files.

Edit: Beat me too it
TrezSoft
AGK Tool Maker
12
Years of Service
User Offline
Joined: 8th Nov 2012
Location: UK
Posted: 6th Jan 2013 21:18
Thanks both that fixed the eclipse issue . I did not want to change to beta 6 as the game is due out the door and everything is working (in the player at least).

But now when its deployed onto any of my devices it runs, rotates to landscape as it should and then just stays with a black screen.

(tested the same on 3 devices).


Any suggestions ?
SimpleProgram
13
Years of Service
User Offline
Joined: 2nd Oct 2011
Location: Cali
Posted: 6th Jan 2013 21:23
Are we talking about the player or your game?

Programming and video games, what else could you need?
TrezSoft
AGK Tool Maker
12
Years of Service
User Offline
Joined: 8th Nov 2012
Location: UK
Posted: 6th Jan 2013 21:25
The Player works fine. Its my game that just shows as a blank screen when built as a Native App. My game works fine via the player.
SimpleProgram
13
Years of Service
User Offline
Joined: 2nd Oct 2011
Location: Cali
Posted: 6th Jan 2013 21:28 Edited at: 6th Jan 2013 21:33
Just to check, have you un-commented
on line 260 in interpreter.cpp?

Else it might be something in you're code that causing the issue.

Programming and video games, what else could you need?
TrezSoft
AGK Tool Maker
12
Years of Service
User Offline
Joined: 8th Nov 2012
Location: UK
Posted: 6th Jan 2013 21:37
Yes its un-commented and the file name is corret in the assets folder.

I suspect it may be in the code but how can i pin it down ? It plays fine via the player and on the desktop.
SimpleProgram
13
Years of Service
User Offline
Joined: 2nd Oct 2011
Location: Cali
Posted: 6th Jan 2013 21:44
That's the thing when building Native, it always turns out different than it is on the player or desktop (sometimes for better or worse).

The best I can suggest is to look through you're code and make sure that everything is coherent (error free), from there start disabling things slowly and incrementally from the start of the game to the end. Testing each change out and seeing if it fixes anything.

Programming and video games, what else could you need?
TrezSoft
AGK Tool Maker
12
Years of Service
User Offline
Joined: 8th Nov 2012
Location: UK
Posted: 6th Jan 2013 21:50
Thanks Ill start going through it now. Just a quick question if I change the source can I just copy the new bytecodefile to the asset folder and then re run in eclipse to get an updated APK or do i need to do more ?
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 6th Jan 2013 21:58
Quote: "Yes its un-commented and the file name is corret in the assets folder."


Is the bytecode in assets/media/bytecode.byc?
SimpleProgram
13
Years of Service
User Offline
Joined: 2nd Oct 2011
Location: Cali
Posted: 6th Jan 2013 21:59 Edited at: 6th Jan 2013 22:03
You should,

No matter what I know that you will have to recompile in cygwin every time you change something.

Also make sure to clean out the old build before compiling the new one.

Just use "clean" instead of "2>log.txt" on the end of the compile command to do so. You might want to type them down first in the separate text file so you can copy and paste them to save on time.

Also refresh the file in eclipse and clean it before running.

And as John said make sure that the bytecode.byc is in "assets/media/" along with the rest of your resources.

So to be clear:
1. copy new bytecode.byc in assets/media
2. clean in cygwin, recompile afterwards
3.refresh and clean in eclipse
4.run

Programming and video games, what else could you need?
TrezSoft
AGK Tool Maker
12
Years of Service
User Offline
Joined: 8th Nov 2012
Location: UK
Posted: 6th Jan 2013 22:03
@Paul no its just in assets/bytecode.byc (should it be in a sub folder media then ?)

@SimpleProgram Ok thanks
SimpleProgram
13
Years of Service
User Offline
Joined: 2nd Oct 2011
Location: Cali
Posted: 6th Jan 2013 22:05 Edited at: 6th Jan 2013 22:06
Yeah to make it easier just copy the whole "media" folder from you're T1 project folder into the assets folder, then just rename project.byc to bytecode.byc of course.

Sorry I should have asked that first before sending you off to edit you're code.

Programming and video games, what else could you need?
TrezSoft
AGK Tool Maker
12
Years of Service
User Offline
Joined: 8th Nov 2012
Location: UK
Posted: 6th Jan 2013 22:37
Thanks Paul & SimpleProgram thats all it was , working great now thanks (RTFM again).
SimpleProgram
13
Years of Service
User Offline
Joined: 2nd Oct 2011
Location: Cali
Posted: 6th Jan 2013 22:42
No problem,

Good Luck with the game!

Programming and video games, what else could you need?

Login to post a reply

Server time is: 2024-11-24 05:38:37
Your offset time is: 2024-11-24 05:38:37