Android compile question

Previous topic - Next topic

Gary

I am trying to get one of the sample programs to compile to check out my android set up but I am getting the following error

Code (glbasic) Select

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.7.917 SN: 6f77911 - 3D, NET
Wordcount:64 commands
compile+link:
BUILDSRIPT
Buildfile: C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android\build.xml
    [setup] Android SDK Tools Revision 10
    [setup] Project Target: Android 2.2
    [setup] API level: 8
    [setup]
    [setup] ------------------
    [setup] Resolving library dependencies:
    [setup] No library dependencies.
    [setup]
    [setup] ------------------
    [setup]
    [setup]
    [setup] Importing rules file: tools\ant\main_rules.xml

-debug-obfuscation-check:

-set-debug-mode:

-compile-tested-if-test:

-pre-build:

-dirs:
     [echo] Creating output directories if needed...

-aidl:
     [echo] Compiling aidl files into Java classes...

-renderscript:
     [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...

-resource-src:
     [echo] Generating R.java / Manifest.java from the resources...

-pre-compile:

compile:
    [javac] C:\GLBasic_v10\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:384: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 2 source files to C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android\bin\classes
    [javac] C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android\gen\com\yourcompany\3dcollision\R.java:8: ';' expected
    [javac] package com.yourcompany.3dcollision;
    [javac]                        ^
    [javac] 1 error

BUILD FAILED
C:\GLBasic_v10\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:384: Compile failed; see the compiler error output for details.

Total time: 1 second
     [echo] Creating output directories if needed...
     [echo] Compiling aidl files into Java classes...
     [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...
     [echo] Generating R.java / Manifest.java from the resources...
    [javac] C:\GLBasic_v10\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:384: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android\gen\com\yourcompany\3dcollision\R.java:8: ';' expected
    [javac] package com.yourcompany.3dcollision;
    [javac]                        ^
    [javac] 1 error

BUILD FAILED
C:\GLBasic_v10\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:384: Compile failed; see the compiler error output for details.

Total time: 1 second
Android=C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 7.3 sec. Time: 12:41
Build: 1 succeeded.


Any ideas what it could be?

Cheers
Gary

MrTAToad

#1
It looks like the first character of a project name cant be numeric  :blink:

What version are you running, by the way ?

Gary

trust me to pick the one of the only sample programs that has a number at the start :(

using 10.054. Just tried it with a new blank project and i now have a blank icon with my project name under it on my phone :)

When v10 is due for a full release, will all the sample programs have the icons and stuff needed to compile on andriod added to them? I tried the scramble sample program but that gives an error

AndroidManifest.xml:13: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/icon)

Where do I need to set the icon stuff up on exisiting projects?

MrTAToad

The icon should be created from icon.png, but for old project it doesn't seem to currently...  Try using Clean Project before compiling though...

In which case, you need to save/find androidicon.png into the project directory.

[attachment deleted by admin]

Ian Price

Rather than create another thread -

A couple of Android owners over at RetroRemakes have requested one of my games to test on their machines.

I've got my game, which I've compiled for Android, without errors - what do I send to them? Is it just the manifest bit? And what do they need to do once they have the file? Do they need to put their devices into Developer Mode or anything (like Pre)?
I came. I saw. I played.

Gary

you should have an APK file somewhere which should contain everything you need

Gary

getting closer now, I'm getting the compile working but it doesnt look like any assets are being transferrred to the phone. I have tried copying the files to the assets folder and tried leaving it empty but both produce the same result

Gary

user error lol

The examples I was trying did not have the assets in the media folder, they were all outside it and didnt get copied