Problem with provided scope for google-play-services in IntelliJ Idea
Answered
I have a problem with using IntelliJ Idea with maven to develop Android library. IDE does not seen Google Play Services when they are added with scope provided - library is compile normally from console but when opening a class from IDE class not see Google play aar - Google Play services can bee seen when removing scope from provided to compile, this issue not exist with providing android jar library.
Part of the pom file:
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
<version>6.0_r1</version>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>play-services-wallet</artifactId>
<scope>provided</scope>
<version>9.4.0</version>
<type>aar</type>
</dependency>
Please sign in to leave a comment.
Is it required to have the scrope set to provided instead of compile? Why?
In case of Android library we would like that the device will provide all necessary things, in case of play services, we would like user of library to provide google-play-services (it was a request and it is a less problem with obfuscation). My question is why, there is no issue when running tests from console and in IDE imports from google-services are not visible?
It could be a bug with Maven related to aar dependencies, please report at https://youtrack.jetbrains.com/issues/IDEA with a sample project to reproduce.