Steps to follow in order to import a JAR sucesfully to your project using Android Studio 0.1.1:
- Download the library.jar file and copy it to your /libs/ folder inside your application project.
- Open the build.gradle file and edit your dependencies to include the new .jar file:
compile
files('libs/android-support-v4.jar', 'libs/GoogleAdMobAdsSdk-6.4.1.jar')
- File -> Close Project
- Open a command prompt on your project's root location, i.e
'C:\Users\Username\AndroidStudioProjects\MyApplicationProject\' - On the command prompt, type
gradlew clean, wait till it's done. - Reopen your application project in Android Studio.
- Test run your application and it should work succesfully.
- p.s. instead of editing the build.gradle file manually, you can just right-click on the jars in the project explorer and select "Add as Library"

本文详细介绍了如何使用Android Studio成功导入JAR文件的步骤,包括下载、复制、编辑build.gradle文件、清理项目和重新打开项目。测试运行应用确保其成功运行。
3566

被折叠的 条评论
为什么被折叠?



