我一直在尝试弄清楚如何在 Jetpack Compose 中打开表情符号键盘。由于表情符号没有特定的KeyboardType
实例可供我们用作输入类型,TextField
如果在 Compose 中首先拥有表情符号,那就太棒了。我不想使用自定义表情符号键盘解决方案,例如Emoji或SuperNova-Emoji,除非我找不到任何其他本机 Compose 解决方案。你们知道如何在 Jetpack Compose 中实现这一目标吗?
升级到 Android Studio Arctic Fox (2020.3.1) Canary 9 后。我无法运行我的测试。它弹出Edit Configurations
窗口以显示Error: The apk for your currently selected variant (Unknown output) is not signed. Please specify a signing configuration for this variant (debug).
消息。我似乎无法通过.jks
为调试变体以及大多数建议的帖子创建和使用发布签名配置来解决这个问题。我有点犹豫是降级还是尝试以某种方式解决它。有没有人以前遇到过这个问题?欢迎任何建议和意见。
Android Studio Arctic Fox (2020.3.1) Canary 10 版本同样出现问题。
android unit-testing android-studio android-instrumentation build-variant
我正在尝试测试我的封装翻译器类,该类在底层使用Google ML Kit Translate 。我收到一个错误,抛出java.lang.IllegalStateException: This job has not completed yet
. 我不太明白为什么会出现这个异常。有人有想法吗?
import com.google.common.truth.Truth.assertThat\nimport kotlinx.coroutines.CoroutineDispatcher\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.ExperimentalCoroutinesApi\nimport kotlinx.coroutines.runBlocking\nimport kotlinx.coroutines.test.TestCoroutineDispatcher\nimport kotlinx.coroutines.test.resetMain\nimport kotlinx.coroutines.test.runBlockingTest\nimport kotlinx.coroutines.test.setMain\nimport org.junit.Before\nimport org.junit.Rule\nimport org.junit.Test\nimport org.junit.rules.TestWatcher\nimport org.junit.runner.Description\nimport timber.log.Timber\nimport kotlin.coroutines.resume\nimport kotlin.coroutines.suspendCoroutine\n\nclass GoogleMLKitTranslatorTest {\n\n private lateinit var translator: GoogleMLKitTranslator\n\n private val testValue = "Bana herhangi bir \xc5\x9fey sor"\n\n @get:Rule\n var coroutinesTestRule = CoroutineTestRule()\n\n @Before\n fun setup() {\n translator = GoogleMLKitTranslator()\n translator.initialize()\n\n Timber.plant(Timber.DebugTree())\n }\n\n @Test\n fun translate_turkish_test_to_english_should_return_true() =\n coroutinesTestRule.testDispatcher.runBlockingTest {\n val expectedValue = "Ask me anything"\n\n val translatedText …
Run Code Online (Sandbox Code Playgroud) android kotlin android-testing kotlin-coroutines google-mlkit