skip to Main Content

I keep getting this error message when compiling my app to an apk:
error message I’ve found a lot of posts about pom.xml
I tried multiple times to find the pom.xml file. So does anyone know where it is or how to fix this error?

This is my android studio version btw: version

2

Answers


  1. Newest Android Studio does not support java 1.5 as a compilation target. Switch to 1.6 or later (newest recommendation is java 11). Here is how:

    android {
        compileSdkVersion 30
    
        compileOptions {
          sourceCompatibility JavaVersion.VERSION_11
          targetCompatibility JavaVersion.VERSION_11
        }
    
        // For Kotlin projects
        kotlinOptions {
          jvmTarget = "11"
        }
    }
    

    source

    Login or Signup to reply.
  2. Similar to Jakos, I found the following in my appbuild.gradle :

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_5
        targetCompatibility JavaVersion.VERSION_1_5
    }
    

    This was probably left over from upgrading an eclipse project, once removed the project compiled.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search