We want to create amazing apps without being stopped by crashes. Join us to help others who have the same bug.

I want to fix my crash

I want to help others

java.lang.RuntimeException: Could not find mock for
java.io.CharArrayWriter -- Make sure to run the MockGenerator.jar on
your test jar, and to build the Android test APK using the modified
jar created by MockGenerator
at
com.google.android.testing.mocking.AndroidMock.getInterfaceFor(AndroidMock.
java:
2790)
at
com.google.android.testing.mocking.AndroidMock.createMock(AndroidMock.java:
187)
at
com.google.android.testing.mocking.AndroidMock.createMock(AndroidMock.java:
157)
at
com.mlavignedev.androidrecorder.test.LocalSessionRepositoryTest.testGetTheO
nlyLocalSession(LocalSessionRepositoryTest.java:
59)

java.lang.RuntimeException: Could not find mock for
java.io.CharArrayWriter -- Make sure to run the MockGenerator.jar on
your test jar, and to build the Android test APK using the modified
jar created by MockGenerator
at
com.google.android.testing.mocking.AndroidMock.getInterfaceFor(AndroidMock.
java:
2790)
at
com.google.android.testing.mocking.AndroidMock.createMock(AndroidMock.java:
187)
at
com.google.android.testing.mocking.AndroidMock.createMock(AndroidMock.java:
157)
at
com.mlavignedev.androidrecorder.test.LocalSessionRepositoryTest.testGetTheO
nlyLocalSession(LocalSessionRepositoryTest.java:
59)

java.lang.RuntimeException: Could not find mock for
android.app.Activity -- Make sure to run the MockGenerator.jar on
your test jar, and to build the Android test APK using the modified
jar created by MockGenerator
at
com.google.android.testing.mocking.AndroidMock.getInterfaceFor(AndroidMock.java:
2790)
at
com.google.android.testing.mocking.AndroidMock.createNiceMock(AndroidMock.java:
238)
at
com.google.android.testing.mocking.AndroidMock.createNiceMock(AndroidMock.java:
210)
at
thycotic.secretserver.java.android.task.tests.AccountSelectionTaskTests.testShouldLaunchEulaActivityWhenLaunchSignUpRequested(AccountSelectionTaskTests.java:
19)

Root Cause Analysis

java.lang.RuntimeException

Could not find mock for
java.io.CharArrayWriter -- Make sure to run the MockGenerator.jar on
your test jar, and to build the Android test APK using the modified
jar created by MockGenerator
at
com.google.android.testing.mocking.AndroidMock.getInterfaceFor(AndroidMock.
java:
2790)
at
com.google.android.testing.mocking.AndroidMock.createMock(AndroidMock.java:
187)
at
com.google.android.testing.mocking.AndroidMock.createMock(AndroidMock.java:
157)
at
com.mlavignedev.androidrecorder.test.LocalSessionRepositoryTest.testGetTheO
nlyLocalSession(LocalSessionRepositoryTest.java:
59)