BASIC

Author Topic: Android - V10 release candidate  (Read 88603 times)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10720
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Android - Beta SDK
« Reply #45 on: 2011-Apr-24 »
main_rules.xml:271: <-- no android device is connected - or - no developer mode was enabled on the device.

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1543
    • View Profile
Re: Android - Beta SDK
« Reply #46 on: 2011-Apr-24 »
You shouldnt need Eclipse... Anyone trying to build their app using it is wrong!Dabz

How so?  8)

It's what I stumbled across to get it going. Although it's just a fast track to testing functions, until I work out the usb in glb compile.  ;)

MrTAToad

  • Guest
Re: Android - Beta SDK
« Reply #47 on: 2011-Apr-24 »
As you all know, I've tried it on Windows XP (32 bit) SP3 and Windows 7 (64 bit) SP 1

Quote
main_rules.xml:271: <-- no android device is connected - or - no developer mode was enabled on the device.
Sounds like a device must be connected to compile then - which unfortunately rules out my current tablet...  Unless I get a USB to RJ-45 cable :)

Would it be possible so that compilation isn't dependant on a machine being present ?
« Last Edit: 2011-Apr-25 by MrTAToad »

Offline Dabz

  • Mr. Polyvector
  • ***
  • Posts: 104
    • View Profile
    • BambooCoder
Re: Android - Beta SDK
« Reply #48 on: 2011-Apr-25 »
Quote
Sounds like a device must be connected to compile then

I can compile for an AVD, I've done it... I've tested all screen resolutions under the emulator, plus, a running a 160DPI version of Nags... If I couldnt run a GLBasic app in the emulator, then I wouldnt of mentioned it... I'm probably the biggest fan og GLBasic+Android, I want it in... No questions, I've sent Gernot the APK file and everything... This does work on my machine!!!

Quote
You shouldnt need Eclipse... Anyone trying to build their app using it is wrong!

How so?

Because I've never need to use Eclipse for GLBasic apps... Eclipse is an unzip and be done IDE, as far as I know, it doesnt touch the registry, it makes no assumptions of work places... Its basically WYSIWYG.... This is why... You dont need it!

Dabz



MrTAToad

  • Guest
Re: Android - Beta SDK
« Reply #49 on: 2011-Apr-25 »
Wonder why mine dont - ironically the Windows 7 manages to get much further than XP (which fails more or less straight away) :)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10720
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Android - Beta SDK
« Reply #50 on: 2011-Apr-25 »
in compiler/platform/android/bin, there's a file glb_build.bat
There's a line:
call "%ANDROIDSDK%\tools\ant\bin\ant.bat" install -q

change that to
call "%ANDROIDSDK%\tools\ant\bin\ant.bat" debug

-> It should build the APK without a device now.

MrTAToad

  • Guest
Re: Android - Beta SDK
« Reply #51 on: 2011-Apr-25 »
Okay, I'll give that a go!

Much more info now : [aapt.exe] C:\Users\Nicholas\Documents\GLBasic\Utilities\Plasma\android\AndroidManifest.xml:8: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/icon').

The manifest file contains :

Quote
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.YOURCOMPANY_LOWERCASE.APPNAME"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" />
   <uses-permission android:name="android.permission.INTERNET" />
    <application android:label="@string/app_name" android:icon="@drawable/icon" android:debuggable="true">
        <activity android:name="org.libsdl.app.SDLActivity" android:label="@string/app_name" android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

Got it compiling now!  Turns out a new project had to be created - the one I was using (a V8 one) didn't have all the needed details...
« Last Edit: 2011-Apr-25 by MrTAToad »

Offline Dabz

  • Mr. Polyvector
  • ***
  • Posts: 104
    • View Profile
    • BambooCoder
Re: Android - Beta SDK
« Reply #52 on: 2011-Apr-25 »
My AndroidManifest.xml file:-

Code: GLBasic [Select]

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.denathorngames.nagsheeddarts"
      android:versionCode="1"
      android:versionName="1.0">
          <supports-screens android:resizeable="false"
                  android:smallScreens="true"
                  android:normalScreens="true"
                  android:largeScreens="true"
                  android:anyDensity="false" />
    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" />
        <uses-permission android:name="android.permission.INTERNET" />
    <application android:label="@string/app_name" android:icon="@drawable/icon" android:debuggable="true">
        <activity android:name="org.libsdl.app.SDLActivity" android:label="@string/app_name" android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>
 

Though, please note, I've added the section:-

Code: GLBasic [Select]
<supports-screens android:resizeable="false"
                  android:smallScreens="true"
                  android:normalScreens="true"
                  android:largeScreens="true"
                  android:anyDensity="false" />
 

Manually!

Dabz

Offline Dabz

  • Mr. Polyvector
  • ***
  • Posts: 104
    • View Profile
    • BambooCoder
Re: Android - Beta SDK
« Reply #53 on: 2011-Apr-25 »
Quote
Got it compiling now!  Turns out a new project had to be created - the one I was using (a V8 one) didn't have all the needed details...



:)

Seriously, I'm pleased you got it working MR T! <----- I aint going on no areoplane! :P Hehehe

Dabz
« Last Edit: 2011-Apr-25 by Dabz »

MrTAToad

  • Guest
Re: Android - Beta SDK
« Reply #54 on: 2011-Apr-25 »
Thats how I worked out it was the project contents causing the problem - note that in mine, the company fields aren't filled in.

Works fine on my tablet  :happy: I have to go through the network and install by copying from my machine to the tablet, which, as the screen is unresponsive, can take a while  :glare:

Would be handy if someone (ie Kitty :) ) did a V8 -> V9 project converter :)

Quote
eriously, I'm pleased you got it working MR T!
Same here too :)

« Last Edit: 2011-Apr-25 by MrTAToad »

Offline Dabz

  • Mr. Polyvector
  • ***
  • Posts: 104
    • View Profile
    • BambooCoder
Re: Android - Beta SDK
« Reply #55 on: 2011-Apr-25 »
Quote
can take a while

I've found first load takes some doing, but afterwards,the app loads pretty quickly..

MrTAToad

  • Guest
Re: Android - Beta SDK
« Reply #56 on: 2011-Apr-25 »
I meant that the screen is unresponsive - the loading time is pretty okay.

Further to the error message I was getting (Error: No resource found that matches the given name (at 'icon' with value '@drawable/icon')), the problem is cause due to the fact that icons are only created when a project is created...
« Last Edit: 2011-Apr-25 by MrTAToad »

MrTAToad

  • Guest
Re: Android - Beta SDK
« Reply #57 on: 2011-Apr-25 »
Testing on my Vector Editor program.  As previously stated, blue lines aren't being draw (or perhaps are the wrong colour - ie, black :) )

Grey rectangles are coming out white...

Now got a stylus for my tablet - works much better now!

I've included a picture of how it should look and what it does look like

[attachment deleted by admin]
« Last Edit: 2011-Apr-25 by MrTAToad »

Offline matty47

  • Mr. Drawsprite
  • **
  • Posts: 69
    • View Profile
    • Matt and Marg's Homesite
Re: Android - Beta SDK
« Reply #58 on: 2011-Apr-26 »
Not sure but it looks like the build fails - even though the compiler returns with a success notification. All seems to go well until the following
Code: GLBasic [Select]
-dex:
     [echo] Converting compiled files and external libraries into C:\Users\mattk\Documents\GLBasic\MyProjs\TEXTURED_POLYGON\android\bin\classes.dex...
    [apply] Error occurred during initialization of VM
    [apply] Could not reserve enough space for object heap
    [apply] Could not create the Java virtual machine.

BUILD FAILED
D:\GLBasic_Beta\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:472: The following error occurred while executing this line:
D:\GLBasic_Beta\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:203: apply returned: 1

Total time: 4 seconds
Android=C:\Users\mattk\Documents\GLBasic\MyProjs\TEXTURED_POLYGON\android
success
_______________________________________
*** Finished ***
Elapsed: 12.0 sec. Time: 09:47
Build: 1 succeeded.
 
I am on Win 7 Home Prem. 64 bit with Java SDK (32 bit). I do have the Android SDK and Ant also separately installed however neither of these are set as environmental variables so I don't think they are being used.
Any ideas?
Thanks
Matthew
 

MrTAToad

  • Guest
Re: Android - Beta SDK
« Reply #59 on: 2011-Apr-26 »
Make sure that the ANDOID_SWT system variable is set.  Might be worth activating verbose mode too - see Kitty's post about that.

And if its an old project, it will fail due to the fact that the android icon isn't present...
« Last Edit: 2011-Apr-26 by MrTAToad »