Commit 45d9b8264f6412d631745121b602f0766bf728fa
1 parent
b611fc12
升级
Showing
2 changed files
with
5 additions
and
2 deletions
lib/android/src/main/java/cn/feewee/amap3d/modules/AMapGeolocationModule.java
... | ... | @@ -57,7 +57,10 @@ public class AMapGeolocationModule extends ReactContextBaseJavaModule implements |
57 | 57 | if (client != null) { |
58 | 58 | client.onDestroy(); |
59 | 59 | } |
60 | - | |
60 | + if (key == null || key.equals("")) { | |
61 | + promise.reject("-1", "key is can not be empty!"); | |
62 | + return; | |
63 | + } | |
61 | 64 | AMapLocationClient.setApiKey(key); |
62 | 65 | AMapLocationClient.updatePrivacyShow(reactContext, true, true); |
63 | 66 | AMapLocationClient.updatePrivacyAgree(reactContext, true); | ... | ... |