Android Error

Previous topic - Next topic

bigsofty

Messing around with an Android emulator, so I need some APKs, I set the Java and Android SDKs also set up the system vars for the paths but I get this with an Android compile...

Code (glbasic) Select
_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.074 SN:114ddfeb - 3D, NET
Wordcount:119 commands
compile+link:
Can't load image: Z:\Projects\GLBasic\Samples\_Projects_\Arkanoid\icon.png
BUILDSRIPT
BUILD STAGE 1: Compile and pack
     [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...

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:310: null returned: 1

Total time: 1 second
BUILD STAGE 2: Install on device
     [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...

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:310: null returned: 1

Total time: 1 second
Android=Z:\Projects\GLBasic\Samples\_Projects_\Arkanoid\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 11.1 sec. Time: 13:06
Build: 1 succeeded.


This looks suspicious...
Code (glbasic) Select

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:310: null returned: 1
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

open that file and read what it tires to do there, please. My Android configuration changed yesterday, so I can't check.

bigsofty

Code (glbasic) Select
    <!-- Generates the R.java file for this project's resources. -->
    <target name="-resource-src" depends="-dirs">
        <if condition="${manifest.hasCode}">
            <then>
                <echo>Generating R.java / Manifest.java from the resources...</echo>
                <aapt executable="${aapt}"
                        command="package"
                        verbose="${verbose}"
                        manifest="AndroidManifest.xml"
                        androidjar="${android.jar}"
                        rfolder="${gen.absolute.dir}">  <---------------------------- Line 310 -->
                    <res path="${resource.absolute.dir}" />
                </aapt>
            </then>
            <else>
                <echo>hasCode = false. Skipping...</echo>
            </else>
        </if>


BTW this is all a first for me, so chances are I may be doing something 'silly' to prompt this error.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Gary

Im not certain but I am sure I saw a q drive error when I didnt have the paths set correctly. It seemed to use Q as a default path. I would check you have all paths are as per the manual.


bigsofty

I'll check but the strange thing is, every now and then, I get a compile, without errors?
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

GLBasic makes a temp drive "Q:" that links to C:\program files (x86)\GLBasic, so you don't have spaces in the compiler paths.
You can make a Q drive yourself and start GLBasic from there to check if that's the issue.


bigsofty

OK, many thanks Gernot, I think all my paths are fine but still an error. I think it will try to re-install the SDKs and see how I get on.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Hatonastick

#7
Oddly enough I'm getting the exact same error.  I compiled and installed Hello World just fine, but so far I've tried the 3D examples Shadows and ObjectCreation and gotten the same error as posted here.  Got a couple of ideas, going to try them.

Edit:  Ok this is really, really odd.  I made a project, called it AndTest.  It's a copy of the source to the sample Hello World.  It compiles and installs (it's the one I mentioned in another thread) absolutely fine every time.  Now guess what happens when I try compiling the original Hello World sample?  The error message posted here, every single time.

Now here's the thing.  The 3D project sample Shadows gives that error whenever I try to compile it for Android, however if I create a new project for it and copy the source over it compiles just fine.  I've tried this with two projects from the Samples directory that I can't compile for Android so far, and both times they have compiled and installed fine when I create a new project.

So, I'm wondering if there's something in old project files that interferes with compiling for Android. ie. if you are compiling something using a project file that was created using a previous version of GLBasic that causes this error for some reason.  I can't think of any other explanation at the moment and I'm getting consistent results when I test this so far...
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).