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 / player don´t load the bytecode.byc

Author
Message
sdl
AGK Developer
12
Years of Service
User Offline
Joined: 5th May 2012
Location: Germany
Posted: 16th Jan 2013 22:37
Hello,
So I have installed Eclipse and imported the player, everything is set up and eclipse generates the apk file. The player is also installed and working.

If I now consider the instructions and everything in the asset / media folder copy, including bytecode.byc file and then I refresh the project on new & clean make the generated file is much bigger ... Also installed but it seems only the players, nothing else ...

T1, 1088 Beta
Does anyone have an idea? What am I doing wrong?


An old thing I had created with the 1065 project works ...
However, since I had to also change the line with the still StrCopy ....
Help please ....
easter bunny
12
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 17th Jan 2013 01:32
I have this problem as well, It creates the apk, which is larger (16mb), but when I run it on an android emulator (Blue Stacks), it just comes up with a black screen.

There are 10 types of people, those who understand binary and those who don't
sdl
AGK Developer
12
Years of Service
User Offline
Joined: 5th May 2012
Location: Germany
Posted: 17th Jan 2013 13:53
Have you test a smaler projekt ?
It is always displayed the player
but the app does not appear no matter what I do.
I have the feeling that the file. byc is not loaded.
Does it work for you?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 17th Jan 2013 16:14
Did you edit the IDE/app/interpreter/interpreter.cpp file to uncomment the correct line to use the bytecode.byc file?

The correct one in v1088 is on line 260.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
sdl
AGK Developer
12
Years of Service
User Offline
Joined: 5th May 2012
Location: Germany
Posted: 18th Jan 2013 22:36
Thank you ... The problem is the guide.
Which has been considerably shortened in beta 1088th

The other part of the instructions, where the player is missing by CYGWIN rebuilt. In the heat of the moment I have not noticed ... (-:
Works so well ... Only the guide needed to be revised properly ...
However, I think is the right to create "complex" at GLBasic ranges a mouse click, because it is much easier and the sources of error close to zero ...

Sascha
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 23rd Jan 2013 01:30
Do you still need to do the cygwin bit? I can compile and build the player, but it's not playing the app as above, even when I edit out the line in the .cpp file? I do still get four errors in eclipse to do with facebook and billing however as these aren't active yet in the android build I just cancel them. Are you guys getting errors in eclipse?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Jan 2013 14:49
Once you edit the interpreter.cpp file, you need to do the cygwin bit in your project directory (the one with your media and the bytecode.byc file in the <andproj>/assets/media directory).

Then you run it from Eclipse and the apk file will be created in the <andproj>/bin directory.

Look at the instructions on the AGK Wiki Templates page, with attention to the information starting at "Android Project and Product Name:", for information on things to be done in v1085+ for facebook stuff.

Make sure to refresh your projects if you make any changes outside of Eclipse while Eclipse is open (otherwise it won't 'see' them).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 23rd Jan 2013 21:28 Edited at: 23rd Jan 2013 21:29
@ancientlady,

Thanks for the advice, and I'm probably being dense, but it;s still not working. I can compile the player no problem at all, and install it the broadcast to it and the app runs fine.

However my app wont run. Here's what I'm doing from there:
*copying media and .byc to assets/media in the project folder
*renaming the .byc to bytecode.byc
*changing the manifest name, including the two changes at lines 16 & 17 that your wiki page says
*editing the interpreter.cpp file at line 260 to run the t1 app (as per the beta 8 guide, and your instruction)
*cleaning in cygwin
*building in cygwin (this all appears to be fine)
*refreshing in eclipse
*cleaning the project in eclipse
*running it to get the .apk

This is then installing no problem, but when it runs the screen just goes black and nothing happens. Am I missing something really obvious???
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 23rd Jan 2013 21:35
OMG - I'm so thick!!!

I was copying the media files to the "assets" folder alright.....directly from the media folder in my working directory. I.e. bypassing the "media" folder needed in "assets" altogether.

Anyway, working like a dream now, and I thank you so much. Without you, I would probably have stopped trying!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Jan 2013 21:48
Did you create a new project folder by copying the interpreter_android folder and renaming it? I just want to make sure you don't loose the interpreter_android functionality.

And I am glad to help.

Happy Programming!

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 23rd Jan 2013 21:56
Yeah, the interpreter folder is now nicely stored away.

I have however hit a snag: my app is dependent on it loading in a large array from a text file. I use opentoread to open the file, the readline until the end of it, the close the file. This all works perfectly through the player if it broadcasts to the device....but compiled it seems unable to read the file!?!?! I'm playing now to try and identify if it's failing to find the file, or open it or read from it.

It's a plain text file. Any ideas?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Jan 2013 22:30
What directory did you put the file in?

It should be in the assets/media directory. The media directory is the default one for Tier 1 for all files.

Also, make sure that the file name of the file and how you are opening it are exactly the same. Android is case sensitive. This doesn't appear when broadcasting, only when running on the actual device.

It doesn't hurt to add "/media/" to the start of the file name strings for anything that you access in the media directory. That way the app knows exactly where to go.

If your app overwrites the file at some point, it will not overwrite the one in the media directory. It will create a file in the app specific sandbox area (in a directory named media). And any subsequent reads for the same file name will be from the sandboxed file, not from the one in the original media directory.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-23 12:25:07
Your offset time is: 2024-11-23 12:25:07