Home > Backend Development > C++ > Why Does My Android App Show a `java.lang.ClassNotFoundException` for `android.app.POMActivity`?

Why Does My Android App Show a `java.lang.ClassNotFoundException` for `android.app.POMActivity`?

Mary-Kate Olsen
Release: 2024-12-27 01:30:09
Original
871 people have browsed it

Why Does My Android App Show a `java.lang.ClassNotFoundException` for `android.app.POMActivity`?

java.lang.ClassNotFoundException: Didn't find class on path: dexpathlist

In this situation, the user attempts to run a project integrating native Android NDK code, but encounters an error: "java.lang.ClassNotFoundException: Didn't find class 'android.app.POMActivity' on path."

The user's provided code includes:

  • main.cpp: Wrapper for Android-based Irrlicht engine.
  • Android.mk: Build script for the shared library incorporating the native code and Android's native application glue.
  • AndroidManifest.xml: Specifies the activity "android.app.POMActivity."

The error suggests that the Android operating system fails to locate the "android.app.POMActivity" class during runtime. To resolve this, ensure the following:

  1. Disable Instant Run: Go to File > Settings > Build,Execution, Deployment > Instant Run and uncheck the instant run checkbox.
  2. Rebuild the Project: After disabling Instant Run, rebuild the project.
  3. Re-run the Application: Run the application again.

By following these steps, the issue should be resolved, and the application should run as intended.

The above is the detailed content of Why Does My Android App Show a `java.lang.ClassNotFoundException` for `android.app.POMActivity`?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template