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

android - Unable to reference class in multi-library project

问题描述:

I am stuck on an issue in Android Studio (2.2.3 and 2.3 beta4)

I have a multi library project and can reference classes from one but not the other. It is defined such as:

ParentProject/

.app/

..build.gradle

.lib1/

..app/

..build.gradle

.lib2/

..app/

..build.gradle

Both libraries were previously applications that I converted to libraries by changing their gradle plugin to com.android.library and removing the applicationId tags.

Both libraries compile correctly and show up with the same compile icon:

I have added both libraries and dependencies to my ParentProject settings.gradle and they all compile:

I have added dependencies to my ParentProject build.gradle:

compile project(path: ':xabber')

compile project(path: ':ask')

And for some reason, I can reference classes from ask but not from xabber.

I tried different versions of Android Studio and of the Gradle plugin.

Invalidating cache and restarting doesn't help.

Support libraries are the same across projects and dependencies.

Illustration in a ParentProject class and all classes are public:

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