Robotium + Android studio
Asked Answered
C

0

0

When I run robotium (5.2.1) tests from android studio 1.0 RC 2, I get this following error ==>

:app:shrinkDebugTestMultiDexComponents FAILED

Error:Execution failed for task ':app:shrinkDebugTestMultiDexComponents'.> java.io.IOException: The output jar is empty. Did you specify the proper '-keep' options?

I have no problem to run the application "in normal mode".

Do you know where is my problem ?

Thx in advance

EDIT

According to Jared Burrows's answer I can pass task shrinkDebugTestMultiDexComponents but now I have this problem

:app:packageAllDebugTestClassesForMultiDex FAILED

Error:Execution failed for task ':app:packageAllDebugTestClassesForMultiDex'.> java.util.zip.ZipException: duplicate entry: android/support/multidex/BuildConfig.class
Chateau answered 3/12, 2014 at 16:53 Comment(5)
I am not sure Robotium supports multidex but you should look into the correct setup here: developer.android.com/tools/building/multidex.html. Try to use the test multidex instrumentation support.Colbert
Thx for the link. I think doc is not very clear. Tests worked fine with robotium without multi dex support and now tests are broken.Chateau
Do you need multidex? Did you hit the 65k+ limit? Try using proguard?Colbert
Yes I hit the 65k+ limit. I've already used proguard but I have some trouble. I found this link groups.google.com/forum/#!topic/adt-dev/i7g7wkpvWVc . I think this is the reason why I have this issueChateau
possible duplicate of Android gradle plugin multidex ZipExceptionChiropractic

© 2022 - 2024 — McMap. All rights reserved.