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

Class requires API level 18 (current min is 1): android.bluetooth.BluetoothManager #10

Open
pidehen23 opened this issue Feb 13, 2022 · 9 comments

Comments

@pidehen23
Copy link

Call requires API level 5 (current min is 1): android.bluetooth.BluetoothAdapter#isEnabled
Class requires API level 18 (current min is 1): android.bluetooth.BluetoothManager
截屏2022-02-13 15 55 53

@pineappleoOilPrince
Copy link
Owner

因为你项目的sdk版本设置的是1,太低了,有些api要18以上才能用,你修改一下项目的minsdk为18即可

@pidehen23
Copy link
Author

因为你项目的sdk版本设置的是1,太低了,有些api要18以上才能用,你修改一下项目的minsdk为18即可

我设置的23
截屏2022-02-14 10 02 58

@pineappleoOilPrince
Copy link
Owner

是minSdkVersion 18

@pidehen23
Copy link
Author

minSdkVersion

👌

@pidehen23
Copy link
Author

是minSdkVersion 18

minSdkVersion 和minSdk 是一样的吧。Android studio(最新版) 会自动把 minSdkVersion 更新成minSdk
https://stackoverflow.com/questions/70232201/android-studio-what-is-the-difference-between-minsdkversion-targetsdkversion-an

@pidehen23
Copy link
Author

截屏2022-02-16 11 10 31

@pidehen23
Copy link
Author

截屏2022-02-16 11 17 02

@pineappleoOilPrince
Copy link
Owner

那现在还是会报这个错误吗?

@pidehen23
Copy link
Author

那现在还是会报这个错误吗?

不会了,估计是第一次启动会有这个警告。

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