No bridging / no bundling to android (RESURFACED)

Hello everyone,

I am having a number of issues with Android development. I am consulting you to know if I should make a bug report or if the issue is known or if the problem is on me. First issue is with the bridge app feature. When trying to build on my device via WiFi, my app crashes and I get the following error :

 FATAL:ENGINE: Unable to load project file: 'http:// [IP ADDRESS] /build/game.projectc' (-1)

Therefore I wanted to try using another bridge app, so I tried to build it but it did exactly what I described some times ago here : Failed compiling Android resources (1.3.0) the wierd thing being that I can actually bundle the main project I work on (the one I cannot bridge to)

More info :

  • I tried going to the newest version (1.4.1) but bundling failed due to the Rive native extension
  • I tried going back to 1.3.7, a version I have been working with, problem persists
  • My most recent addition that could have broke the process is adaptive icons
    • I tried changing back the android manifest to the default
    • I tried emptying the “bundle resource” parameter
  • Anyway I tried to bridge another project to the app and had the same problem so it is probably not that
  • I stress the fact that I did multiple sucessful bundles of my current project, but all other projects, either new empty projects or old projects have the “failed compiling android resources”

You should create the development app from your main project. Bundle a debug build for Android and check the Contentless Bundle to get an empty application with your extensions and correct settings.

Thank you for your advice! Unfortunately it is impossible for me to use the 1.4.1 version of Defold since the Rive native extension isn’t yet compatible. Here is the error message when trying to bundle after fetching the last version :

Ok, and if you bundle with an older version of the editor and use that version as the target? The Contentless Bundle option was added in 1.4.0 but for older versions you can just as well use a normal debug bundle.

Using a 1.3.7 bundle with the 1.4.1 editor has the same problem of “FATAL:ENGINE: Unable to load project file: etc”

Then I tried to go back to 1.3.7, just to be sure, and to my great surprise and confusion it now looks like bridging with the 1.3.7 editor is working again. It is very strange since I specifically haven’t automatically updated to 1.4.1 in order to avoid problems with native extensions…

Thank your for your responses @britzl, I am sorry if I lost your time :frowning:

You shouldn’t do this. You should match engine version and editor to ensure that there are no problems.

1 Like

Huh. I did al the above and it still fails. My Device sits on “Waiting for connection…” but never connects.

Which device? iOS or Android? Which OS are you using?

I am using Android on Windows 10. I Set up the bundle like so…

Then I install onto the device and I get a “Waiting to connect…” screen. It fails.
If I uncheck “Countless Bundle” it works…Somewhat.

The device is detected like normal, but when I try and hot reload, nothing updates. Device re-inits and the same data is displayed.

I would rather debug using devices that I will actually be targeting, but it does not work.

Ok, so something happens at least? You mentioned “Device re-inits”. You mean that the app restarts? Does it matter which project you are running? Are you connecting to the device over wifi or usb?

Yes, the App restarts. I have not been able to connect over USB. It does connect over wifi. I’d prefer USB though.

Once my App loads (not including countless bundles which hangs the app), I can save changes in the editor, and hot-reload, but nothing seems to be pushed into the App.

I forgot to mention. If I try to build and then run, it says Fail to load, but the IP address it shows failure on is not the devices IP. Then the App shutsdown on the device.

Have you tried? You need to set your Android device in USB Tethering mode:

Yes, I have done that too. Not sure why it is not working. My device is not connected to wifi when I try and connect. Its a device out of service too. When I attempt to set it in USB tether (outside of developer settings) it needs a network.

I will try again shortly. Right now I am looking for tile sprites in GUI example. I thought I saw one in your examples.

1 Like

Hello,

The problem mentioned above resurfaced when I added the AdMob native extension to my project. I cannot use bridging but I can bundle and build on desktop, the error is the same as above

FATAL:ENGINE: Unable to load project file:

I tried removing the extension but actually the problem persisted. I was hoping it would just fix itself like last time but it’s been 48 hours so I thought it might be better to inform you.

̶E̶D̶I̶T̶ ̶:̶ ̶F̶o̶r̶g̶o̶t̶ ̶t̶o̶ ̶m̶e̶n̶t̶i̶o̶n̶ ̶t̶h̶a̶t̶ ̶I̶ ̶a̶m̶ ̶s̶t̶i̶l̶l̶ ̶w̶i̶t̶h̶ ̶v̶e̶r̶s̶i̶o̶n̶ ̶1̶.̶3̶.̶7̶ ̶b̶e̶c̶a̶u̶s̶e̶ ̶o̶f̶ ̶t̶h̶e̶ ̶R̶i̶v̶e̶ ̶e̶x̶t̶e̶n̶s̶i̶o̶n̶ ̶m̶a̶l̶f̶u̶n̶c̶t̶i̶o̶n̶i̶n̶g̶ ̶w̶i̶t̶h̶ ̶e̶d̶i̶t̶o̶r̶ ̶1̶.̶4̶.̶2̶

EDIT 2 : I successfully upgraded for editor 1.4.2 and fixed the issues with my project. It still crashes when bridging. I am going to further test.

EDIT 3 : Tried again removing the AdMob extension and restarting the editor, the app still crashes but this time no error message at all in the console. Only INFO:ENGINE: Defold Engine 1.4.2 (8cd3a63) appears

If you are running on mobile, you probably want to look at the logs from the device ( e.g from adb on Android)

1 Like

Thanks for your response. I will look for the crash reports to send them on the thread. However it might be mostly for information purposes since I discovered the problem was probably on my machine.

I tried to do it on another computer, it worked flawlessly and substantially faster. My guess is that my gear is getting too old which is causing some kind of timeout somewhere. It is not the first time it is having problems with development tools so I’m going to manage that on my own.

1 Like

I’m using INFO:ENGINE: Defold Engine 1.4.2 (8cd3a63) and I’m intending to stream my dev build over wifi with hot reload. I’m starting off with pristine mobile app scaffold new project, and was able to bundle debug apk and install it over adb to my Android device.

I next followed Running the development app on device and checked contenless bundle option and installed it over adb. This time it shows: waiting for connection… I added my device in defold studio: “Enter Target IP:” and found my device selected under “target”. Once I ran build, the defold app on my android device crash with the following logcat:

02-12 01:03:56.558 28806 28847 I defold  : INFO:ENGINE: Defold Engine 1.4.2 (8cd3a63)
02-12 01:03:56.578 28806 28847 F defold  : FATAL:ENGINE: Unable to load project file: 'http://192.168.xx.xx:33169/build/game.projectc' (-1)