Michael Osofsky
Michael Osofsky

Reputation: 13195

PixiJS demos appear blank in WebView on Android emulator

PixiJS demos such as http://pixijs.io/examples/?v=v4.7.0#/basics/basic.js don't load when rendered in a WebView.

Steps to reproduce

Steps to reproduce

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.locuslabs.myapplication.MainActivity">

    <WebView
        android:id="@+id/llWebView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginBottom="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</android.support.constraint.ConstraintLayout>

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.locuslabs.myapplication">

    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

pixijs-not-rendering-on-android-emulator-27.1.12-4623001

pixijs-renders-fine-on-android-emulator-26.1.4-4266726

How do I get the PixiJS demos running on Android Emulator?

Upvotes: 0

Views: 808

Answers (1)

Michael Osofsky
Michael Osofsky

Reputation: 13195

I was able to get PixiJS demos running on Android Emulator by downgrading to Android Emulator 26.1.4-4266726. See How to downgrade Android Emulator

Upvotes: 1

Related Questions