英文:
How to run .jar in Android and see the results in Android
问题
Sure, here's the translation of the text you provided:
如何在Java中运行一个.jar文件以查看结果?我认为我需要使用Android Studio,但我不知道如何操作。请帮忙。
英文:
How can I Run a .jar file in Java so that I can see the results? I this I will need to use Android Studio but I have no idea on how to do it. Please help.
答案1
得分: 0
以下是翻译后的内容:
要在 Android 中使用 .jar 库文件中的类和方法,您需要将其作为模块使用。按照以下步骤操作:
-
复制 .jar 文件。
-
导航到 Android Studio 的“project”文件夹。
-
将复制的 .jar 文件粘贴到 libs 文件夹中。
-
右键单击粘贴的文件,然后点击“add as library”。
英文:
To use class and method in .jar library file in android you have to use it as a module.To do this follow below steps
- right click on pasted file and click add as library
答案2
得分: 0
Android使用ART而不是JRE。因此它无法运行.jar文件。
英文:
Android uses ART not JRE. So it can't run .jar files.
答案3
得分: 0
可以在Android上运行jar文件。但问题是,只能通过命令执行并且需要Root权限才能实现。一个完美的例子是这个Apktool(Android)附带源代码。
英文:
It is possible to run jar files in Android. But the problem is, it's possible using command execution and Root is needed to do that. A perfect example is this <a href="https://code.google.com/archive/p/apktool/downloads"> Apktool (Android) with Source Code </a>
专注分享java语言的经验与见解,让所有开发者获益!
评论