Giter Club home page Giter Club logo

appaar's Introduction

AppAAR

如何获取AAR:? 1,可以通过AS的gradle,双击当前module下的Tasks--->build--->assembleRelease
2,通过将当前的module作为library,被另外的为application的module依赖,rebuild project 则会生成debug和release下的aar,复制即可

注意:作为library不能使用swtich case判断当前的Id,因为非final 修饰的,所以全部修改为if else ,AS中存在此快捷键

repositories { jcenter() flatDir { // dirs 'libs', '../wanDa_SGQMS_Trunck/libs' // dirs project(':aarlibrary').file('libs') dirs 'libs'//依赖于libs下的包 }

} 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' testCompile 'junit:junit:4.12' //哪个module都引用了library,都进行此配置,并在libs下面存放该名字的aar compile(name: 'a2-release', ext: 'aar') compile(name: 'a3-release', ext: 'aar') compile(name: 'a4-release', ext: 'aar') }

//如果还是不能识别当前的Activity,可以参考下External Libraries找到当前的aar,点开看是否存在当前的Activity


Jar

同理如何获取AS中的Jar包

gralde 中打Jar包

appaar's People

Contributors

quanqiuheike avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.