Android - V10 release candidate

Previous topic - Next topic

Kitty Hello

main_rules.xml:271: <-- no android device is connected - or - no developer mode was enabled on the device.

matchy

Quote from: Dabz 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

#47
As you all know, I've tried it on Windows XP (32 bit) SP3 and Windows 7 (64 bit) SP 1

Quotemain_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 ?

Dabz

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

Wonder why mine dont - ironically the Windows 7 manages to get much further than XP (which fails more or less straight away) :)

Kitty Hello

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

#51
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...

Dabz

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

Dabz

#53
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

MrTAToad

#54
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 :)

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


Dabz

Quote
can take a while

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

MrTAToad

#56
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...

MrTAToad

#57
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]

matty47

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

#59
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...