如何将 .jar 文件添加到 Android Studio(0.4.0 版)项目中

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20720347/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 03:21:28  来源:igfitidea点击:

How to add a .jar file into Android studio (version 0.4.0) project

androidksoap2

提问by Prasad Nair

How to add a jar file into a Android studio project. For example I am trying to add ksoap2-android-assembly-3.1.1-jar-with-dependencies.jar into a project. Dont see an option anywhere to add the jar file into the project so as to access the library functions within it.

如何将 jar 文件添加到 Android Studio 项目中。例如,我试图将 ksoap2-android-assembly-3.1.1-jar-with-dependencies.jar 添加到项目中。不要在任何地方看到将 jar 文件添加到项目中以便访问其中的库函数的选项。

回答by Scott Barta

Create a libsfolder in your project and copy the jar into it. In the project view, right-click on the jar and choose Add as Library.

在您的项目中创建一个libs文件夹并将 jar 复制到其中。在项目视图中,右键单击 jar 并选择Add as Library

回答by Dhina k

No need to add jar file just use library in gradle file...the main advantage of android studio is gradle. for more info click here http://androiddhina.blogspot.in/2015/04/add-ksoap2-to-android-studio.html

无需添加 jar 文件,只需在 gradle 文件中使用库...android studio 的主要优点是 gradle。有关更多信息,请单击此处http://androiddhina.blogspot.in/2015/04/add-ksoap2-to-android-studio.html

回答by Md Abdul Gafur

This is android libs >> Open Libraries settings >> add jar.

这是安卓 libs >> Open Libraries settings >> add jar.

For more information, check the stack-overflow link

有关更多信息,请查看堆栈溢出链接

Link

关联

Thanks

谢谢