`
iaiai
  • 浏览: 2144337 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Android Studio如何添加工程(project)为library(针对非gradle)

 
阅读更多
这篇文章还是针对非gradle build的工程,gradle build有一些差别。在Eclipse要引用别的工程为本工程的library很简单,但是在Android Studio还是稍稍有点小复杂的。那如何引用别的工程为本工程的library呢,首先你要将你要引用的工程作为一个module的形式导入。如何Import module,看这篇文章:Android Studio如何import module(针对非gradle)
把工程Import成module后,具体的操作看图:
同样的,打开Project structure,点开你要作为library的module,然后点击android,在右边框的Library module前√打上。

选中你要引用的module,如下图操作红色框框起来的按钮即可。

弹出的对话框中选择你要引用的Library module(这边会出现几个module依赖于你把多少个module设置成Lirary module)

点OK后,你可以看到下图Export框中出现了你引入的Library module,选中Library module,然后apply,ok即可。

  • 大小: 84.1 KB
  • 大小: 82.2 KB
  • 大小: 23.1 KB
  • 大小: 81.3 KB
分享到:
评论

相关推荐

    Android Gradle 项目样例

    Android Gradle 项目样例 本系列内容包含以下部分: ...讲解 Gradle 对 Unit 的支持,需要 Android Studio 1.1 版本。 Gradle Flavor Dimensions 讲解 Gradle Plugin 中 flavorDimensions 元素 。

    Android Studio 生成自定义jar包的步骤详解

    想要将一个项目导出为jar包,供其它项目使用,在eclipse中可以直接...2、让app依赖这个库,在app下的build.gradle文件中添加compile project(‘:testlibrary’) dependencies { compile fileTree(dir: 'libs', incl

    xmljava系统源码-MigrateToGradle:在学习Gradle的路上整理的心得

    xml java系统源码 Migrate To Gradle 手动迁移ADT 的ANT结构工程至Gradle 前言 现在Android Studio 已经发布正式版,其带来的新的功能...文件来配置,是一个脚本化的工程构建,而非原先ADT中那种eclipse 的或视化构建。

    Android代码-MaterialSearchView

    To add the MaterialSearchView library to your Android Studio project, simply add the following gradle dependency: compile 'br.com.mauker.materialsearchview:materialsearchview:1.2.2' This library is ...

    Unfortunately you can’t have non-Gradle Java modules and Android-Gradle modules in one project.

    结果整个Android Studio就开始不正常了。 一直提示: Compilation is not supported for following modules: xxx. Unfortunately you can’t have non-Gradle Java modules and Android-Gradle modules in one ...

    Android代码-CameraView

    JCameraView(1.1.2) 群:590205592 下载源码后运行camera...如果获取依赖失败则添加下列代码到 project gradle allprojects { repositories { jcenter() maven { url 'https://dl.bintray.com/cjt/maven' }

    Android代码-Leonids

    Leonids Leonids is a particle system ...Android Studio / gradle Add the following dependency to the build.gradle of your project dependencies { compile 'com.plattysoft.leonids:LeonidsLib:1.3.2' }

    CommonsWare.The.Busy.Coders.Guide.to.Android.Development.Version.8.2.2017

    Android, the next-generation open mobile platform from Google and the Open Handset Alliance, is poised to become a significant player in the mobile device market. The Android platform gives developers...

    Android代码-CustomBottomSheetBehavior

    Android Studio Project using Support Library focused on get Google Maps 3 states behavior including background image parallax and toolbars animations. Installation In your module/project build.gradle ...

    Android代码-ReadMoreTextView

    To add the ReadMoreTextView library to your Android Studio project, simply add the following gradle dependency: compile 'com.borjabravo:readmoretextview:2.0.1' Usage To use the ReadMoreTextView on ...

    Android代码-一个可拖动的向上滑动的面板

    Download the latest release and include the library project as a dependency in Eclipse. Android Studio Simply add the following dependency to your build.gradle file to use the latest version: ...

    Android代码-Capitole du Libre

    Import the project in Android Studio or use Gradle in command line: ./gradlew assembleRelease The result apk file will be placed in app/build/outputs/apk/. License Apache License, Version 2.0 Used ...

    Android代码-上下滚动图片缩放动画

    To add the FocusResize library to your Android Studio project, simply add the following gradle dependency, with min sdk version of 19: compile 'com.borjabravo:focusresize:1.0.0' Usage To use the ...

    The Busy Coders Guide to Android Development最终版2019

    Getting Around Android Studio Contents of Android Projects Introducing Gradle and the Manifest Tutorial #3 - Manifest Changes Some Words About Resources Icons Tutorial #4 - Adjusting Our Resources The...

    Android WebView中图片浏览及缩放效果

    (android studio)将两个源工程中的library文件夹导入到Demo Module所在的Project中,修改各自的build.gradle文件,让里面的版本号、所用的android包等与Demo Module相同即可。大致如图: 源代码: 主Activity...

    Anko Example Project,koltin

    Code in this repo shows how to set up Anko library in the Android Gradle project. The application is very simple yet working and shows some important Anko concepts. Please take into account that to ...

    详解Gradle依赖冲突解决方式

    为了方便看效果,我们改下gradle解决策略为有版本冲突时自动失败,如下: configurations.all { resolutionStrategy { failOnVersionConflict() } } 当我们同时依赖不同版本rxjava时编译会报错如下: 解决...

    开源项目-adnaan-gomobileandroidgradle.zip

    开源项目-adnaan-gomobileandroidgradle.zip,A sample Android Studio project integrated with Go's NativeActivity library

    Android代码-Computer Vision on Android with Kotlin and Tensorflow Lite

    KTFLITE > Computer Vison Application Written In Kotlin Powered By Tensorflow Deep Learning library KTFLITE a mix of Kotlin and Tensorfow Lite is an application ...Open the project folder in Android Stud

    java7源码-AndroidDailyDevelopCode:Android日常开发代码集合,包括:新技术demo、技术尝试、日常项目;

    Studio工程结构,你应该选择新的工程结构,如果你的工程还在使用老的结构,考虑放弃吧,将工程移植到新的结构。 老的结构: old-structure ├─ assets ├─ libs ├─ res ├─ src │ └─ ...

Global site tag (gtag.js) - Google Analytics