Unable to Build And Preview On android

I started working with fuse version 0.32 with windows 10 and I was working fine for a while. An then I started to get this error on fuse: Project not found and preview was working fine and then it started to tell me that the my phone and my computer is not in the same network, although they are.
I upgraded to 0.34 and the build still gives the same error, but on preview it is stuck on connecting to your computer on my phone, it doesn’t start the project after the build is finish.

  • In what situation does the fuse: Project not found show up? It’d be great if you can provide more context and logs.

  • Did you do uno clean (from the command line) inside the project directory after upgrading?

  • What happens if you just do fuse build -v ?

Hi. I did ran the command uno clean after upgrade. The project not found issue happens like this:

C:\workspace\tasadagsah-app>fuse build -t android
fuse: Project not found

When I ran the fuse preview -v I got this:

Uno 0.45.1 (build 4817) Windows 10 x64 a4caf29

Configuring
Project file: tasadagsah.unoproj
Search paths: C:\Users\ARWA-PC\AppData\Local\Fusetools\Fuse\App\app-0.34.0.10613\Packages, C:\Users\ARWA-PC\AppData\Local\Fusetools\Packages
Packages:     UnoCore (0.45.1), Fuse.Designer (0.45.5), Fuse.Platform (0.45.5), Uno.Collections (0.45.0), Uno.Geometry (0.45.0), Uno.Net.Sockets (0.45.1), Uno.Threading (0.45.1), FuseCore (0.45.5), Fuse.Motion (0.45.5), Fuse.Animations (0.45.5), Fuse.Drawing (0.45.5), Fuse.Drawing.Planar (0.45.5), Uno.Net.Http (0.45.1), Experimental.Http (0.45.5), Experimental.TextureLoader (0.45.0), Fuse.Scripting (0.45.5), Fuse.Triggers (0.45.5), Fuse.Elements (0.45.5), Fuse.Controls.Native (0.45.5), Fuse.Gestures (0.45.5), Uno.Data.Json (0.45.0), Fuse.Navigation (0.45.5), Fuse.Scripting.Duktape (0.45.5), Fuse.Scripting.JavaScriptCore (0.45.5), Fuse.Scripting.Jurassic (0.45.5), Fuse.Scripting.V8 (0.45.5), Uno.Testing (0.45.1), Fuse.Reactive (0.45.5), Fuse.Controls (0.45.5), Fuse.Controls.Panels (0.45.5), Fuse.Drawing.Polygons (0.45.5), Fuse.Drawing.Paths (0.45.5), Fuse.Drawing.Batching (0.45.5), Fuse.Drawing.Meshes (0.45.5), Fuse.Drawing.Primitives (0.45.5), Fuse.Effects (0.45.5), Fuse.Text (0.45.5), Fuse.Controls.Primitives (0.45.5), Fuse.Controls.ScrollView (0.45.5), Fuse.Android (0.45.5), Fuse.Controls.Navigation (0.45.5), Fuse.Controls.Video (0.45.5), Fuse.iOS (0.45.5), Fuse.Controls.WebView (0.45.5), Fuse.Desktop (0.45.5), Fuse.FileSystem (0.45.5), Fuse.Physics (0.45.5), Fuse.Selection (0.45.5), Fuse.Storage (0.45.5), Fuse.UserEvents (0.45.5), Uno.Data.Xml (0.45.0), Fuse (0.45.5), Fuse.WebSockets (0.45.5), Polyfills.Window (0.45.5), FuseJS (0.45.5), Uno.Permissions (0.45.1), Fuse.Launcher.Email (0.45.5), Fuse.Launcher.InterApp (0.45.5), Fuse.Launcher.Maps (0.45.5), Fuse.Launcher.Phone (0.45.5), Fuse.Launcher (0.45.5), Fuse.LocalNotifications (0.45.5), foreignhelpers_include (0.0.0), sqlite_include (0.12.0), tasadagsah (0.0.0)
..\..\AppData\Local\Fusetools\Packages\Fuse.Controls.Primitives\0.45.5\textcontrols\fallbacktextrenderer\$.uno(184): W4139: Uno.Content.Fonts.TextTransform is obsolete
Output dir:   build\(default)\Debug
(23,827.61 ms)

Compiling syntax tree
(6,043.64 ms)

Generating code and data (799.01 ms)

Build completed in 30.86 seconds
    1 warning

The “project not found” happens because you have a bit too much whitespace. :slight_smile:

You should write fuse build -tandroid (without a space between -t and android). Or you could of course use the full version fuse build --target=android

Thank you very much for your reply, it was a white space issue.

I get this error now which I am not sure how it happens.

C:\workspace\tasadagsah-app>fuse build -tandroid --force --run
Uno 0.45.1 (build 4817) Windows 10 x64 a4caf29

Configuring (1.4 s)
Compiling syntax tree (5.6 s)
Generating code and data (9.4 s)
Building Android app
1/2: libtasadagsah.so
2/2: tasadagsah.apk

BUILD FAILED
C:\Users\ARWA-PC\AppData\Local\Fusetools\Fuse\Android\AndroidSDK\tools\ant\build.xml:928: The following error occurred while executing this line:
C:\Users\ARWA-PC\AppData\Local\Fusetools\Fuse\Android\AndroidSDK\tools\ant\build.xml:946: java.lang.ArrayIndexOutOfBoundsException: 1
        at com.android.ant.DependencyGraph.parseDependencyFile(DependencyGraph.java:180)
        at com.android.ant.DependencyGraph.<init>(DependencyGraph.java:54)
        at com.android.ant.SingleDependencyTask.initDependencies(SingleDependencyTask.java:87)
        at com.android.ant.AaptExecTask.execute(AaptExecTask.java:509)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
        at com.android.ant.IfElseTask.execute(IfElseTask.java:124)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:402)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:435)
        at org.apache.tools.ant.Target.performTasks(Target.java:456)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
        at org.apache.tools.ant.Main.runBuild(Main.java:857)
        at org.apache.tools.ant.Main.startAnt(Main.java:236)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:287)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:113)

Total time: 9 seconds
## 1/2: libtasadagsah.so

## 2/2: tasadagsah.apk
(unknown): E0200: Android build failed
Buildfile: C:\Users\ARWA-PC\workspace\tasadagsah-app\build\Android\Debug\tasadagsah\app\src\main\build.xml

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 25.2.3
 [checkenv] Installed at C:\Users\ARWA-PC\AppData\Local\Fusetools\Fuse\Android\AndroidSDK

-setup:
     [echo] Project Name: tasadagsah
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 23.0.1
     [echo] Resolving Build Target for tasadagsah...
[gettarget] Project Target:   Android 6.0
[gettarget] API level:        23
     [echo] ----------
     [echo] Creating output directories if needed...
     [echo] ----------
     [echo] Resolving Dependencies for tasadagsah...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Found Deleted Target File
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.

-pre-compile:

-compile:
    [javac] Compiling 1 source file to C:\Users\ARWA-PC\workspace\tasadagsah-app\build\Android\Debug\tasadagsah\app\src\main\bin\classes

-post-compile:

-obfuscate:

-dex:
      [dex] input: C:\Users\ARWA-PC\workspace\tasadagsah-app\build\Android\Debug\tasadagsah\app\src\main\bin\classes
      [dex] input: C:\Users\ARWA-PC\workspace\tasadagsah-app\build\Android\Debug\tasadagsah\app\src\main\libs\nv-websocket-client.jar
      [dex] input: C:\Users\ARWA-PC\workspace\tasadagsah-app\build\Android\Debug\tasadagsah\app\src\main\libs\android-support-v4.jar
      [dex] Using Pre-Dexed nv-websocket-client-822d88e395501be9bb8deb178c6fcb47.jar <- C:\Users\ARWA-PC\workspace\tasadagsah-app\build\Android\Debug\tasadagsah\app\src\main\libs\nv-websocket-client.jar
      [dex] Using Pre-Dexed android-support-v4-940dc67cf9cdf045274893f68e9214ac.jar <- C:\Users\ARWA-PC\workspace\tasadagsah-app\build\Android\Debug\tasadagsah\app\src\main\libs\android-support-v4.jar
      [dex] Found Deleted Target File
      [dex] Converting compiled files and external libraries into C:\Users\ARWA-PC\workspace\tasadagsah-app\build\Android\Debug\tasadagsah\app\src\main\bin\classes.dex...
       [dx] Merged dex A (180 defs/184.2KiB) with dex B (53 defs/104.8KiB). Result is 233 defs/347.9KiB. Took 0.4s
       [dx] Merged dex A (233 defs/347.9KiB) with dex B (1153 defs/1127.0KiB). Result is 1386 defs/1829.0KiB. Took 0.3s

-crunch:
   [crunch] Crunching PNG Files in source dir: C:\Users\ARWA-PC\workspace\tasadagsah-app\build\Android\Debug\tasadagsah\app\src\main\res
   [crunch] To destination dir: C:\Users\ARWA-PC\workspace\tasadagsah-app\build\Android\Debug\tasadagsah\app\src\main\bin\res
   [crunch] Crunched 0 PNG files to update cache

-package-resources:
(11.6 s)

Build completed in 28.16 seconds
    1 error

fuse: Errors were encountered while building the project

That seems strange.
Could you try to update to the latest release, do another uno clean inside the project directory and then try to rebuild?