# Android Mode crash after successful build (VerifyError: PSurfaceAndroid2D / PSurfaceNone)

**URL:** <https://discourse.processing.org/t/android-mode-crash-after-successful-build-verifyerror-psurfaceandroid2d-psurfacenone/47824>\
**Category:** Processing for Android\
**Created:** [February 1, 2026, 10:16am UTC](https://discourse.processing.org/t/android-mode-crash-after-successful-build-verifyerror-psurfaceandroid2d-psurfacenone/47824 "2026-02-01T10:16:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Damiano](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@Damiano](https://discourse.processing.org/u/Damiano)\
**Post date:** [February 1, 2026, 10:16am UTC](https://discourse.processing.org/t/android-mode-crash-after-successful-build-verifyerror-psurfaceandroid2d-psurfacenone/47824/1 "2026-02-01T10:16:44Z")

</div>

Hi everyone,  
I’m running into a **runtime crash in Processing Android Mode**. The project **builds successfully** , installs on the device, but **crashes immediately on launch** with a `VerifyError`.

I’m hoping someone can help confirm whether this is a **Processing Android Mode bug** , a **version mismatch** , or a **known compatibility issue**.

* * *

## ✅ Environment

- **OS:** Windows
- **Processing:** (Android Mode, bundled JDK 17)
- **Android SDK:** Installed via Processing Android Mode
- **Gradle build:** SUCCESSFUL
- **Device:** Physical Android device (not emulator)

* * *

## ✅ Build status

Gradle completes without errors:

```auto
BUILD SUCCESSFUL in 1m 17s
27 actionable tasks: 27 executed

```

APK installs correctly.

* * *

## ❌ Runtime crash (Logcat)

App crashes immediately on launch with the following stack trace:

```auto
FATAL EXCEPTION: main
Process: processing.test.sketch_260201b, PID: 14911
java.lang.VerifyError: Rejecting class processing.a2d.PSurfaceAndroid2D
that attempts to sub-type erroneous class processing.core.PSurfaceNone
(declaration of 'processing.a2d.PSurfaceAndroid2D' appears in
/data/app/.../base.apk)

	at processing.a2d.PGraphicsAndroid2D.createSurface(PGraphicsAndroid2D.java:180)
	at processing.core.PApplet.initSurface(PApplet.java:538)
	at processing.android.PFragment.onCreateView(PFragment.java:149)
	at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2963)
	...
Caused by: java.lang.VerifyError: Verifier rejected class
processing.core.PSurfaceNone:

android.content.Context processing.core.PSurfaceNone.getContext()
failed to verify:

can't resolve returned type 'android.content.Context' or
'android.support.wearable.watchface.WatchFaceService'

(declaration of 'processing.core.PSurfaceNone' appears in base.apk)

```

* * *

## 🔍 Key observations

- Error points to:
  - `PSurfaceAndroid2D`
  - `PSurfaceNone`

- Mentions an **unresolved reference** to:

```auto
android.support.wearable.watchface.WatchFaceService

```

- I am **not targeting Wear OS** and do not reference wearable APIs in my sketch

* * *

## 🧪 What I’ve already verified

- JDK 17 is working correctly
- Gradle caches cleared
- Android SDK reinstalled
- Project compiles cleanly
- Issue reproduces even with **simple / example sketches**

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [February 1, 2026, 3:20pm UTC](https://discourse.processing.org/t/android-mode-crash-after-successful-build-verifyerror-psurfaceandroid2d-psurfacenone/47824/2 "2026-02-01T15:20:15Z")

</div>

May be the same issue described here: _[https://github.com/processing/processing-android/issues/729](https://github.com/processing/processing-android/issues/729)_

See the fix offered by ‘ajavamind’: [GitHub - ajavamind/processing-android-410-api-15: Processing-android AndroidMode version 4.5 (version 410) modified for devices using API 15](https://github.com/ajavamind/processing-android-410-api-15)

**Addendum:**

I just checked Android Mode on MacOS with Processing 4.5.1 and it worked with a Samsung A8 device:

```processing
void setup() {
  fullScreen();
  background(209);
  fill(0, 255, 0);
  rect(200,200,400,400);
}

void draw() {  
}

```
