0

I'm trying to import a framework from a third-party project and include it in my project. But when I import the module (using Android Studio), the classes are inside a "classes.dex" file, and I can't import them in my project like as below:

import android.os.ThirdPartyClass

There are other libraries, but the classes are compiled into .class and not included in a .dex file, so I can import without any problems.

How can I import in this case of .dex file?

Robert
  • 39,162
  • 17
  • 99
  • 152
IGGI
  • 53
  • 5

1 Answers1

0

PREFACE

This method was deprecated in API level 26. Applications should use one of the standard classloaders such as PathClassLoader instead. This API will be removed in a future Android release.

CONVERTING

You can compile that .dex file into a .java file.

Here is a manual how to achieve that. It's really easy and I think answered your question. Good luck! :)

Ole Pannier
  • 3,208
  • 9
  • 22
  • 33
  • I tried this already but with no success, I still can't import the classes inside of the .dex converted to .jar file – IGGI Apr 09 '21 at 20:08
  • I see. You will contact the owner. After that my answer will help you to convert it! Technical it's the correct answer with a previous clarification. Good luck! :) – Ole Pannier Apr 09 '21 at 20:17