正确的方式添加依赖到gradle [英] Proper way to add dependencies to gradle
本文介绍了正确的方式添加依赖到gradle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请考虑以下代码:
依赖关系{
编译fileTree(dir:'libs' ,包括:['* .jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',{
exclude group:'com.android。 support',module:'support-annotations'
})
compile'com.android.support:appcompat-v7:25.3.1'
compile'com.android.support.constraint: constraint-layout:1.0.2'
compile'com.android.support:design:25.3.1
dependencies {compile'com.parse:parse-android:1.15.7'
}
依赖关系{
编译'com.parse:parse-android:1.15.7'
}
我想添加新的依赖关系。什么是添加这个的正确方法?
解决方案
第1步:打开项目结构Ctrl + Alt + Shift + S)
步骤2:点击应用程序菜单步骤3:点击依赖项选项 / p>
第四步:点击+菜单添加库依赖项步骤5:输入您的依赖关键字
第6步:点击搜索图标
第7步:双击搜索中找到的依赖项, p>
依赖项已添加...!
[
Please consider the following code
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1
dependencies {compile 'com.parse:parse-android:1.15.7'
}
dependencies{
compile 'com.parse:parse-android:1.15.7'
}
I want to add that new dependency. What is the proper way to add this?
解决方案
Follow the Steps
Step 1: Open Project Structure (Ctrl+Alt+ Shift+S)
Step 2: Tap app menu
Step 3: Tap Dependencies option
Step 4: click + menu to add "library dependency"
Step 5: Type the keywords for your dependency
Step 6: Click Search icon
Step 7: Double Click the dependency that found in Search,
Dependency Added...!
[
这篇关于正确的方式添加依赖到gradle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文