简体   繁体   English

Android facebook-sdk 在土耳其语中崩溃

[英]Android facebook-sdk crash in Turkish

When I selected Turkish language , I get an error.当我选择Turkish language ,出现错误。
No problem in other language, if i delete facebook-sdk fix it.其他语言没问题,如果我删除 facebook-sdk 修复它。 But I have to use facebook-sdk..但我必须使用 facebook-sdk ..

java.lang.IllegalArgumentException: CLİCK is not a constant in com.facebook.appevents.codeless.internal.EventBinding$ActionType java.lang.IllegalArgumentException:CLİCK 不是 com.facebook.appevents.codeless.internal.EventBinding$ActionType 中的常量

repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()}

implementation 'com.facebook.android:facebook-android-sdk:[4,5)'

and Manifest清单

<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>

NOTE : İ letter returns from facebook and it has been created by runtime.注意: © 来自 facebook 的信件,它是由运行时创建的。 I did not write any İ letter.我没有写任何 İ 信。 Please do not reply as write İ letter as lower case.请不要以小写字母的方式回复。 I already know.我已经知道了。

I don't know anything about the facebook-sdk, but I see a dot on top of the uppercase letter I in the word CLİCK, and in a Turkish locale, toUppercase("i") doesn't return "I" , but "İ" .我对 facebook-sdk 一无所知,但是我在单词 CLİCK 中的大写字母 I 顶部看到一个点,并且在土耳其语言环境中, toUppercase("i")不会返回"I" ,但是"İ" So I bet that somewhere a lowercase "click" is converted to "CLİCK" using toUpperCase() without specifying a sensible locale like eg Locale.ROOT .所以我敢打赌,在某个地方,使用toUpperCase()将小写的"click"转换为"CLİCK"而不指定合理的语言环境,例如Locale.ROOT

As this is a very special "feature" of Turkish case conversions (and no other language, as far as I know), that would explain why this only happens in Turkish language.由于这是土耳其语大小写转换的一个非常特殊的“功能”(据我所知,没有其他语言),这可以解释为什么这只发生在土耳其语中。

Maybe someone with more knowledge on facebook-skd can point you to the place where the case conversion happens and how to repair it.也许对 facebook-skd 有更多了解的人可以将您指向大小写转换发生的地方以及如何修复它。

I encountered the same problem.我遇到了同样的问题。 Workaround is use version 4.33.0 and lower.解决方法是使用 4.33.0 及更低版本。

implementation 'com.facebook.android:facebook-android-sdk:4.33.0'

UPDATE (12.06.20) There is no crash in the latest Facebook SDK (5.15.3)更新 (12.06.20)最新的 Facebook SDK (5.15.3) 没有崩溃

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM