Compile for Android problem

Previous topic - Next topic

Richard Rae

I am trying to compile an Android game for my Samsung Galaxy Tab2 10.1.I think I have put everything in the right place(Java JDK,Android SDK)but when I compile it come up with the following error.

Quote_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.9.829 SN:8c0d2e73 - 3D, NET
Wordcount:64 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack RELEASE
Exception in thread "main" java.lang.RuntimeException: Failed to create Q:\Compiler\platform\android\android-sdk-windows\add-ons.
   at com.android.sdklib.SdkManager.loadAddOns(SdkManager.java:665)
   at com.android.sdklib.SdkManager.createManager(SdkManager.java:144)
   at com.android.sdkmanager.Main.parseSdk(Main.java:221)
   at com.android.sdkmanager.Main.run(Main.java:118)
   at com.android.sdkmanager.Main.main(Main.java:102)
Buildfile: build.xml does not exist!
Build failed
.
BUILD STAGE 2: Build DEBUG and install on device
Buildfile: build.xml does not exist!
Build failed
finished Android build-script.
Android=C:\Users\RICHARD RAE\Documents\GLBasic\Samples\3D\CelShading\distribute\Android
success

mentalthink

Hi Richar, I don't remember well the error, but I think it's something whit JDK x64 and JKDx32, I think you have to install the x32...

Be carufell you have to put into the System Variables, the JAVA HOME, just on it's the compiler of Java... I think the last slash it's something like /Bin/ ... But I'm not sure...

I think the best way it's look into the help, into internal GLbasic or something called like that... it's at the begin of the help, or take on the MRTatoad Book, or all her books, in them it's explained all trick of GLbasic very good explained and accurate.

Regars,
Iván J.

MrTAToad

You need to create the add-ons directory in the Compiler\platform\android\android-sdk-windows directory...

Richard Rae

How do I do this MrTaToad?

Jonás Perusquía

<HTML><BASIC><EC>
Be free and do good things

Richard Rae

Thanks for the helpful reply Jonaspm

kanonet

#6
[EDIT] Nice reply, but I removed the original posts that you are replying to - they were in the wrong place and posted several times. Ian




You saved your background as a .bmp=bitmap. But bitmaps do not support alphachannels. So you need to switch to a format that supports alphachannel like png or jpg and of cause you need to use a drawing tool that supports this too.

Im not sure if LOADBMP could handle png/jpg and if it does support alpha. If not just use LOADSPRITE+DRAWSPRITE to draw your background.

But generally i wonder why you want alpha on a background image. I mean generally a background image is the 1st image that you draw so there is nothing that you can add to its alpha. additive alpha just works when you draw one sprite over an other, but when you draw the background there is no sprite below, so alpha is pointless at this moment. If i guess correctly what you want to do, you need to have that alpha channel on all the images that you draw above the background, not at the background itself.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

MrTAToad

You would use alpha channels to allow things like parallax scrolling and what-not...

Kitty Hello

Now I have such a problem. Doh!

Code (glbasic) Select

BUILD FAILED
C:\Users\gf\Documents\SourceCode\frisch\fun\GLBasic\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:731: The following error occurred while executing this line:
C:\Users\gf\Documents\SourceCode\frisch\fun\GLBasic\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:733: The following error occurred while executing this line:
C:\Users\gf\Documents\SourceCode\frisch\fun\GLBasic\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:745: The following error occurred while executing this line:
C:\Users\gf\Documents\SourceCode\frisch\fun\GLBasic\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:249: null returned: 1


AndroidManifest.xml
Code (glbasic) Select

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.glbasic.support"
      android:installLocation="preferExternal"
      android:versionCode="1000"
      android:versionName="1.001">
    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="14" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<supports-screens android:resizeable="false"
  android:smallScreens="true"
  android:normalScreens="true"
  android:largeScreens="true"
  android:anyDensity="true" />
    <application android:label="@string/app_name" android:icon="@drawable/icon" android:debuggable="false">
        <activity android:name="org.libsdl.app.SDLActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
>
<!-- android:screenOrientation="sensor"  android:configChanges="orientation|keyboardHidden" -->
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>



Marmor

set _JAVA_OPTIONS=-Xms256m -Xmx512m
in Datei compliler/platform/android/bin/glb_build.bat eintragen.

Kitty Hello

Super! Danke. Löst viele Probleme.