Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid SplitApkBundle. The bundle targets unknown languages: [gr]. google play console

Android app bundle upload failed with error

Invalid SplitApkBundle. The bundle targets unknown languages: [gr]

enter image description here

Android Studio version 3.5

I tried

  1. Clean & rebuild
  2. Invalidate cache/restart
like image 905
CLIFFORD P Y Avatar asked Sep 09 '19 18:09

CLIFFORD P Y


3 Answers

I had the same issue.
Invalid SplitApkBundle. The bundle targets unknown languages:[cb]

I solved by setting DSL to stop aapt package building the wrong language targets.

My app supports English and Chinese, therefore resConfigs only needs en and zh.

defaultConfig {
    ...
    resConfigs "en", "zh-rTW", "zh-rCN"
}
like image 102
RavenYang Avatar answered Oct 17 '22 10:10

RavenYang


Apply this to Android{}

bundle {
    density {
        // Different APKs are generated for devices with different screen densities; true by default.
        enableSplit true
    }
    abi {
        // Different APKs are generated for devices with different CPU architectures; true by default.
        enableSplit true
    }
    language {
        // This is disabled so that the App Bundle does NOT split the APK for each language.
        // We're gonna use the same APK for all languages.
        enableSplit false
    }
}
like image 36
Wells Avatar answered Oct 17 '22 09:10

Wells


in my case i was because i was using facebook account kit see wells answer it helped me out , i am in lining it here for future references

bundle {
    density {
        // Different APKs are generated for devices with different screen densities; true by default.
        enableSplit true
    }
    abi {
        // Different APKs are generated for devices with different CPU architectures; true by default.
        enableSplit true
    }
    language {
        // This is disabled so that the App Bundle does NOT split the APK for each language.
        // We're gonna use the same APK for all languages.
        enableSplit false
    }
}
like image 2
user2403271 Avatar answered Oct 17 '22 11:10

user2403271