Man*_*noj 157 android android-studio
我是Android Studio新手.我需要做的是External Libraries在<JDK>文件夹下面添加几个jar文件.

如果有人知道如何做到这一点,请帮助我.
cap*_*wag 282
一个迟到的答案,虽然我想对这个问题给出一个深入的答案.此方法适用于Android Studio 1.0.0及更高版本.
脚步
现在您可以开始在项目中使用该库.
Thi*_*sky 129
将jar文件添加到该文件夹app/libs.然后右键单击jar文件并单击"添加为库".
如果没有libs文件夹,您可以创建它.单击"Android"组合框,将其更改为"Project"
从这里,您可以右键单击目录树中的"apps",然后转到"New"=>"Directory"
Gaë*_*tan 55
将您的JAR放在app/libs中,并在app/build.gradle中添加以下dependencies部分:
compile fileTree(dir: 'libs', include: ['*.jar'])
Moh*_*ahi 21
在app目录中创建"libs"文件夹,在libs文件夹中复制你的jar文件,右键单击Android Studio中的jar文件并添加为库...然后打开build.gradle并添加:
dependencies {
compile files('libs/your jar file.jar')
}
Run Code Online (Sandbox Code Playgroud)
Ena*_*que 13
在 Android Studio 3.0 或更高版本中,我使用了如下代码:
Project在左上角设置视图在build.gradle添加这些行
// Add this line if was not added before.
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation files('libs/com.ibm.icu_3.4.4.1.jar')
Run Code Online (Sandbox Code Playgroud)
小智 11
Parse jar的例子......
从项目视图中将jar添加到libs文件夹...如果不存在则创建lib文件夹
复制所有罐子......
在build.gradle文件中添加libs到gradle ....:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:design:23.0.0'
compile 'com.android.support:percent:23.0.0'
compile 'com.parse.bolts:bolts-android:1.+'
compile fileTree(dir: 'libs', include: 'Parse-*.jar’)
}
Run Code Online (Sandbox Code Playgroud)
添加所有jar文件夹...将Parse - *.jar更改为*.jar
Vir*_*tel 11
步骤2: 复制.jar文件并复制到libs文件夹中。
步骤3: 点击文件>项目结构>选择应用>依赖关系
第四步:
步骤5:
步骤6:点击“确定”按钮后,我们可以看到Dependencies添加如下:
Zul*_*ain 10
这是您.jar在Android Studio 2.1.3中添加文件的方法.
| 归档时间: |
|
| 查看次数: |
259745 次 |
| 最近记录: |