如何在Android上运行 .jar 文件并在Android上查看结果。

huangapple 未分类评论50阅读模式
英文:

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 库文件中的类和方法,您需要将其作为模块使用。按照以下步骤操作:

  1. 复制 .jar 文件。

  2. 导航到 Android Studio 的“project”文件夹。

  3. 将复制的 .jar 文件粘贴到 libs 文件夹中。

  4. 右键单击粘贴的文件,然后点击“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

  1. copy .jar file

  2. navigate to android studio "project" folder

    如何在Android上运行 .jar 文件并在Android上查看结果。

  3. paste copied .jar to libs folder

如何在Android上运行 .jar 文件并在Android上查看结果。

  1. right click on pasted file and click add as library

如何在Android上运行 .jar 文件并在Android上查看结果。

答案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>

huangapple
  • 本文由 发表于 2020年4月7日 14:43:40
  • 转载请务必保留本文链接:https://java.coder-hub.com/61074222.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定