Giter VIP home page Giter VIP logo

androidmultichannelbuildtool's Introduction

AndroidMultiChannelBuildTool

安卓多渠道打包工具。
实现思路讲解: Android批量打包提速 - GavinCT

使用本工具,Android程序员仅需将ChannelUtil.java放入到工程里使用,以后打包的事情就不用自己动手了。
安装个Python环境,双击一下MultiChannelBuildTool.py,谁都可以打包了!

目录介绍及使用注意

PythonTool

Python2 与 Python3 都能正常使用

  • info目录下的channel用来存放渠道,多个渠道之间用换行隔开。
    注意:
    fork后通过Github clone,这个channel文件在Windows端是正常的,以换行隔开(\r\n)。
    直接点击右侧的download下载zip,可能你在windows端看到的就不是以换行隔开的(\n)。
    这是Github造成的。但不会影响程序最后的运行效果。
    你可以粘贴下面的渠道到channel.txt中保持它在windows端的可读性。

    samsungapps
    hiapk
    anzhi
    360cn
    xiaomi
    myapp
    91com
    gfan
    appchina
    nduoa
    3gcn
    mumayi
    10086com
    wostore
    189store
    lenovomm
    hicloud
    meizu
    baidu
    googleplay
    wandou
    

    也可以自己来写入自己需要的市场,并以换行隔开

  • MultiChannelBuildTool.py是多渠道打包的脚本。

JavaUtil

ChannelUtil.java 用来解析渠道,直接拷贝到Android工程中使用即可。
ChannelUtil中的getChannel方法可以方便的获取渠道。

常见问题答疑

这部分问题是由美团大神丁志虎在微博上答复的,摘录如下:

  • 这个方案没法解决不同渠道使用渠道自己SDK的问题,友盟的SDK提供了在代码中设置渠道的方式,所以再获取到渠道号后再调用SDK相关设置渠道的方法就可以了
  • apk用的是java那一套签名,放在META-INF文件夹里的文件原则上是不参与签名的。如果Google修改了apk的签名规则,这一套可能就不适用了。

License

Copyright 2014 GavinCT

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

androidmultichannelbuildtool's People

Contributors

gavinct avatar isilent-me avatar

Watchers

James Cloos avatar Top John avatar  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.