29

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
CLIFFORD P Y
  • 16,974
  • 6
  • 30
  • 45
  • 2
    I just ran into the same issue. Might be Google Play related. – Ruben Aalders Sep 09 '19 at 18:33
  • 2
    Same thing is happening to me since 15 mins ago, buy it says "[cb]" instead. I'm also using AS 3.5, but over the few past days I could upload the bundle without any trouble, so it must be something with google play as @RubenAalders says – Granjero Sep 09 '19 at 18:47

7 Answers7

30

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"
}
ChrisM
  • 505
  • 6
  • 18
RavenYang
  • 426
  • 3
  • 5
19

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
    }
}
Wells
  • 212
  • 2
  • 12
2

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
    }
}
2

I had the same issue after downgrading facebook login implimentation to 5.8 it's fixed

implementation 'com.facebook.android:facebook-login:5.8.0'
user2682025
  • 656
  • 2
  • 13
  • 39
2

In my case, I was working with Localization and Translation also. It worked. no more code.

Put this code in app-level build.gradle.

android {
    bundle {
        language {
            enableSplit = false
        }
    }

    ...

}
Rumit Patel
  • 8,830
  • 18
  • 51
  • 70
1

I'm facing the same issue, I guess it is related to some resources added for Facebook's Account Kit (specifically the values inside /res/values-cb/values-cb.xml) I've tried uploading a version without this SDK and the playstore proccessed it properly

1

Switching to Facebook sdk version 5.13.0 solved the problem for me.

implementation 'com.facebook.android:facebook-login:5.13.0'
Xabaras
  • 33
  • 1
  • 7