-2

I have an Android app using two libraries (GPLv2 and APLv2).

I read that GPLv2 and APLv2 are incompatible.

I will show which open source libraries I've used and tell the reader which licenses the libraries are under in my app.

Does this mean my license has to be one where both licenses are compatible? Do I need a license at all if I reference to the libraries I've used? I don't care so much about my app but I don't want any legal issues when I publish it on Play Store. Plus my app will be free if that matters.

  • I should mention that if you are using a GPL library for your project, you'll need to release the whole project under the GPL license: "when you distribute [...] a work based on the Program, the distribution of the whole must be on the terms of this License" – Tin Man Dec 6 '17 at 7:49
0

If you just create an app for personal use and you are not providing it to others, then you don't need to license your app.

If you want to provide your app to others, you need to make it clear what the others are allowed to do with the code you wrote. Informing people about their rights and obligation is done by means of licensing, which is nothing more than adding a license text to your code.

When you are using multiple libraries in your project, then you need to make sure that all licenses of the various libraries and your own code are compatible with each other. If the licenses are not compatible with each other, then you can't meet all the obligations that the licenses place on you and you are not allowed to distribute your app.

Permissive licenses (like MIT, BSD and Apache) are generally compatible with each other, if only because they place few requirements on you.

Copyleft licenses, like GPL, have more compatibility issues, because they place requirements on a complete application, even if only a small library is actually licensed in such a way.

Because copyleft licenses extend their requirements to the complete application, it is generally advised to use the GPL license for your own code if you use a GPL-licensed library.


The GPLv2 license is indeed incompatible with the Apache license due to some patent-related clauses in the Apache license that are not allowed under the GPLv2 license, and the GPLv2 license requires that the whole app adheres to the terms of the GPLv2 license.

If the GPL-library is actually licensed as "GPL version 2 or later", then not all hope is lost. The GPLv3 license is compatible with the Apache license, and the "or later" part on the GPL license allows you to treat the library as if it was originally released under the GPLv3 license.

  • Mind you im not modifying the code in the libraries. Just using them. Yes im planning on publishing it on play store. One of the libs are GPLv2 and not v3. – carva Dec 4 '17 at 18:00
  • Had I only knew this before id use two gpl-2 libraries – carva Dec 4 '17 at 18:12
  • @carva: Can you provide a link to the GPLv2 library? – Bart van Ingen Schenau Dec 4 '17 at 18:15
  • espertech.com/esper/esper-license-and-trademark and Hellocharts for android using APLv2 – carva Dec 4 '17 at 18:19
  • @carva: Esper is indeed GPLv2 only and thus incompatible with HelloCharts. You can try to ask EsperTech if they are willing to license Esper under "GPLv2 or later" or GPLv3, or you can check if their commercial offering is of interest to you. – Bart van Ingen Schenau Dec 4 '17 at 19:14

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.