diff --git a/matrix-sdk-android/build.gradle b/matrix-sdk-android/build.gradle
index 2717f95ed814fc459f625fec1970bcf9abd0c51a..983f095a5a21339046094c9127c7d6da7e56edc2 100644
--- a/matrix-sdk-android/build.gradle
+++ b/matrix-sdk-android/build.gradle
@@ -72,12 +72,12 @@ android {
     }
 
     compileOptions {
-        sourceCompatibility JavaVersion.VERSION_1_8
-        targetCompatibility JavaVersion.VERSION_1_8
+        sourceCompatibility JavaVersion.VERSION_11
+        targetCompatibility JavaVersion.VERSION_11
     }
 
     kotlinOptions {
-        jvmTarget = "1.8"
+        jvmTarget = "11"
     }
 
     sourceSets {