Error compile Android

Previous topic - Next topic

Ian Price

Quote from: Marmor on 2013-Oct-24
Hi ian

Ive got the same "error"

While I'm glad I'm not the only one, it's annoying knowing that it should (and can) work, based on the AndroidExtra Sample. Strange :(
I came. I saw. I played.

spacefractal

#31
(EDIT: Deleted previous post to avoid confuction, sorry).

This is untested (tested now), but try change the Check_Asset: function to this one in AndroidExtras.gbas:

Code (glbasic) Select

FUNCTION EXTRASSTARTUP:
        // Fix orientation issue (if "nosensor" is used in manifest, this is NOT required, but does not harm)
        IF PLATFORMINFO$("DEVICE")="TOUCHSCREEN" OR PLATFORMINFO$("DEVICE")="KEYBOARD"
                LOCAL ORIENTATION=getScreenOrientation()
                SETORIENTATION ORIENTATION
        ENDIF
ENDFUNCTION

FUNCTION Check_Asset: File$
STATIC ISMEDIAFOLDERSET=0
IF ISMEDIAFOLDERSET=0
ISMEDIAFOLDERSET=1
LOCAL Path$=GETCURRENTDIR$()
IF INSTR(Path$, "Media/")<5
IF PLATFORMINFO$("DEVICE")="TOUCHSCREEN" OR PLATFORMINFO$("DEVICE")="KEYBOARD"
CREATEDIR("Media")
ENDIF
SETCURRENTDIR(GETCURRENTDIR$()+"Media") // this DONT work in java, so dont change it (except if scanning stuff after bulk coping).
ENDIF
IF PLATFORMINFO$("DEVICE")<>"TOUCHSCREEN" AND PLATFORMINFO$("DEVICE")<>"KEYBOARD"
RETURN
ENDIF
ENDIF

File$=REPLACE$(File$, "\\","/") // sut sure its correct, but \ need to been /
File$=REPLACE$(File$, "Media/","") // java put that one in, which is allways default path.

LOCAL fileapksize=JAVACALL$("size:"+File$)
LOCAL filelocalsize=GETFILESIZE(File$);

IF fileapksize<1 OR fileapksize<>filelocalsize
LOCAL ok=JAVACALL$("copy:"+File$)
IF ok=-1
LOCAL Path$=File$
FOR i=LEN(File$) TO 1 STEP -1
IF RIGHT$(Path$, 1)="/" THEN BREAK
Path$=LEFT$(Path$, LEN(Path$)-1)
NEXT
ok=CREATEDIR(Path$)
ok=JAVACALL$("copy:"+File$)
ENDIF
ENDIF
RETURN filelocalsize
ENDFUNCTION


Im guess you have a idea how it works and creating the folders if copy asset first failed and then try again.

Im guess tha main issues is missing the manual CREATEDIR which is required to uses my own assestcopy system. Java dosent do that, and hence its fails to read them, if you have used subfolders (which im guess you have). This changes try to create the missing subfolders and then try copy asset again.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

subfolders in Media folders seen works correctly now and have updated the sample files. CREATEDIR should do all automatic now in the function. Have tested it from a fresh install (the app, not the OS).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Ian Price

[QUOET]Im guess tha main issues is missing the manual CREATEDIR which is required to uses my own assestcopy system. [/QUOTE]
Cheer's I'll give it a bash when I get a moment. I tried both with and without subfolders btw.

Anyway, I suspect the problem actually lies somewhere between my chair and my keyboard ;)

:D
I came. I saw. I played.

Ian Price

Had a few spare minutes where I could access the tv and... Semi-success! I now have something I can work with :)



I don't know if the title and other graphics are off screen (scaling issues?), but the background is undulating nicely :)

Thanks SpaceFractal (and of course FiveSprites)  :good:
I came. I saw. I played.

spacefractal

#35
You remember uses the orientation fix (or it's will rotated 90 degree wrong)? Nice to see that background. Yes java and glbasic can been odd due that setcurrentdir bug, which can cause some traps (include my self really). So I'm updated the sample to use a subfolder to test and it's auto created correctly now.

Also surface is fixed to 720p (and scaled by ouya it's self), even shown in 1080p. Fillrate was the issue I'm did that in both games.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Ian Price

From what I can tell, the screen isn't orientated incorrectly, but it may be scaled at double (or more) than what it should be but that may be down to my own scaling function (I created the app for a much smaller screen and scaled up for Caanoo and Pandora etc.) Thankfully I'm getting the same results in BlueStacks, so I can check a bit quicker with that. Hopefully I'll have some time tomorrow to get AquaVenture to display the screen properly.
I came. I saw. I played.

Ian Price

#37
D'oh! I think I've just found out why I had graphics problems before. It's something so obvious, but seemingly irrelevant. Case sensitivity! Yep. My app, which works on EVERY other format without problem appeared to be a victim of case sensitivity in the media dept. since updating GLB and Android. I was searching for ".png" files in my code and all the media was labelled as ".PNG"

While I am aware that case-sensitivity has always been a potential issue, compiling for Android, prior to V11.XX and the new Android versions+Android Extras, was successful - all media loaded fine and my app was playable on BlueStacks.

Anyway, it looks as though my issue has been sorted now (it's running properly on BlueStacks again - not had chance to test on OUYA yet though). So fingers crossed that it was just a simple and obvious thing that we missed.

:)


[EDIT]



:)
I came. I saw. I played.

spacefractal

#38
GlBasic might have aware of that case in shoebox, but often it's allways fails on Linux based systems....

I'm thinks 720p should been nice for your game. Also your game might got rejected, if you don't let uses adjust screen overscan. your text is a bit outside that. in greedy mouse I'm diddent do that, but could change that in a option for eventuelly overscan issue.

But Nice too see that screen anyway  :good:

Edit:
Alternative, the option could render a smaller screen.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Ian Price

Yeah, I'maware of the overscan issue - that screen is only a WIP just to check that it actually works on OUYA and to get an idea of speed. I will be changing it to suit the needs of OUYA and maybe implementing a Purchase option, so thing will need re-arranging.

As for case sensitivity - I never had that problem on Wiz, Caanoo or Pandora - all of which are Linux based.

Until then, I need to sort out the controller crashing/exiting the app... However I'm sure it's just due to my lack of time to spend investigating any of this.
I came. I saw. I played.

spacefractal

#40
glbasic might have aware of it, which is actuelly a bad idea, because this is how Linux and Unix works and should not try to checking for that. So on Linux, its allways do thing case sensitivity. Also CopyAsset did not checking for case senative for that, nor im wont do that. That is property why its fails. Im wont fix that kind issue.

PS. moved the game controller crash post to androidextras to avoid double post.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Ian Price

I totally understand and it was my mistake at the end of the day - GLBasic has always been case sensitive and I should always try to ensure that I'm consistent with my media. This has just highlighted the need for me to be more careful.

:)
I came. I saw. I played.