Page 1 of 1

[See Bug Post Raised] SB 2.1 Android Deployment Fails

Posted: Mon Sep 18, 2017 1:26 am
by IdeasVacuum
Create Android App, deploy directly via USB.

Progress shows the app is created, but the deployment process quickly fails with:
ANDROID_HOME=C:\Program Files\SpiderBasic2p1\Android\android\sdk
JAVA_HOME=C:/Program Files/Java/jdk1.8.0_144/
Subproject Path: CordovaLib
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
...
Picked up _JAVA_OPTIONS: -Xmx512M
EDIT: See Bug Post: http://forums.spiderbasic.com/viewtopic.php?f=11&t=1291

Re: SB 2.1 Android Deployment Fails

Posted: Mon Sep 18, 2017 5:46 pm
by falsam
Hello IdeasVacuum

I have no problem with my Android applications and no error messages with Cordova.

:!: The JDK 1.8. 122 does not work correctly with the latest version of Cordova.

I do not use the command import "cordova telemetry on": EndImport or off

:idea: I have installed the Java SDK 1.8 144 (x86). Not x64 like you.

Re: SB 2.1 Android Deployment Fails

Posted: Mon Sep 18, 2017 7:22 pm
by IdeasVacuum
Hi falsam

Yeah, I had no deployment issues before SB2.1

I am also using x86, not x64, I'm on Windows 7 x86.

So, I'm just uninstalling everything Spider Basic and then re-installing - in case SB does not like my 'custom' installed path (never an issue with PB though, so I am 'clutching at straws').

Re: SB 2.1 Android Deployment Fails

Posted: Mon Sep 18, 2017 10:54 pm
by IdeasVacuum
So, failure the same:
ANDROID_HOME=C:\SpiderBasic\Android\android\sdk
JAVA_HOME=C:/Program Files/Java/jdk1.8.0_144/
Subproject Path: CordovaLib
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
...
Picked up _JAVA_OPTIONS: -Xmx512M
...with SB now installed in C:\SpiderBasic and not Program Files
Now, I can deploy a very small test file, 21 lines consisting of a window and a button (does not work properly!), but I cannot deploy the app I'm working on, which is only 1008 lines at the moment. The prototype of the app (for testing various gadgets and ease of use) was about 600 lines and deployed perfectly well with SB2.0. Seems like there is some sort of dependency issue?

Re: SB 2.1 Android Deployment Fails

Posted: Mon Sep 18, 2017 11:09 pm
by falsam
falsam wrote:I have installed the Java SDK 1.8 144 (x86). Not x64 like you.
;)

Re: SB 2.1 Android Deployment Fails

Posted: Mon Sep 18, 2017 11:16 pm
by IdeasVacuum
...Found the cause :roll:

Create App/Android/Orientation/Portrait (Fullscreen selected)

...if set to "any" (which is not suitable for the app), deployment works.

So, apparently an SB bug.

Can someone try this test code with the above settings?
I also see an issue with exiting an app - the window goes but the app screen/background stays and the User is not returned to the previous screen.......something seen before that was fixed with

Code: Select all

!window.close()
but does not want to work with SB2.1

Code: Select all

EnableExplicit
CloseDebugOutput()

Enumeration
#Win
#BtnExit
EndEnumeration

Procedure Exit()
  CloseWindow(EventWindow())
  !window.close()
EndProcedure

  If OpenWindow(#Win, 0, 0, 220, 80, "", #PB_Window_BorderLess|#PB_Window_ScreenCentered)

              ButtonGadget(#BtnExit, 10, 20, 200, 40,"Exit")

           BindGadgetEvent(#BtnExit, @Exit(), #PB_EventType_LeftClick)

  EndIf

Re: SB 2.1 Android Deployment Fails

Posted: Mon Sep 18, 2017 11:20 pm
by IdeasVacuum
falsam wrote:I have installed the Java SDK 1.8 144 (x86). Not x64 like you.
Oh no I didn't! :mrgreen: I'm on 32bit OS, so there is only 'Program Files', not 'Program Files (x86)'......

Re: SB 2.1 Android Deployment Fails

Posted: Mon Sep 18, 2017 11:28 pm
by aonyn
Last android build I did, shortly after 2.1 gave me problems building.
It has been a while, but I think it was orientation that was causing trouble. I had to use orientation.any, even though the app was designed for landscape.
Also, I think I may have had to use fullscreen=true.

If my memory serves correctly, when I tried to build without the above settings, it gave me an error message which implied that it was getting confused with iOS output even though I was using the android target.

Regards,
Dave

Re: SB 2.1 Android Deployment Fails

Posted: Mon Sep 18, 2017 11:32 pm
by aonyn
Here is a previous post about the problem I just mentioned, in which I am the second to last post.
I posted in this thread after Fred had marked it done.
The problem still exists unfortunately.

http://forums.spiderbasic.com/viewtopic.php?f=11&t=1145

Regards,
Dave