Android:Android Studio中使用的Github库

时间:2016-07-30 12:46:02

标签: android android-studio github licensing

在我的应用程序中,我想使用github库: - https://github.com/greenfrvr/hashtag-view

我知道使用它的一种方法是在gradle文件中添加依赖项: -

dependencies {
compile 'com.github.greenfrvr:hashtag-view:1.2.1'
}

这种方式我可以使用库,但我想对库代码进行一些更改并根据我的用途进行修改。

所以我的问题是: -

  1. 根据我的用途修改github库代码是否合法;
  2. 如果是,那么如何在 android studio
  3. 中修改库代码

    这个github库许可证文件说---

    The MIT License (MIT)
    
    Copyright (c) 2015 greenfrvr
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    
    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.
    
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
    

1 个答案:

答案 0 :(得分:3)

  

根据我的用途修改github库代码是否合法;

是的,只要您与许可协议一致,并向原作者提供正确的归属地。<​​/ p>

  

如果是,那么如何修改android studio中的库代码

如果将原始库添加为依赖项,则无法修改原始库。要修改,您可以执行以下操作之一:

  • 分出存储库并根据需要修改代码并在您的应用中使用
  • 从原始存储库下载代码,在本地修改代码并在代码中使用。