Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.

Black screen when deploing to android

Black screen when deploing to android

Anonymous
Not applicable
4,134 Views
16 Replies
Message 1 of 17

Black screen when deploing to android

Anonymous
Not applicable

Hi.

 

I deploy to android using Scaleform SDK 4.4 and Scaleform Mobile Deployer

Settings: jdk 1.8, ant 1.9.4, ndk r8e

 

It creates apk and sends it to the devices successfully but when i run it i see just nothing. Looks like the swf is not loading.

 

I tried to launch both Scaleform example (scaleform_4.4_android\Resources\AS3\CLIK\demos\ScrollingList_MainDemo.swf) and own swf (creating 20 bitmaps and placing them on white background)

 

I use evaluation key (just kreated). Is there any solutions for the issue?

 

Thanks.

Reply
Reply
0 Likes
Accepted solutions (1)
4,135 Views
16 Replies
Replies (16)
Message 2 of 17

Anonymous
Not applicable

Same here!!!

No complilations errors (as you can see the attached file), but... Black screen, and I can't show the debug window...

 

My settings: Scaleform 4.4 (Perpetual License), jdk 1.8, ant 1.9.4, ndk r9d

 

This project works perfect with Scaleform 4.2 (and Android 4 or below). I spend 3 days making changes and trying everithing, but nothing works fine.

Any advice, please?

 

 

Scaleform Mobile Deployer screenshot:

scaleform-mobile-deployer.png

Reply
Reply
0 Likes
Message 3 of 17

adjm
Alumni
Alumni

Hi Azicuetano,

 

Sorry for the trouble you are having and thank you for providing all the necessary details.  I believe your issue is because of your use of JDK8.  According to Google JDK7 is still required (which is an improvement over their previous long time requirement of JDK6):

 

http://developer.android.com/sdk/index.html#Requirements

 

which still can be obtained from Oracle here:

 

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

 

JDK8 brought a lot of exciting new features to Java but along with it many API breaking changes.  Let's hope Google is able to move to it before they stop updating JDK7 in April 2015.

 

Thanks,

 

Jeremy

Scaleform Engineering

Reply
Reply
0 Likes
Message 4 of 17

Anonymous
Not applicable

Thanks for the tip.

Changed it to 1.7 and still experiencing the same black screen after deployment.

Reply
Reply
0 Likes
Message 5 of 17

Anonymous
Not applicable

Thank you very much for your help Jeremy.
Unfortunately, I tried your advice but still not working. I get the sane black screen.
New settings: Scaleform 4.4 (Perpetual License), jdk 1.7.0_75, ant 1.9.4, ndk R9D:

 

scaleform-mobile-deployer-2.png

You can see the complete log attached.

 

Thank you very much for your time, Jeremy. Tell me if I must send you more info about this, please. I hope you can help us to solve this issue...  -_-' 

Reply
Reply
0 Likes
Message 6 of 17

Anonymous
Not applicable

Hello again.

I spent all night running tests of all kinds (admittedly, I'm pretty desperate) and I've made some discoveries that I think are relevant.

Initially started testing our project we have in development, but found errors when copying the contents of certain folders that we use to contain other swf files, mp3, etc. So we decided to test a simple swf. This swf works well with Scaleform 4.2 and include it as an attachment to this post.

 

* We are creating a new application from 0 to android with "Scaleform mobile deployer".
** Settings: Windows 7 / 64bit, Scaleform 4.4 (Perpetual License), jdk 1.7.0_75, ant 1.9.4, ndk R9D. Build configuration: Debug.
*** Compilation wihout errors.

 


1) Devices for testing.
  a.- FNAC Tablet with android 4.0.4
  b.- Mobile BQ Aquiarius E5 with android 4.4
  c.- Mobile Nexus 5 with android 5.0.1

 

2) In my first test:
  a.- black screen with error: ".. Failed to open the license file gfx Please make sure sf_consumer_license_android_mobil.txt exist in the working directory Error: 16" (the phrase is cut and is not completely error number.
  b and c.- black screen.

 

3) After inserting the key in "GFx_SetEvalKey"
  a.- run a swf, swf but not the content within our apk, but a different swf used in past studies, which was located in / sdcard /
  b and c.- black screen.

 

4) After including the swf used for testing (attached in this post) in / sdcard /
  a.- load the swf located in / sdcard /. works correct (as with Scaleform 4.2).
  b and c.- black screen.


* In all cases, it has been possible to show the debug window:
Screenshot_2015-03-06-10-15-42.png

 

My thoughts:
- It is surprising behavior we have in our device "a", compared to devices "b" and "c"... Why my a device is looking for flash.swf file on /sdcard/ like FxPlayer?

- Everything seems to be a problem to find the file "flash.swf"...

 


Please @adjm, we need your help :'-(  I wil try anything you tell me.

Thank you very much in advance!

Reply
Reply
0 Likes
Message 7 of 17

Anonymous
Not applicable

I don't have the 4.4 version for android, but experienced some weird thing with the wp8 one...Anyway

 

Could you show the apk content directories? Seems like is not finding the correct swf.

 

What does the logcat tell you? It can be really useful to see it.

 

One thing I noticed is that the main .cpp file is not the FxShippingPlayer anymore (at least in wp8), however you can still use the old one, try to use it.

 

Reply
Reply
0 Likes
Message 8 of 17

Anonymous
Not applicable

Thanks for your advices dani_mrquez!

 

This is the apk content:

Captura.JPG

 

I see nothing extraordinary.

But I still believe that the app is not able to load flash.swf. I used AMP, and have proven how only fxplayermini.swf is loaded, and no other swf (as in previous versions of Scaleform):

Captura2.JPG

 

I only use "Scaleform Mobile Deployer" to create the our app. Ihave never been able to compile successfully or emulate an example with Eclipse... I can not access to "logcat"... I will investigate what you say about "FxShippingPlayer".

 

To many thanks Dani!!!!

Reply
Reply
0 Likes
Message 9 of 17

adjm
Alumni
Alumni

Sorry for the delay here guys, our offices were closed yesterday due to Winter Storm Thor.

Let me establish a few basics for starters:

 

Clean Slate

When troubleshooting issues with the Scaleform SDK, it's often helpful to start with a clean slate, at least for testing purposes.

Please download the latest Scaleform 4.4 Mobile SDK from here and extract it into a new empty directory:

http://gameware.autodesk.com/trials

Don't forget to copy/create the sf_consumer_license_android_mobile.txt file with your license and place it in the Bin directory.

 

Two Players

There are two different players available as part of the Scaleform SDK:

1) FxPlayerShipping

  • Purpose - A commercially shippable Scaleform based player
  • Source Files - scaleform_4.4_android\Apps\ShippingPlayer\FxShippingPlayer.*
  • Built by - The Deployer
  • Assets loaded via - Android Asset Manager (assets:// on device which is equivalent to the "assets" folder within your APK)
  • APK Location - e.g. scaleform_4.4_android\LocalApps\Example\Android\Example.apk

2) FxPlayerMobile

  • Purpose - Quickly testing out content
  • Source Files - scaleform_4.4_android\Apps\Samples\FxPlayerMobile\FxPlayerMobile.*
  • Built by - Make on the command-line
  • Assets loaded via - /sdcard on device
  • APK Location - e.g. scaleform_4.4_android\Bin\Android\armeabi-v7a\FxPlayerMobile_Release_NoRTTI-debug.apk

 

Android Device Monitor & logcat

It's a good idea to familiarize yourself with the tools available as a part of the Android SDK.  One such tool is the Android Monitor app that allows you to see color coded and filterable output of Android "logcat" which is similar to Windows EventLog or Linux's dmesg.  It is your gateway to lots of debugging information about what might be going wrong with anything running on an Android device:

http://developer.android.com/tools/help/monitor.html

You can also launch the tool directly from Windows Explorer by double-clicking:

"<path to Android SDK>\android-sdk-windows\tools\monitor.bat"

 

Black Screen

There are two major causes of black screens when launching the mobile player:

1) The license key/file was not found or was entered incorrectly

To verify this isn't the issue, please double-check the file sf_4.x_mobile_readme_android.pdf for proper instructions on either using the GFxSetEvalKey in source method, or pushing the same license file you are using for the tools to the device.

2) The Player could not locate or load the requested SWF file

The best way to troubleshoot this once you've verified #1 is to build the Debug Build Configuration with the Deployer and install/run it on a test device.  (we want Debug because it provides the most debug logging).  So now you will want to launch the Android Device Monitor (see above) and then create a filter on the lower left-hand side for "GFx":

DDMS.png

Then Select "GFx" under "Saved Filters" and you should have a list on the right of all the debug output from Scaleform:

 

DDSM2.png

 

You can copy/paste a section of the logcat output into this thread by first clicking on the top line you want to include, hitting the "Shift" key, then clicking on the last line you want to include.  Please try to isolate the relevant information in the log instead of copy/pasting the entire thing as it can be quite lengthy (or at the very least add it as a text file attachment).

 

In my next post, I will try to ascertain which issue is occuring in each of your cases, but I wanted to get this up first so you guys could work in parallel.

 

Reply
Reply
0 Likes
Message 10 of 17

adjm
Alumni
Alumni

Hi again guys.  First I just wanted to say, while the above information can be incredibly useful for future troubleshooting, upon further inspection it looks like the issues you are currently having might be related to a bad merge when we updated the Deployer code.  I sincerely apologize for the inconvenience this may have caused.  I am personally investigating the root cause and will post back when I have an update.  We've already prepped an updated package with fixes for MultiTouch & the r10d NDK, and once we get to the bottom of this we will roll in the fixes and being posting it ASAP.  Hang tight!

Reply
Reply
0 Likes
Message 11 of 17

adjm
Alumni
Alumni

Hi guys, please check your PM inboxes before your sign off for the weekend.  Have a good one!

 

Thanks,

 

-Jeremy

Reply
Reply
0 Likes
Message 12 of 17

Anonymous
Not applicable

Hello Jeremy
first of all, thank you very much !!! These advances would not have been possible without your help!! 🙂

 

My teammates and I have carefully studied all your advice and we have used the fix you indicate to us in your last post.

A: The good news is that now work the simple example I publish before 🙂

http://forums.autodesk.com/t5/scaleform-mobile-development/black-screen-when-deploing-to-android/m-p...


B: The bad news is that do not works a slightly more complex example, where the flash.swf loads another swf file located in the relative directory "/data/".

I give you more info about this problematic case:

 

 

1.- To our surprise, using "monitor" (thanks for your advice!) we can see this error happen loading "flash.swf", not trying to load the second swf file "/data/intro.swf". However, the simple example A works perfectly and flash.swf is loaded without problems. This is the logCat info form our problem:

 03-09 16: 54: 08,702: I / GFX (25473): Warning: Failed to load assets: //flash.swf

2.- We don't know if it's related, but since we use Scalefomr 4.4, the step of include directories in our project does not work from Deployer. We always throws an error of this type (see below screenshot). We had not given importance and we copied the files by hand. In this way, the next time we try to do deploying, everything worked well and did not give error copying files. But, as I say before, I don't know if this is related with our problem...

 

screenshot-deployer-3.jpg

 

3.- This is "/assets/" content from our APK. Inside "/data/" there is a swf loaded by flash.swf.

screenshot-apk.jpg

 

4.- Finally, I've attached to this post our swf files used in this test.

- flash.swf

- /data/quizzers_intro.swf

 

 

Any advice on what I should do or try? Do you think that the problem detailed in the point 2) is relevant?

Thanks for your support, Jeremy!!

 

Reply
Reply
0 Likes
Message 13 of 17

adjm
Alumni
Alumni

Yes, getting an error when you are trying to deploy is super relevant Smiley Wink.  I'm not sure whick APK you installed after getting that error, but due to the error a new one would never have been built.

 

So it looks like you've uncovered another bug having to do with adding entire directories within the Deployer (which was present in the old versions as well but apparently never reported).  For now as a workaround, could you try adding each file in that subdirectory individually like you added the main flash.swf.

 

Please let me know if that gets you building without error, and then the results.  I will get to work on fixing the bug!

 

Thanks,

 

-Jeremy

Reply
Reply
0 Likes
Message 14 of 17

Anonymous
Not applicable

Hi Jeremy,

We greatly appreciate your help to solve this problem !! 🙂

 

We have carefully followed your latest tips and applying the most recent fix, and these are the new findings:

 

1) We made a test with the final version of our app.

Now, when we make a deploying selecting multiple directories ("/ data / *", "/ conf / *", "/ audio / *") we check as all files in these directories are included within the APK file, but all are inside "/assets/". That is, our directory structure is not recreated in /assets/. Moreover, with the "monitor" tool we check as it gives an error loading "flash.swf":

 

September 3 to 10: 56: 01,492: I / GFX (8906): initialize
September 3 to 10: 56: 01,496: I / GFX (8906): register: 0
September 3 to 10: 56: 01,560: I / GFX (8906): Warning: OpenAssetFile: flash.swf not found
September 3 to 10: 56: 01,561: I / GFX (8906): Error: failed to open Loader 'assets: //flash.swf'
September 3 to 10: 56: 01,561: I / GFX (8906): Warning: Failed to load assets: //flash.swf
September 3 to 10: 56: 01,566: I / GFX (8906): register: 2

 

2) We perform a simple test, using only the intro of our app (a simple animation with a short melody):

In this case everything works fine. "flash.swf" is loaded smoothly and everything runs as expected except it does not sound anything. We can see the following error related with our melody "jingleCayro" using the "monitor" tool:

 

October 3 to 10: 04: 37,538: I / GFX (10858): initialize
October 3 to 10: 04: 37,542: I / GFX (10858): register: 0
October 3 to 10: 04: 37,639: I / GFX (10858): Loading asset flash.swf: start 1140 size 51934
October 3 to 10: 04: 37,641: I / GFX (10858): Loading asset flash.swf: start 1140 size 51934
October 3 to 10: 04: 37,656: I / GFX (10858): Error: can not find SymbolClassLoader With Resource id = 1 name = 'jingleCayro'
October 3 to 10: 04: 37,665: I / GFX (10858): Socket: Could not associate local address (port 7534) With listener socket. Error 98

 

3) We made another simple test using a single swf. In this case, it is the main file of our app, which is responsible for loading the intro and the other sections dynamically. It's the same "flash.swf" file that was used in Test 1), but in this case have not been incorporated more files when deploying. Again, we get the same error than test 1):

 

September 3 to 10: 56: 01,561: I / GFX (8906): Error: failed to open Loader 'assets: //flash.swf'

 

4) We perform more tests, using a single swf file. In this case, we tried in the "main menu" of our app, and the "game" itself.

- The "main menu" works, but without sound buttons, the same error mentioned in 2)

- The "game" does not work. Same error mentioned in 1) and 3).

 

 

At this point, we note two very interesting things:

a: We have different flash files that give error when trying to be loaded as master files "flash.swf".

b: No sounds work embedded in the flash library, such as the jingle that plays in the intro, or the sounds of the buttons on the main menu.

 

I've sent you a PM with the files involved in these tests. We hope that this info and tests help you to solve these problems...

We are open to any suggestions or to try any new test. Thank you very much in advance, Jeremy!!!!!!!!!

Reply
Reply
0 Likes
Message 15 of 17

Anonymous
Not applicable

Hello again Jeremy,
We've been all day making tests of all kinds. These are the conclusions we have reached:

 

1. There are certain types of .swf that the app does not load. We have not found what may be the patron. We have made tests using a single flash.swf file. Some .swf files are loaded and other .swf files are not loaded. The error is always like:.

03-11 17:49:52.019: I/GFx(15904): Warning: The method class_::SecurityDomain::currentDomainGet() is not implemented
03-11 17:49:52.019: I/GFx(15904): Warning: The method allowDomain() is not implemented
03-11 17:49:52.023: I/GFx(15904): Warning: OpenAssetFile: quizzers_juego.swf not found
03-11 17:49:52.023: I/GFx(15904): Error: Loader failed to open 'assets://quizzers_juego.swf'

 

2. Using the source file (.fla) that works, we have modified performing copy/paste of frames from another flash that works, and we get a working swf file that do what we want... 

 

3. Making conversions as described in 2) we've get examples of a flash.swf loading other swf files (intro, main menu, etc.).

 

4. When a single .swf does not work, this file does not work if this file is loaded from another swf that works.

 

5. We can't:
a.- Play sounds contained in the .fla (mp3 With ActionScript linkage).

03-11 17:49:43.071: I/GFx(15904): Error: SymbolClassLoader can't find Resource with id = 2, name = 'bPrincipalEntra'
03-11 17:49:43.071: I/GFx(15904): Error: SymbolClassLoader can't find Resource with id = 1, name = 'bPrincipalSale'

b.- Load and play external .mp3 (not appreciate any specific error with the "monitor" tool.

We don't know if this issue is due to our sound manager library "TreeFortress": https://github.com/treefortress/SoundAS But it works in 4.2 version.

 

6.- We don't can't load external XML. The monitor tool tells us:

 

03-11 17:30:59.054: I/GFx(12101): Warning: OpenAssetFile: cayro_data.xml not found
03-11 17:30:59.054: I/GFx(12101): Error: Loader failed to open 'assets://cayro_data.xml'

 

We hope that these tests will help you find the origin of these strange behaviors.

Too many thanks Jeremy!!

Reply
Reply
0 Likes
Message 16 of 17

Anonymous
Not applicable

Hi, Jeremy.

Still experiencing the same black screen.

Please check your PM for details

Reply
Reply
0 Likes
Message 17 of 17

adjm
Alumni
Alumni
Accepted solution

Hi Guys,

 

Just to follow up here, there is a just about finalized patch over at the top of this thread that addresses all currently known issues for Android:

 

 

http://forums.autodesk.com/t5/scaleform-mobile-development/scaleform-4-4-mobile-sdk-android-deployer...

 

Once I get confirmation on the Mac OS X Deployer, we will be releasing an updating Android packages including all of the fixes.  Thanks again for your patience with this.

 

Jeremy

Scaleform Engineering

Reply
Reply
0 Likes