abusuioc / hms-gms-wrapper-location

Location wrapper on top of HMS and GMS.
MIT License
11 stars 4 forks source link

Got compiling error when using hms-gms-wrapper-location for location 3.0.2 #1

Closed kust-wulin closed 4 years ago

kust-wulin commented 4 years ago

When I follow the README.md to try to use hms-gms-wrapper-location for location 3.0.2, I got the following error message: D:\wulin\code\Flutter\LearnFlutter\healthy_all\plugins\location\android\src\main\java\com\lyokone\location\FlutterLocation.java:17: error: package mobileservices.common.api does not exist import mobileservices.common.api.ApiException; ^ D:\wulin\code\Flutter\LearnFlutter\healthy_all\plugins\location\android\src\main\java\com\lyokone\location\FlutterLocation.java:18: error: package mobileservices.common.api does not exist import mobileservices.common.api.ResolvableApiException; ^ D:\wulin\code\Flutter\LearnFlutter\healthy_all\plugins\location\android\src\main\java\com\lyokone\location\FlutterLocation.java:24: error: cannot find symbol import mobileservices.location.LocationSettingsRequest; ^ symbol: class LocationSettingsRequest location: package mobileservices.location D:\wulin\code\Flutter\LearnFlutter\healthy_all\plugins\location\android\src\main\java\com\lyokone\location\FlutterLocation.java:25: error: cannot find symbol import mobileservices.location.LocationSettingsResponse; ^ symbol: class LocationSettingsResponse location: package mobileservices.location D:\wulin\code\Flutter\LearnFlutter\healthy_all\plugins\location\android\src\main\java\com\lyokone\location\FlutterLocation.java:26: error: cannot find symbol import mobileservices.location.LocationSettingsStatusCodes; ^ symbol: class LocationSettingsStatusCodes location: package mobileservices.location D:\wulin\code\Flutter\LearnFlutter\healthy_all\plugins\location\android\src\main\java\com\lyokone\location\FlutterLocation.java:27: error: cannot find symbol import mobileservices.location.SettingsClient;

I checked the source code. The package does have these 6 classes. And I checked my gradle local caches, I found the library. But the library misses some files. This image shows the directories. The api directory is missing. So that I got the first two error messages. directory

This image shows the classes in directory location. Class LocationSettingsRequest, LocationSettingsResponse, LocationSettingsStatusCodes, and SettingsClient are missing, so that I got the following 4 error messages. classes

I am wondering what I should do to download the full library, instead of a portion of it.

Thanks a lot for your attention and sincere help. Have a nice day.

kust-wulin commented 4 years ago

I figured out that I checked out the wrong version of source code. The 1.0-alpha version of code does not contain the files reported with the error messages, while the 1.0-beta-1 version has these files. So that in the build.gradle file, I changed implementation 'com.github.abusuioc:hms-gms-wrapper-location:1.0-alpha' into implementation 'com.github.abusuioc:hms-gms-wrapper-location:1.0-beta-1'

And the code does compile. I suggest the author update the README.md file, so that people will not meet this issue.
Thank a lot. Have a nice day.

abusuioc commented 4 years ago

Many thx for the suggestion @kust-wulin and apologies for the inconvenience. The readme file is now updated, pointing to the newest lib version.