Jump to content

Android Webview doesn't load images of pixijs app


Recommended Posts


My images/textures won't load when I am usng Andoid's webview to create an android app. Any ideas? I use Android studio.

html/javascript code and file structure of android studio's project:


Main activity:




It's probably something obvious but could not find the solution.

Many thanks



Link to comment
Share on other sites

"fromImage" creates and image element and waits for it to load. You can try to write it manually to test whats wrong there, its just a few lines. Most of those problems come from CORS violations.

Alternatively, you can just go for workaround: place invisible <image>'s all over the page and use "Texture.fromCanvas" instead.

Link to comment
Share on other sites

Thanks Ivan.

In case anyone else needs it in the future, I followed xerver's advise in

I used something like:

var img = new Image();img.src = 'images/f1.png';var base = new PIXI.BaseTexture(img),    texturef = new PIXI.Texture(base);


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...