Emoji symbol

前端 未结 2 488
挽巷
挽巷 2021-01-03 22:56

I would like to integrate the emoji symbol

相关标签:
2条回答
  • 2021-01-03 23:35

    The fix for that is: Add "--utf16" to aapt by adding

    android {
        aaptOptions {
            additionalParameters '--utf16'
        }
    }
    

    to your build.gradle file, and make sure you are not using aapt2.

    See https://issuetracker.google.com/issues/37140916

    0 讨论(0)
  • 2021-01-03 23:47

    It seems that newer versions of Android don't cause the crash (API 24 worked in my tests), but that doesn't help if you are supporting older versions. The best I have been able to figure out is to use Java coded strings.

    public class AppEmojiStrings {
    
        // This is only a workaround for emoji causing crashes in XML strings.
        // Use the standard strings.xml for all other strings.
    
        public static final String thumbsUp = "Thumbs up                                                                     
    0 讨论(0)
提交回复
热议问题