A friend of mine founded a startup and asked me to create an Android app for him. I did it with Java in Android Studio, but since I never developed a commercial app before, I have a few (related) questions about licencing.

For example, if I'm selling the app to him (without publishing it on Google Play) do I need to buy a Java license? Does my friend have to buy a license too? And do I need to put my app under my own license or his?

1 Answer 1


You don't need to buy a Java license.

As per the android docs about JDK (here), they bundle a copy of OpenJDK.

OpenJDK is under the permissive GNU General Public License version 2 (GPL v2, link), which allows for commercial use at no cost.

As long as you meet the license requirements of any other packages/tools in your app (like SDKs that you integrate), you should be OK from the licensing point of view.

Other matters (e.g. cost your friend pays for the app, how you license or sell the app to your friend formally etc.) will need to be clarified between you and them - we are not part of those discussions and are unable to give you accurate advice on that.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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