导入roottools.jar到Android的工作室 [英] Importing roottools.jar into Android Studio

查看:1337
本文介绍了导入roottools.jar到Android的工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图导入从这里roottools: https://开头code .google.com / p / roottools / (jar文件)到Android Studio项目。到目前为止,我已经试过如下:

I'm trying to import roottools from here: https://code.google.com/p/roottools/ (jar file) to the Android Studio project. So far I've tried the following:


  • 复制RootTools-的javadoc-3.4.jar到我的项目下的libs目录。

  • 添加进口

  • 重新进口。

  • 重建项目

但我仍没有存取权限,以它的方法。难道仅仅是与Eclipse兼容?

But still I don't have "acces" to it's methods. Is it possible that is only compatible with Eclipse?

推荐答案

我尝试使用提供下载JAR,它也不能工作。为了得到这个工作,我在这里下载可在github上项目。编译并运行任务makeJar(右键单击任务makeJar在gradle.build并选择运行)。

I tried using the JAR available for download and it didn't work either. To get this working, I had to download the project available at github here. Compile and run the task "makeJar" (right click on task makeJar in the gradle.build and select run).

我只是说这个新的罐子在库和引用的gradle.build文件。

I just added this new jar in the libs and referenced in the gradle.build file.

dependencies {
    ...
    compile files('libs/RootTools.jar')
}

,也可以通过项目属性添加它。

or you can add it via Project Properties.

它的工作完美(不要忘记,如果你手动编辑它来同步您的gradle的文件)。

It worked perfectly (don't forget to sync your the gradle files if you edit it manually).

这篇关于导入roottools.jar到Android的工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆