我创建了一个 android 应用程序,并希望将其作为模块添加到其他应用程序。我尝试使用以下方法导入应用程序:文件->新建->导入模块->(浏览要导入的应用程序)->(更改模块名称)->完成
导入应用程序后发生以下更改:
设置.gradle
import ':app'
import ':ocr'
build.gradle(模块:应用程序)
implementation project(path: ':ocr')
该模块已添加到项目中。
但是当我尝试同步项目时,它显示以下错误:
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :ocr.
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve project :ocr.
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve project :ocr.
ERROR: Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve project :ocr.
ERROR: Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve project :ocr.
我试图到处寻找问题,但无法解决。谁能告诉问题出在哪里或如何解决?