Invoke customs are only supported : Android

Posted under problems & solutions On By mohammed.mutawe

Invoke customs

A problem that sometimes surprises us when we start building and exporting an Android project, and this problem appears when we export the APK or Bundle versions in android studio.

 

Reasons

This problem may be caused by:

  • Reskin old projects.
  • Forgetting to upgrade Java version.

 

Solution

In order to find a solution to this problem, we will do the following:

  • Go to gradle.build script.
  • Find Compile Options.
  • Change the Java version to 1.8.

 

Example

We will make the compile options like so:

compileOptions {
     sourceCompatibility JavaVersion.VERSION_1_8
     targetCompatibility JavaVersion.VERSION_1_8
 }