Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMapLocationClient.startup 时报错 #46

Open
jojo921 opened this issue Jun 5, 2020 · 1 comment
Open

AMapLocationClient.startup 时报错 #46

jojo921 opened this issue Jun 5, 2020 · 1 comment

Comments

@jojo921
Copy link

jojo921 commented Jun 5, 2020

platform : android-arm64 • Android 9 (API 28)

code

 PermissionStatus status  =  await Permission.locationWhenInUse.request();
    if (status != PermissionStatus.granted) {
      debugPrint("获取定位权限失败");
      return;
    }
      await AMapLocationClient.startup(new AMapLocationOption(
        desiredAccuracy: CLLocationAccuracy.kCLLocationAccuracyHundredMeters));
    var location = await AMapLocationClient.getLocation(true);
    debugPrint("$location");

#result:

Rejecting re-init on previously-failed class java.lang.Class<com.loc.ea$a>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/telephony/TelephonyManager$CellInfoCallback;

@jiashenghuang-ponyai
Copy link

这个貌似是因为TelephonyManager.CellInfoCallback是Android 10(Api 29) 才添加的api,跑在Android 9上他就会找不到这个类……
作为安卓开发新手,我也遇到了这个问题,貌似无解

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants