Android compilation stops suddenly

daverave1212

  • Posts: 21
Hello,

I've been trying to compile a game for Android for testing purposes and I haven't managed to do it.
I created a new blank game with just a scene and an actor. No scripts, no extensions.

The game compiles and works if I build for Flash.
Once I swap for Android in the upper right corner, it shows "Compiling" for a few seconds, then stops and returns back to the game without any message on the screen or anything, and nothing else seems to happen.
I checked the logs but I can't really tell what's going on, though I think the game may have compiled.

If I remember correctly, I am supposed to see the "Sending to device" message after compilation.

I don't know what else to do.

Here are some useful specifications:
- I tried to reinstall Stencyl on another hard drive
- I tried to change the workspace folder to one with smaller path size (I saw online that it might fix it)
- I am on Windows 10, x64
- The phone attached to the computer is recognized by the computer and is a Samsung J5 with Android 8
- I am running Stencyl as administrator
- I gave the game a unique App ID (Game Settings > Mobile)
- The Android Minimum Version I use is API 14 - 4.0 (Ice Cream Sandwich)
- The Android Target Version is API 29 - Android 10
- I use JDK 12.0.2
- I have setup an Android certificate

I attached the logs below (probably the latest text file is the correct one). If someone can help me, I would be very grateful!

Luyren

  • *
  • Posts: 2421
It says here build sucssesful, but I don't see in your logs that Stencyl recognized your device. Check if for some reason the game isn't installed into your device. Other than having your device connected before you start Stencyl, I don't have much to suggest. Someone with more knowledge might be able to chime in later.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

Justin

  • *
  • Posts: 4530
Right, after "List of devices attached" in the logs, I see no output, so it seems the device isn't detected. Note that being detected by the computer itself isn't enough. It needs to be detected by adb (android debug bridge), the software that's used to communicate with the device for development purposes. You may need to change some settings on the android or install some drivers on the computer.

See "Step 1: Set up your Device" in the Getting Started with Android Stencylpedia article.


To be able to immediately confirm when the device is recognized, in Stencyl, go to File > Preferences > Features, and enable Device Manager. Then, every time you open Stencyl, and again every 30 seconds after that, it checks if there have been any changes to what devices you have connected.

With the feature enabled, open the log viewer, and be on the lookout for something like this:

Code: [Select]
13:07:19,813 Found new device:
LGMV300Kf6761c6f
LGE LGM-V300K, SDK 28

When you see that, you can test your game and Stencyl will be able to see your device and install to it.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

daverave1212

  • Posts: 21
It says here build sucssesful, but I don't see in your logs that Stencyl recognized your device. Check if for some reason the game isn't installed into your device. Other than having your device connected before you start Stencyl, I don't have much to suggest. Someone with more knowledge might be able to chime in later.

Hi. The game is not installed on my phone.

Right, after "List of devices attached" in the logs, I see no output, so it seems the device isn't detected. Note that being detected by the computer itself isn't enough. It needs to be detected by adb (android debug bridge), the software that's used to communicate with the device for development purposes. You may need to change some settings on the android or install some drivers on the computer.

See "Step 1: Set up your Device" in the Getting Started with Android Stencylpedia article.


To be able to immediately confirm when the device is recognized, in Stencyl, go to File > Preferences > Features, and enable Device Manager. Then, every time you open Stencyl, and again every 30 seconds after that, it checks if there have been any changes to what devices you have connected.

With the feature enabled, open the log viewer, and be on the lookout for something like this:

Code: [Select]
13:07:19,813 Found new device:
LGMV300Kf6761c6f
LGE LGM-V300K, SDK 28

When you see that, you can test your game and Stencyl will be able to see your device and install to it.

I enabled this option in Stencyl, but nothing like that shows in the log viewer.
I updated by Samsung USB Driver (and restarted) and enabled USB debugging on my phone.

It still doesn't work, but the logs seem to have changed. It seems to fail to compile now.

Here's the log: https://pastebin.ubuntu.com/p/rMkGZ446zg/

Any ideas?
Thanks!



Justin

  • *
  • Posts: 4530
Quote
java.io.FileNotFoundException: E:\Work\StencylGamesGenerated\Android Game\app\intermediates\signing_config\debug\out\signing-config.json (Access is denied)

That looks pretty bizarre to me, but apparently this is something that others have run into as well. Looks like you should be able to fix it just be deleting the file.

Regarding the android device detection, it's still not showing up. Perhaps you need to change your usb connection mode. I don't recall offhand, but I usually set my android to something like the "photo" or "media" transfer mode in order for adb to work.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

daverave1212

  • Posts: 21
Quote
java.io.FileNotFoundException: E:\Work\StencylGamesGenerated\Android Game\app\intermediates\signing_config\debug\out\signing-config.json (Access is denied)

That looks pretty bizarre to me, but apparently this is something that others have run into as well. Looks like you should be able to fix it just be deleting the file.

Regarding the android device detection, it's still not showing up. Perhaps you need to change your usb connection mode. I don't recall offhand, but I usually set my android to something like the "photo" or "media" transfer mode in order for adb to work.

Thank you so much!

I finally managed to do it. I deleted that file and now stencyl even detects my phone and successfully stream-installed the game to my phone! I don't know why it now detects my phone, I don't remember doing anything else.

I am so happy we made it work  :D

Cheers!