问题1:
Caused by: net.sqlcipher.database.SQLiteException: error code 14: Could not open database
原因:程序A访问程序B(待集成程序)数据库出现权限问题
解决:程序A集成程序B访问代码
问题2:
java.lang.IllegalStateException: Cannot access database on the main thread since it may potentially lock the UI for a long period of time.
原因:无法访问主线程上的数据库,因为它可能会长时间锁定 UI。
解决:使用线程池开启线程
问题3:
NoClassDefFoundError: Failed resolution of: Landroidx/databinding/DataBinderMapperImpl;
原因:
解决:
问题4:
- Duplicate class org.apache.commons.io.ByteOrderMark found in modules jetified-commons-io-2.5 (commons-io-2.5.jar) and jetified-xxx-1.0.-SNAPSHOT-runtime (com.xxx.xxx:xxx:1.0.-SNAPSHOT:xxx.092926-89)
- 原因:包依赖冲突
- 解决:
// commons-io
implementation files('libs/commons-io-2.5.jar')
implementation files('libs/commons-io-2.5-javadoc.jar')
// BasicThreadFactory
implementation 'org.apache.commons:commons-lang3:3.9'
改为:
implementation group: 'commons-io', name: 'commons-io', version: '2.6'
// BasicThreadFactory
implementation 'org.apache.commons:commons-lang3:3.9'