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.

Android / Can't compile AGK player in eclipse

Author
Message
LiamBradbury
8
Years of Service
User Offline
Joined: 28th Apr 2011
Location: Manchester, UK
Posted: 5th Feb 2013 01:18
ok, can anybody here help at all with this problem,

I've installed eclipse indigo, installed the android SDK packages (API 9 + 13), ran cygwin on the interpreter_android folder which was successful.

I have made a Tier 1 BASIC app and have updated to AppGameKit v108 (but it still says build 107 under Help > About for some reason, I've got all the new commands though, I have also created all the correct files and folders on C:/Android etc - copied the interpreter and interpreter_android folder over too.

Now when I import the AppGameKit player project into eclipse I get 38 errors, such as:

DialogError cannot be resolved to a type - line 455
DialogListener cannot be resolved to a type - line 453
Facebook cannot be resolved to a type
Session cannot be resolved
Session cannot be resolved to a type
statusCallback cannot be resolved to a variable
The import com.facebook cannot be resolved
The method asBinder() of type IMarkeyBillingService.stub must override a superclass method.


I have 38 of these errors all under the paths AppGameKit Player/src/come/thegamecreators/agk_player
or
AGK Player/gen/come/android/vending/billing

I have tried everything, even uninstalling everything and reinstalling. I've look through countless numbers of walk-throughs but they all say to just "right click the project, go to android tools and click fix project properties" which never works.

How have people got around this issue? is there something I'm unaware of?

www.liambradburymusic.com - professional music for your games at low prices!
easter bunny
6
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 5th Feb 2013 05:20 Edited at: 5th Feb 2013 05:27
Try copying the Facebook folder from the same folder as interpreter_android and copy it to C:/Android/AGK/ide/apps, or where ever you put interpreter_android, then import it into Eclipse the same way you import interpreter_Android, this should fix some of your problems.
Don't worry about Help>About saying it's 107, That's normal, TGC probably never bothered to update it

edit: You might need to use Project>Clean to get it to recompile properly

There are 10 types of people, those who understand binary and those who don't
LiamBradbury
8
Years of Service
User Offline
Joined: 28th Apr 2011
Location: Manchester, UK
Posted: 5th Feb 2013 05:41
Thanks! There are still lots of errors though :S has anyone managed to get this working properly? I've not come across anyone that has managed to play a working .apk file on their phone yet. I'm sure there is something that I'm missing, maybe I haven't updated a certain file or downloaded something.

www.liambradburymusic.com - professional music for your games at low prices!
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 5th Feb 2013 15:17
As strange as it sounds, you probably need to do some of the same steps as for Tier 2 compiling for v1085+ (current is v1088, and you can tell your version by looking at the AGK.txt file in your main AppGameKit windows directory).

Look at the AGK Wiki Templates page, starting at the section titled 'Android Project and Product Name AND Fix the "Missing Class R" errors:'.

Maybe some of these edits will help fix the problem for you. A lot of it comes down to package names. There are several java files that need to know exactly where to find things.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
LiamBradbury
8
Years of Service
User Offline
Joined: 28th Apr 2011
Location: Manchester, UK
Posted: 6th Feb 2013 01:26
ok I have managed to create a .apk file and the app runs but crashes whenever the phone orientation changes, I have set it to run in landscape mode only
I think there may be some code in the core.cpp file which is conflicting with my agk orientation code, any help with this would be appreciated as I have zero knowledge of C++

Also, the display size doesn't fill the whole screen, it looks like its the same size as it would be if the phone orientation was portrait, again I think this might be something to do with the core.cpp file.

www.liambradburymusic.com - professional music for your games at low prices!
easter bunny
6
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 6th Feb 2013 01:56
I tried a complete recompile of AppGameKit Player from the original files, and it had the 38 errors you had. But when I imported Facebook and used Android Tools>Fix project properties on both projects, It came down to just 3 errors (and 30 warnings, just ignore these), all in IMarketBillingService.java.
here's how I got around these problems:
Assuming you have 2 projects open in Eclipse (AGK Player and FacebookSDK) and FacebookSDK has warnings and AppGameKit Player has 3 errors...
Right-Click on AppGameKit Player project (in the left side bar) and click on properties (from the same menu as Android Tools), then click on Java Compiler in the left side bar, and UNtick 'Enable project specific settings' then click ok, then yes. Now use Android Tools>Fix Project Properties again. This fixes all the problems I had, I then copied the media folder from one of my existing project into assets and renamed the .byc file (so it's in assets/media/bytecode.byc) then exported it and ran it on my phone and it worked fine.

There are 10 types of people, those who understand binary and those who don't
LiamBradbury
8
Years of Service
User Offline
Joined: 28th Apr 2011
Location: Manchester, UK
Posted: 6th Feb 2013 11:08
@MissJoJo - you are a genius! that has fixed all the errors with AppGameKit Player. I didn't know that you had to import the facebook project, I hadn't read this anywhere!

I managed to get an app working on a phone by deleting all the files in the src/com/thegamecreators/agk_player folder except for the util folder and the files "AGKHelper.java" + "MyFacebookActivity.java" but I suspect that there will be problems somewhere without these files! your way has fixed everything.

Thank you both for your help!

www.liambradburymusic.com - professional music for your games at low prices!

Login to post a reply

Server time is: 2019-08-17 14:39:16
Your offset time is: 2019-08-17 14:39:16