【问题标题】:How to make "Choose Destination Directory" dialog appear after "Create Test" in Android Studio如何在 Android Studio 中的“创建测试”之后显示“选择目标目录”对话框
【发布时间】:2022-10-24 14:07:27
【问题描述】:
标签:
java
android-studio
unit-testing
kotlin
【解决方案1】:
- 更新 gradle 和 android gradle 插件
- 更新所有依赖插件(我更喜欢删除gradle变量并使用直接版本号的依赖以避免冲突)
像这样
实现“org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1”
-
更新 kotlin 版本
-
将目标 SDK 更新为 33
-
将exported = "true" 添加到清单中的MainActivity 标记中
<activity
android:name="com.example.android.architecture.blueprints.todoapp.tasks.TasksActivity"
android:windowSoftInputMode="adjustResize"
android:exported="true"
android:theme="@style/AppTheme.OverlapSystemBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>