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 / Problems with Android Conversion - Need Help!

Author
Message
Craig Davidson
6
Years of Service
User Offline
Joined: 30th Oct 2012
Location:
Posted: 31st Oct 2012 00:21
I have just purchased the AppGameKit, and have already installed all the necessary software for outputting to Android. But I have a problem. Every time I create the AppGameKit Player, Eclipse says that the SRC has a warning. It says The value of the field AGKHelper.myActivity is not used AGKHelper.java /AGKPlayer/src/com/thegamecreators/agk_player line 78 Java Problem. Is there an easy solution to this, since I have tried it on two computers, and two different versions of Eclipse and have followed the instructions on both Youtube and the help file, and still I am unable to create a working game that can work on a Android tablet. So if there is anyone who can help me, please let me know and soon. I really need help!
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 31st Oct 2012 16:08
It isn't any problem to worry about. It is only a warning about an unused variable.

Unused variables warnings have no affect on whether an app works or not. Just ignore it.

Cheers,
Ancient Lady
AGK Community Tester
Craig Davidson
6
Years of Service
User Offline
Joined: 30th Oct 2012
Location:
Posted: 1st Nov 2012 02:35
I tried using it that way, but it displayed an error message from the complete APK test game file I did. Broadcast Packet 0 failed or something. Personally I don't get it. I tried all the different means. Am I doing something wrong I just do not know yet? I really need help with this.
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 1st Nov 2012 15:27
I'm not sure what kind of error you are talking about.

Does the app run at all when installed on your device?

Or are you not able to get Eclipse to run it?

And where does 'Broadcast Packet' come in? Is your app attempting to do network stuff?

Cheers,
Ancient Lady
AGK Community Tester
Craig Davidson
6
Years of Service
User Offline
Joined: 30th Oct 2012
Location:
Posted: 2nd Nov 2012 01:57
The software does not work on both Eclipse and the Android tablet. And I have tried everything to fix it but to no avail. Is there anybody who can help me with this?
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Nov 2012 16:07
You need to be much more explicit about what doesn't work.

I am able to build an app in cygwin then use Eclipse to create the apk file (it doesn't actually have to run on the device) and the install the apk and it all works.

The Android simulator in Eclipse does NOT work. This is known.

Also, what version of AppGameKit are you working with? v1076 or v1082?

Have you tried broadcasting your app from the AppGameKit IDE to your Android device?

If so, what Player did you use? If it was from the Android Play Store, it is hopelessly out of date. If it is the beta one from the TGC 'My Products' page, that is known to be buggy. This post has a link to a page with working v1076 and v1082 Players.

If you could answer the questions in my previous post and this one, we might be able to help you figure out what the problem is.

Cheers,
Ancient Lady
AGK Community Tester
Craig Davidson
6
Years of Service
User Offline
Joined: 30th Oct 2012
Location:
Posted: 3rd Nov 2012 07:55
I use v1076m and I am still learning how to use it. I could try to use the player you supplied. Please tell me how.
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Nov 2012 17:07
Open a browser on your Android device and go to this page (also linked to from the post I referenced):
http://www.triassicgames.com/tgc/public_download.html

Touch the appropriate Player link. This will start a download on your Android. When the download is complete, install it.

Then you run the Player on the Android and click on the compile/broadcast button in the AppGameKit IDE (green triangle in front of yellow gear). This assumes that you have a local network at home with wireless broadcasting and that your Android device is using the same network.

Cheers,
Ancient Lady
AGK Community Tester
Craig Davidson
6
Years of Service
User Offline
Joined: 30th Oct 2012
Location:
Posted: 4th Nov 2012 07:15
Yes I get using the player, yet how do I convert the game being made into an APK file? That is the problem I have.
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 4th Nov 2012 17:33
Let's try again.

I just reread your first post and it appears that you are trying to build your own Android Player (always a good idea).

So you are probably working with this directory:
C:\Android\AGK\IDE\apps\interpreter_android

If you followed all the different guides, you have installed cygwin and built the project by opening a cygwin session, maneuvering to the correct directory and executing the clean and build commands. Something like this:


When I installed my Android tools (ndk), I put them in a directory named 'android-ndk' (I don't like including versions).

After you built the Player, did you check the log.txt file to see if it showed any errors?

Assuming it didn't, then you open Eclipse and import the project in the interpreter_android directory as instructed by the various guides. You would need to right-click on the imported project and fix the project properties by clicking on Android Tools and selecting 'Fix Project Properties'. The next step is to run the app as an Android Application.

Hopefully, assuming you have your Android device connected via USB (and it is configured properly), when you try to run the project, Eclipse sees your device and lets you select it and then installs and runs the Player. The apk file has now been created and exists in the interpreter_android/bin directory.

Even if Eclipse doesn't see your device and asks if you want to create a virtual one (to which you respond 'no'), the apk file has still been created and can be installed on your device using other means (some people use Drop Box).

So what stage have you gotten to from the bits above? Then we'll try to see if we can figure out what your problem is.

If you have been able to create a project based on the interpreter_android directory (copied and renamed to be your own project) and put the byte code file created by the Windows AppGameKit IDE in the <andproj>/assets/media directory and renamed it exactly bytecode.byc, then you should be able to create the apk file specific to that project.

The step you may or may not have missed is editing the interpreter.cpp file in cygdrive/c/Android/AGK/IDE/apps/interpreter so that it uses the byte code file. This is the one that turns the project from a Player into your app. The line to un-comment is line #255 (a couple of lines after #ifdef IDE_ANDROID) and after the comment '// Assign byte code filename when running standalone'. The comment at the end of line #255 reads '// comment in for T1 BASIC APP', which is not very clear. Make sure to delete the leading '//' before 'strcpy'.

Then go back into cygwin and your android project directory and clean and build again. Then, in Eclipse, select your project and press F5 to refresh it and then run it again. This will create an apk that will use the byte code file from your Tier 1 project.

Cheers,
Ancient Lady
AGK Community Tester
Craig Davidson
6
Years of Service
User Offline
Joined: 30th Oct 2012
Location:
Posted: 4th Nov 2012 23:24
When you're referring to the interpreter_android directory, is that the fresh one from the Main AppGameKit directory, or is it the modified one with the player APK in it? I really need to know.
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 5th Nov 2012 16:27
The interpreter_android directory IS the Android Player.

It comes with the AppGameKit installation. Assuming your top level The Game Creators directory is 'TGC' (like mine), the original path for it in the AppGameKit installation is C:\TGC\AGK\IDE\apps\interpreter_android.

The path for the android setup is as I described in my previous post.

I don't know about any modified one. It is the directory (in your Android path) that you would copy and rename to create your own Tier 1 Android app.

Cheers,
Ancient Lady
AGK Community Tester
Craig Davidson
6
Years of Service
User Offline
Joined: 30th Oct 2012
Location:
Posted: 7th Nov 2012 00:58
I finally got to make a working Android App that runs on an Android device. All thanks to your advice Ancient Lady. Thank you very much for your help!
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Nov 2012 15:18
I am always happy to help.

Happy Programming!

Cheers,
Ancient Lady
AGK Community Tester
CounterStrike
User Banned
Posted: 17th Dec 2012 03:02
Then you run the Player on the Android and click on the compile/broadcast button in the AppGameKit IDE (green triangle in front of yellow gear). This assumes that you have a local network at home with wireless broadcasting and that your Android device is using the same network.

Hefei Kimay Electrical Appliance Co&#65292;Ltd
Commercial Refrigerators

Login to post a reply

Server time is: 2019-05-25 21:24:18
Your offset time is: 2019-05-25 21:24:18