当前位置: 动力学知识库 > 问答 > 编程问答 >

java - Simulate Reduced Android Runtime in Junit

问题描述:

I build some libraries that are used both by our android devs and our spring mvc devs. We had a helper class that uses java.beans.Introspector which is not available in the android runtime, and thus caused us some issues when it was invoked on the android runtime. Specifically it throws java.lang.NoClassDefFoundError

I'd like my CI to catch these cases, but I'm having troubling finding a tool or approach that would make this work.

One idea i had was to setup Junit with a custom runner that used a custom class loader that simulated android class availability. Another idea was to run with just the reduced android runtime in my CI somehow, but I think i'm running into issues with Maven as i am not encountering the java.lang.NoClassDefFoundError exceptions.

分享给朋友:
您可能感兴趣的文章:
随机阅读: