GLBasic forum

Main forum => GLBasic - en => Topic started by: MrPlow on 2020-Aug-03

Title: Android build issues
Post by: MrPlow on 2020-Aug-03
Hi
Been a while since I used my GLB Android compile - must have been updated since.
I tried with a clean start - removing my older Android Studio folder from the app...

However, I got a Project build error with new the build

It seems to your  template for "Catch Out" is used for the manifest but the build is getting only as far as creating the Interstitial.java file and none of the the others

Any ideas why this is happening?

Strange that only the Interstitial.java file is being created in the project.???
Title: Re: Android build issues
Post by: MrPlow on 2020-Aug-04
I noticed there is a non-beta update - so I will apply this to see if this fix works...

I wish the updates were communicated a bit better...hoping this update works :)
Title: Re: Android build issues
Post by: MrPlow on 2020-Aug-04
Got it working and compiling once again :)

However, SAVESPRITE is now not working for me on android? Would the update have affected that?
Title: Re: Android build issues
Post by: dreamerman on 2020-Aug-04
Didn't use Android target for a long time, but be sure to always set current dir (probably to 'Documents') before each SaveSprite command,
If that's not an issue, does it affect both *bmp and *png saving? v16 has some bugs, maybe this is some new one :/
Title: Re: Android build issues
Post by: MrPlow on 2020-Aug-06
Not sure - I tried Appdata with older build and that worked...

I might try a work around....build my own savesprite function maybe?
Title: Re: Android build issues
Post by: dreamerman on 2020-Aug-06
Not sure how access privileges now work in Android but easiest way to verify that would be trying to save any kind of file with OpenFile / OpenIni in that directory, that's first thing to check, even double check for other directories like mentioned Documents and so on.
Custom saving sprite function - as bmp is simple (https://www.glbasic.com/forum/index.php?topic=10789.0), but as png wuld require to work with some compression library like zlib.
Another solution could be using directly Android API to make screenshots, that would be in Java and called from GLB.
Title: Re: Android build issues
Post by: MrPlow on 2020-Aug-06
hmm,
yes a few options there...Good idea, I will check that the ini file writes first - before I invest in a savesprite function :)
Title: Re: Android build issues
Post by: spacefractal on 2020-Aug-08
its around 1 month ago last time im have uploaded it. and have barely touched it since. There was a change to the Interstitial.java, build.grandle and sdlactivity.java as well (as interstitial was inited in wrong place and might got catched by a resolution change), but should take a look.

The change for a month ago was its was possible to detect you do a debug or a retail version, etc if you running a debug version, you should get test ads, but retail ads for retail. This is how its should works, so you dont suddently got your account closed under testing.

But if you dont get the new java copied over. delete the android.xcl from the java folder, and then its should copy all files from the main project. If you have the file, No java files is copied over when that file is present.

No idea about SAVESPRITE and no idea without a example.

Currectly im did do have focus in very different place and its also quite hot here. etc a Frogger adaption for Spectrum Next. This why im was idle comply of days.
Title: Re: Android build issues
Post by: MrPlow on 2020-Aug-19
Hi SF

Just did a complete new build of older simple pong project...this worked before and has no complex items...

Didn't work this time, just wondering if you built a working apk recently?

I will keep testing and try the emulator to see if it runs
Title: Re: Android build issues
Post by: MrPlow on 2020-Aug-21
Am I doing something wrong - every compile of the project resets the Interstitial.java file ADMOB code to be commented out...

Title: Re: Android build issues
Post by: spacefractal on 2020-Aug-27
That strange. The official version is gernot version, which diddent do that 100 procent correctly as I'm remember.

I'd you don't want the java files in your project changed by a update, add a android.xcl to the project java folder. Then no files is overwrote.
Title: Re: Android build issues
Post by: MrPlow on 2020-Sep-14
Thanks - I will try that :)