1

I have a weird problem when compiling my project in Android studio. I have two dependencies that kind of affect each other. When I have,

compile 'com.github.dbachelder:CreditCardEntry:1.4.7'

the project compiles fine and works great. However, if I add,

compile 'io.smooch:ui:latest.release'

and compile project again, the methods from firstly added dependency

(com.github.dbachelder:CreditCardEntry:1.4.7) cannot be found.

I attempted:

clean,
rebuild,
./gradlew clean && ./gradlew build,
Sync with Gradle Files,
Closing Android Studio and re-opening,
Invalidate caches & restart,
I even tried to import the CreditCardEntry repo to project manually.

If, I remove the dependency
compile 'io.smooch:ui:latest.release'
Again project compiles fine and find the methods of CreditCardEntry dependency.

The error:

Error:(160, 16) error: cannot find symbol method clearForm()

Error:(161, 16) error: cannot find symbol method setOnCardValidCallback(CardValidCallback)

Error:(163, 16) error: cannot find symbol method focusCreditCard()

Any help appreciated..

4

1 回答 1

0

io.smooch.ui实际上包含com.devmarvel.creditcardentry作为嵌入式依赖项,并且它使用相同的命名空间。我的第一个预感是你有一个命名空间冲突。

这感觉就像 Smooch SDK 端的一个错误,嵌入的依赖项可能应该重新命名空间以避免这样的冲突。(免责声明:我在 Smooch 上工作,我会在我们这边提交一个错误)

一个可能有效的直接解决方法是暂时删除你的com.github.dbachelder:CreditCardEntry:1.4.7包,看看你是否可以解决com.devmarvel.creditcardentry.CreditCardEntry,然后com.devmarvel.creditcardentry.CreditCardForm从 Smooch UI 包中解决。

于 2016-06-11T17:38:01.650 回答