Kanchan
Kanchan

Reputation: 840

Cannot resolve SphericalUtil

I am trying to compute area of a polygon by SphericalUtil.computeArea() method but getting cannot resolve symbol SphericalUtil.

I have put the following line in gradle.build

compile 'com.google.maps.android:android-maps-utils:0.4.+'

Upvotes: 0

Views: 1700

Answers (1)

Tim
Tim

Reputation: 43314

compile 'com.google.maps.android:android-maps-utils:0.4.+'

That is not a valid dependency because there is a . between the 4 and the +, hence it cannot be resolved.

As is said on their official website, you should use this instead

dependencies {
    compile 'com.google.maps.android:android-maps-utils:0.4+'
}

without that extra dot.

Then you can use it with this import

import com.google.maps.android.SphericalUtil;

Upvotes: 7

Related Questions