Home >Java >javaTutorial >Android Update 17: Why Are My External JARs Causing Runtime Errors?

Android Update 17: Why Are My External JARs Causing Runtime Errors?

Patricia Arquette
Patricia ArquetteOriginal
2024-12-10 22:12:35546browse

Android Update 17: Why Are My External JARs Causing Runtime Errors?

Android Update 17: Resolved Incompatibility with External Jars

Android users who recently installed update 17 may have encountered class not found exceptions at run time, affecting jars such as javax.mail and apache.commons.httpclient. Despite successful compilation, the apps crashed with exceptions like "Could not find class 'javax.mail.internet.InternetAddress'".

Confronted with this issue, one should not suspect the Java update as the sole culprit. Instead, the solution lies in managing external jar dependencies.

To resolve this incompatibility, follow these steps:

  1. Create a folder named "libs" within your Android project directory.
  2. Copy all required external jar files into the "libs" folder.

Upon this step, Android will automatically include the jars in your build, as detailed in Android's official guide to dealing with dependencies. Consequently, your applications will run without the aforementioned exceptions.

The above is the detailed content of Android Update 17: Why Are My External JARs Causing Runtime Errors?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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