Reputation: 525
Here is my full code, when I test following code with "Android Tests", it raise error "Could not launch activity"
//TestPlayer.kt
public class PlayerTest : ActivityInstrumentationTestCase2<Player>(Player::class.java) {
override fun setUp() {
super.setUp()
getActivity()
}
fun testPlayer() {
onView(withId(R.id.player)).perform(doubleClick())
}
}
I doesn't find any output in android monitor, how to debug it?
Upvotes: 1
Views: 3390
Reputation: 41598
You need to declare Player
activity in AndroidManifest.xml
like so:
<activity
android:name=".Player"
android:theme="@style/AppTheme.NoActionBar">
</activity>
Upvotes: 8