使用IDEA的时候有时要用到eclipse的user library,由于两个IDE导入library的方式不同导致我们找不到导入user library的方法。
查IDEA的官方文档,找到方法如下:
首先要导入user library :
Eclipse IDEA
Workspace Project
Project Module
Project-specific JRE Module JDK
User library Global library
Classpath variable Path variable
Project dependency Module dependency
Library Module library
那么我们在IDEA下要导入的就是Global library。
导入后加到module中,libray有个选项叫做Scope ,有如下值Compile  Test  Runtime Provided

                        Scope Use this drop-down to affect the classpath for the various build phases.

  • Compile: This is the default option. If it is selected, the dependency is resolved and is available in classpath during the compilation and run phases.
  • Test: Select this option, if this dependency is only required for tests, and should not be available in normal application use. If this scope is selected, the dependency is resolved and is available in classpath during the test compilation and run phases.
  • Runtime: This scope indicates that the dependency is only required when running the application, and should not be available in classpath during the compilation.
  • Provided: If this option is selected, the dependency is resolved and is available in classpath during the compilation, but is not included in classpath at runtime. This dependency scope is useful, when you have some container that provides the dependency at runtime.
由于我们要加入的是动态加载的库,所以要求编译的时候不加载,只有在运行用到的时候调用。
所以Scope选择Provided选项。
默认是Compile,编译的时候会随module进行编译,此处要改为Provided
搞定。
现在有个需求是这样。module A要用到user library,module A 使用上述方法将user library 导入,并将order 放置在Andorid SDK的上面。
module B要Dependency A
在mudule B中把A作为依赖库导入,Scope选择Provided ,出现如下错误
java.lang.VerifyError
是因为库的导入方式不对,

mudule B中把A作为依赖库导入,Scope选择Compile 。搞定

intellij idea 添加动态 user library(java.lang.VerifyError)相关推荐

  1. java.lang.VerifyError解决方案 Android

    2019独角兽企业重金招聘Python工程师标准>>> 今天遇到这样一个bug: java.lang.VerifyError: at android.support.v4.view. ...

  2. android+java.lang.VerifyError

    在台式机上: java版本1.6_30,eclipse版本3.6.0 adt版本12,sdk tools版本12 跑程序没有问题 换到笔记本上,java版本不变,sdk tools版本19,adt版本 ...

  3. Android ADT插件更新后程序运行时抛出java.lang.VerifyError异常解决办法

    当我把Eclipse中的 Android ADT插件从21.1.0更新到22.0.1之后,安装后运行程序抛出java.lang.VerifyError异常. 经过调查,终于找到了一个有效的解决办法: ...

  4. java.lang.VerifyError

    2019独角兽企业重金招聘Python工程师标准>>> java.lang.VerifyError 博客分类: 异常 java.lang.VerifyError:...Call to ...

  5. cxf 整合 spring 时 java.lang.VerifyError异常

    异常信息主要有两个,Falling off the end of the code 和 illegal instruction found at offset 1: java.lang.VerifyE ...

  6. android优雅私有方法注释,带有注释参数的私有方法的Android java.lang.VerifyError

    我有一个非常简单的项目可以编译,但是无法在Emulator上启动.问题在于这种方法: private void bar(@Some String a) {} // java.lang.VerifyEr ...

  7. java.lang.VerifyError解决方案

    当坑爹的一个抛错,最近在开发一个邮箱的小应用,导入三个sun的开发jar包,坑爹的事情就这样发生了. 无论我怎么修改代码,总是抛出java.lang.VerifyError的错误,一直以为是自己的代码 ...

  8. android 开发中java.lang.verifyerror问题

    最近在做一个小项目的时候,遇到java.lang.verifyerror错误 并且这个错误让我困惑了2天,无论我怎么修改代码,错误依然提示如此,后来到网上查了一下是我导入jar包的时候 文件虽然倒进去 ...

  9. Kotlin开发遇到java.lang.VerifyError问题记录

    在使用Kotlin+协程时,编译apk会抛出java.lang.VerifyError: Verifier rejected class - 原因:某个被协程标记的supend方法使用了@JvmSta ...

最新文章

  1. Linux基础篇之文本、数据流处理命令(sed uniq grep awk wc)
  2. 到底什么是面向对象,面试中怎么回答。面向过程和面向对象的区别是什么。java跨平台特性以及java和C++的区别。面向对象的三大特性——封装、继承和多态。面向对象的高拓展性以及低耦合度怎么体现?
  3. 【项目管理】ITTO-相关方管理
  4. BZOJ 3529: [Sdoi2014]数表
  5. boost::fusion::replace用法的测试程序
  6. C语言斐波那契数列(附完整源码)
  7. 前端开发掌握nginx常用功能之rewrite
  8. java 不同分辨率_java9新特性-14-多分辨率图像 API
  9. 详解CSS position属性
  10. ARTS打卡计划第一周-Tips-ControllerAdvice的使用
  11. mysql5.5 mysqldump_mysql5.5mysqldump原文翻译_MySQL
  12. python26章_[Python设计模式] 第26章 千人千面,内在共享——享元模式
  13. EasyCHM:本程序可能被病毒或者人为修改!的解决方案
  14. oso kabuwj severe conime 美女病毒 重要文件.exe : 通过移动设备引发的血案...
  15. 【有问不答】一维信号临界采样/过采样/欠采样,并利用插值公式恢复信号(MATLAB)
  16. java实现 猜数字游戏
  17. 计算机考试不在学籍库,有消息!中考报名将由学籍库直接导入,取消学校考试排名........
  18. 管理Discuz!代码分析的收集整理
  19. Linux下操作Excel表格,xlsx表格
  20. 酷讯网创始人陈华离职 或因与资方关系不合

热门文章

  1. 机械迷城MAC下载及攻略
  2. NVIDIA Jeston GMSL Camera Driver实现
  3. 腾讯云商标注册入口链接大全
  4. RadarSLAM:可用于全天候的大规模场景的毫米波雷达SLAM
  5. FPGA信号序列监测工具——VSTAR
  6. Jetson 开发软件栈介绍
  7. 解决eclipse web项目前面出现红色感叹号和红色叉号等错误
  8. USB、Type-C、HDMI接口了解
  9. IPM逆透视变换问题(2):Image --> Ground
  10. 关于网上商城开发的随笔记录4