For a small Android project i’m trying to run a simple Zebra application using a webview in which a html page is loaded. This requires Zebra to run locally, without a webserver.
I have tried it using the suggestions mentioned in this question without success.
Have anyone succeeded in running Zebra without webserver (does not need to be on Android, on PC is fine too for the moment)? If so, how?

<!DOCTYPE html>
        <script src=''
        <script type='text/javascript'>
            zebra.ready(function() {
                // import classes and variables from "ui" and "layout" packages in local space
                eval(zebra.Import("ui", "layout"));
                // create Canvas
                var root = (new zCanvas()).root;
                // define layout
                root.setLayout(new BorderLayout());
                // add button to center
                root.add(CENTER, new Button("Ok"));


  1. PS: The code in above post is from the GitHob page, if I get that to run locally that would get me started.

1 answer

you need to base64 encode all the assets and make your zebra.json file into a zebra.js file and load everything as javascript and make sure you dont do any ajax calls.  Its currently a bit of a pain.


Please login or Register to Submit Answer