E0200: Android build failed

I get an error when I use the following command. How can I fix this?

.unoproj
{
  "RootNamespace":"",
  "Packages": [
        "Fuse.Animations",
        "Fuse.BasicTheme",
        "Fuse.Themes",
        "Fuse.Controls",
        "Fuse.Designer",
        "Fuse.Drawing",
        "Fuse.Drawing.Primitives",
        "Fuse.Effects",
        "Fuse.Elements",
        "Fuse.Entities",
        "Fuse.Gestures",
        "Fuse.Navigation",
        "Fuse.Shapes",
        "Fuse.Triggers",
        "Fuse.Reactive",
        "Fuse.Android",
        "Fuse.Desktop",
        "Fuse.iOS",
        "Fuse.UserEvents",
        "FuseCore",
        "Uno.Collections",
        "Uno.Geometry"
  ],
  "Includes": [
    ""
  ],
    "Android": {
        "ApplicationLabel": "SmartHome",
        "VersionName": "1.0",
        "Description": "For a comfortable life.",
        "Icons": {
            "LDPI": "assets/icon/icon-sh-ldpi.png",
            "MDPI": "assets/icon/icon-sh-mdpi.png",
            "HDPI": "assets/icon/icon-sh-hdpi.png"
        },
        "NDK": {
            "PlatformVersion": 9
        },
        "SDK": {
            "BuildToolsVersion": "23.0.0",
            "CompileVersion": 19,
            "MinVersion": 10,
            "TargetVersion": 19
        }
    }
}

_

Build command

uno build -v --target=android --configuration=Release

Build log

_

_`Uno 0.26.4-OSX (build 1792)

Configuring
Project file: SmartHome.unoproj
Search paths: /Applications/Fuse.app/Contents/Packages, /usr/local/share/uno/Packages
add MainView.js (File)
add MainView.ux (UX)
add release.keystore (File)
add assets/fonts/RobotoCondensed-Bold.ttf (File)
add assets/fonts/RobotoCondensed-Light.ttf (File)
add assets/fonts/RobotoCondensed-Regular.ttf (File)
add assets/icon/house-with-wifi.png (File)
add assets/icon/icon-sh-hdpi.png (File)
add assets/icon/icon-sh-ldpi.png (File)
add assets/icon/icon-sh-mdpi.png (File)
add assets/icon/white/casino-cctv-white.png (File)
add assets/icon/white/ecological-lightbulb-white.png (File)
add assets/icon/white/european-plug-white.png (File)
add assets/icon/white/fire-white.png (File)
add assets/icon/white/home-insurance-white.png (File)
add assets/icon/white/light-bulb-filament-white.png (File)
add assets/icon/white/logout-sign-white.png (File)
add assets/icon/white/logout-white.png (File)
add assets/icon/white/power-white.png (File)
add assets/icon/white/roller-shutter-door-white.png (File)
add assets/icon/white/security-on-white.png (File)
add assets/icon/white/small-light-bulb-white.png (File)
add assets/icon/white/wall-socket-white.png (File)
add assets/icon/white/water-drop-white.png (File)
add assets/images/bg.jpg (File)
Packages: UnoCore (0.26.4), Uno.Collections (0.26.1), ObjC (0.26.1), Experimental.iOS (0.26.1), Uno.Geometry (0.26.1), Uno.Threading (0.26.4), Fuse.Designer (0.26.3), FuseCore (0.26.3), Experimental.Physics (0.26.3), Fuse.Animations (0.26.3), Fuse.Drawing (0.26.3), Fuse.Drawing.Batching (0.26.3), Fuse.Drawing.Meshes (0.26.3), Fuse.Drawing.Planar (0.26.3), Android (0.26.1), Experimental.TextureLoader (0.26.1), Uno.Net.Http (0.26.4), Experimental.Http (0.26.3), Fuse.Scripting (0.26.3), Fuse.Triggers (0.26.3), Fuse.Elements (0.26.3), Fuse.Drawing.Primitives (0.26.3), Fuse.Drawing.Polygons (0.26.3), Fuse.Drawing.Paths (0.26.3), Fuse.Entities (0.26.3), Fuse.Gestures (0.26.3), Fuse.Navigation (0.26.3), Uno.Data.Json (0.26.1), Uno.Testing (0.26.4), Fuse.Camera (0.26.3), Fuse.GeoLocation (0.26.3), Fuse.Launcher (0.26.3), Fuse.Scripting.Duktape (0.26.3), Fuse.Scripting.JavaScriptCore (0.26.3), Fuse.Scripting.Jurassic (0.26.3), Uno.Net.Sockets (0.26.1), Fuse.Scripting.V8 (0.26.3), Fuse.Storage (0.26.3), Fuse.UserEvents (0.26.3), Fuse.Vibration (0.26.3), Fuse.Reactive (0.26.3), Fuse.Shapes (0.26.3), Fuse.Controls (0.26.3), Fuse.Effects (0.26.3), Fuse.Physics (0.26.3), Fuse.BasicTheme (0.26.3), Fuse.Video (0.26.3), Fuse.Themes (0.26.3), Fuse.Android (0.26.3), Fuse.Desktop (0.26.3), Fuse.iOS (0.26.3), SmartHome (0.0.0)
Output dir: build/Android/Release
(6,756.62 ms)

Compiling syntax tree
(10,941.82 ms)

Generating code and data_313 namespaces stripped.
5062 types stripped. 47322 fields stripped.
101999 functions stripped. 606 classes sealed.
1162 functions sealed. 195 functions stripped from vtable.
out build/Android/Release/SmartHome/app/src/main/assets/bundle
(22,010.95 ms)

Building Android app
1/2: libSmartHome.so

2/2: SmartHome.apk
Buildfile: /XXX/XXX/workspace/fuse/smarthome-mobil/build/Android/Release/SmartHome/app/src/main/build.xml

-set-mode-check:

-set-debug-files:

-check-env:
[checkenv] Android SDK Tools Revision 24.1.2
[checkenv] Installed at /usr/local/share/uno/SDKs/AndroidSDK

-setup:
[echo] Project Name: SmartHome
[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 SmartHome…
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[echo] ----------
[echo] Creating output directories if needed…
[mkdir] Created dir: /XXX/XXX/workspace/fuse/smarthome-mobil/build/Android/Release/SmartHome/app/src/main/bin/rsObj
[mkdir] Created dir: /XXX/XXX/workspace/fuse/smarthome-mobil/build/Android/Release/SmartHome/app/src/main/bin/rsLibs
[echo] ----------
[echo] Resolving Dependencies for SmartHome…
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with ‘debug’…
[subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
[echo] Handling aidl files…
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files…
[echo] ----------
[echo] Handling Resources…
[aapt] No changed resources. R.java and Manifest.java untouched.
[echo] ----------
[echo] Handling BuildConfig class…
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
[javac] Compiling 51 source files to /XXX/XXX/workspace/fuse/smarthome-mobil/build/Android/Release/SmartHome/app/src/main/bin/classes
[javac] /XXX/XXX/workspace/fuse/smarthome-mobil/build/Android/Release/SmartHome/app/src/main/java/com/foreign/Fuse/Android/StatusBarConfig.java:54: cannot find symbol
[javac] symbol : method setStatusBarColor(int)
[javac] location: class android.view.Window
[javac] window.setStatusBarColor(color);
[javac] ^
[javac] Note: /XXX/XXX/workspace/fuse/smarthome-mobil/build/Android/Release/SmartHome/app/src/main/java/com/foreign/Fuse/Android/StatusBarConfig.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 1 error
(1,600.53 ms)

Build completed in 41.32 seconds.
0 Warning(s)
1 Error(s)

Error Summary

(unknown): E0200: Android build failed – rerun with ‘-v’ for more information`

Hi,

Can you please provide the full project?

Are you doing something specific with foreign code here?

window.setStatusBarColor(color);

I think this requires a specific (recent) android version

Hi Anders,

I didn’t use any foreign code.

I did the following operations, but the result has not changed (but error message changed).

  • uno clean

  • uno build -v --target=android --configuration=Release

.unoproj
{
  "RootNamespace":"",
  "Packages": [
        "Fuse.Animations",
        "Fuse.BasicTheme",
        "Fuse.Themes",
        "Fuse.Controls",
        "Fuse.Designer",
        "Fuse.Drawing",
        "Fuse.Drawing.Primitives",
        "Fuse.Effects",
        "Fuse.Elements",
        "Fuse.Entities",
        "Fuse.Gestures",
        "Fuse.Navigation",
        "Fuse.Shapes",
        "Fuse.Triggers",
        "Fuse.Reactive",
        "Fuse.Android",
        "Fuse.Desktop",
        "Fuse.iOS",
        "Fuse.UserEvents",
        "FuseCore",
        "Uno.Collections",
        "Uno.Geometry"
  ],
  "Includes": [
    "*"
  ],
    "Android": {
        "ApplicationLabel": "SmartHome",
        "VersionName": "1.0",
        "Description": "For a comfortable life.",
        "Icons": {
            "LDPI": "assets/icon/icon-sh-ldpi.png",
            "MDPI": "assets/icon/icon-sh-mdpi.png",
            "HDPI": "assets/icon/icon-sh-hdpi.png"
        },
        "NDK": {
            "PlatformVersion": 9
        },
        "SDK": {
            "BuildToolsVersion": "23.0.0",
            "CompileVersion": 22,
            "MinVersion": 17,
            "TargetVersion": 22
        }
    }
}

Uno 0.25.10-OSX (build 1633)

Configuring
Project file: SmartHome.unoproj
Search paths: /Applications/Fuse.app/Contents/Packages, /usr/local/share/uno/Packages
...
...
...
2/2: SmartHome.apk
Buildfile: /../../workspace/fuse/smarthome-mobil/build/Android/Release/SmartHome/app/src/main/build.xml

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 24.1.2
 [checkenv] Installed at /usr/local/share/uno/SDKs/AndroidSDK

-setup:
     [echo] Project Name: SmartHome
  [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 SmartHome...
(87,287.57 ms)

Build completed in 133.67 seconds.
    0 Warning(s)
    1 Error(s)


BUILD FAILED
/usr/local/share/uno/SDKs/AndroidSDK/tools/ant/build.xml:542: Unable to resolve project target 'android-22'

Total time: 0 seconds
(unknown): E0200: Android build failed -- rerun with '-v' for more information
FATAL ERROR: Build failed.

    "SDK": {
        "BuildToolsVersion": "23.0.0",
        "CompileVersion": 22,
        "MinVersion": 17,
        "TargetVersion": 22
    }

The following figure shows the SDK parameters are changed, the return to the previous error message.

        "SDK": {
            "BuildToolsVersion": "23.0.0",
            "CompileVersion": 19,
            "MinVersion": 17,
            "TargetVersion": 22
        }

```

```uno
-compile:
    [javac] Compiling 71 source files to /../../workspace/fuse/smarthome-mobil/build/Android/Release/SmartHome/app/src/main/bin/classes
    [javac] /../../workspace/fuse/smarthome-mobil/build/Android/Release/SmartHome/app/src/main/java/com/Bindings/ExternedBlockHost.java:225: cannot find symbol
    [javac] symbol  : method setStatusBarColor(int)
    [javac] location: class android.view.Window
    [javac]             window.setStatusBarColor(color);
    [javac]                   ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 1 error
(73,404.51 ms)

Build completed in 118.04 seconds.
    0 Warning(s)
    1 Error(s)

```

Hi,

I solved the problem by following the steps below.

  • uno android updated packages
  • .unoproj changed
"SDK": {
            "BuildToolsVersion": "23.0.0",
            "CompileVersion": 22,
            "MinVersion": 17,
            "TargetVersion": 22
        }

  • uno clean
  • uno build --target=android --configuration=Release

Hi!

Great that you found a solution!

Sorry we couldn’t figure it out for you.

We do however have a ticket to work out the cause of the problem and will update here as soon as we know more.

I am getting the same error, I am using Windows 10 64bits
Fuse 1.2.1 (Build 13974)

Execution failed for task ‘:app:packageDebug’.

com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store “C:\Users\gfernandez.android\debug.keystore”: Keystore was tampered with, or password was incorrect

@memofer_prof its not the same error :wink:

Your error because your are trying to Generate Signed APK and the Keystore information are in invalid.

Also you should have check the last Fuse Version here https://www.fusetools.com/downloads/channel/qa