2

I have recently started android application development in AOSP and came across an agenda of getting code coverage for manual testing scenarios. I came across an option of using an emma.jar library to get the same done. But when I use the same the jar file as a part of my Android AOSP project, the library is added and compilation was successful. During run time when I try to access a function, the application crashes with the following error

FATAL EXCEPTION: main Process: com.panasonic.dairse.logger.loggerapp, PID: 4843 java.lang.Error: packaging failure: class [com.vladium.logging.ILogLevels] not found {java.lang.ClassNotFoundException: com.vladium.logging.ILogLevels}

James Z
  • 12,209
  • 10
  • 24
  • 44
Nikhil S
  • 23
  • 2
  • 8

2 Answers2

0

Please add this in Your "Manifest.xml"

 <application.....>
 //add this line
 <activity name = "com.vladium.logging.ILogLevels">
 </application>
Constantin N.
  • 2,739
  • 2
  • 16
  • 27
  • The class is a part of the jar library. As a result the class changes in each execution of the application. A similar error is generated at a later time with the class name "com.vladium.utils.IntSet" – Nikhil S Mar 27 '18 at 15:21
  • In that case you must check newer version of your jar library, or contact the provider – Constantin N. Mar 27 '18 at 15:27
  • This library is a part of the android sdk and also a part of the AOSP source. I got the library from the AOSP source. Thank you for your suggestion i shall look for a newer version of the same library. – Nikhil S Mar 27 '18 at 15:30
  • As suggested I have tried using the latest available online version emma-2.1.5320.jar as well as the available emma.jar from android AOSP. Both cases I have the same issue. – Nikhil S Mar 28 '18 at 04:36
0

Please check your proguard rules for emma.

-keep class com.vladium.** {
    *;
}
You Kim
  • 2,355
  • 1
  • 10
  • 11
  • I do not have any progaurd files as such, is it mandatory that I have to add one and mention to keep the class ? – Nikhil S Mar 29 '18 at 20:48
  • As per your suggestion I have tried adding the progaurd.files but still the same error persists. – Nikhil S Mar 30 '18 at 15:04