简体   繁体   English

Android Studio导入模块无法解析符号

[英]Android Studio import module cannot resolve symbol

I'm using latest Android Studio version (2.3.1) and I imported a library to my android studio project. 我正在使用最新的Android Studio版本(2.3.1),并且将库导入了我的android Studio项目。
But when I want to import classes : 但是当我想导入类时:

import com.mehdikarimi.PauseResumeAudioRecorder;      

returned error : 返回错误:

Cannot Resolve Symbol Module1 无法解析符号模块1

Is any suggestion to resolve this error? 是否有解决此错误的建议?

Check settings.gradle file, Is your module included there. 检查settings.gradle文件,其中是否包含您的模块。

like include 'abc', 'xyz' include 'abc', 'xyz'

If yes try to Invalidate Caches/Restart and restart Android Studio. 如果是,请尝试使Invalidate Caches/Restart并重新启动Android Studio。

I resolved the problem first Invalidate Caches/Restart and closed Android Studio and deleted *.iml files and .idea folder then I added 我先解决了使缓存无效/重新启动的问题,并关闭了Android Studio,并删除了* .iml文件和.idea文件夹,然后添加了

    compile project(path: ':audiorecordlibrary');


To app dependencies 对应用程序的依赖

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM