简体   繁体   English

导入android包类时出错

[英]Error while importing android packages class

i need to capture the signal strength of available Gsm operators,i found we can do this INetworkQueryService aidl interface and this interface uses some of the callbacks which requires to import com.android.phone.INetworkQueryServiceCallback, when i import, i get Error as couldn't find import for class com.android.phone.INetworkQueryServiceCallback 我需要捕获现有GSM运营商的信号强度,我发现我们可以做到这一点INetworkQueryService AIDL接口和这个接口使用了一些需要导入com.android.phone.INetworkQueryServiceCallback回调的,当我进口,我得到错误的couldn找不到类com.android.phone.INetworkQueryServiceCallback的导入

In order to resolve the above issue i created the package with same qualifier and mapped the respective .java classes.But my confusion is since this packages are the part of android SDK is it necessary for me to create them manually and map each and every .java classes as well as don't it create any kind of performance overheads. 为了解决上述问题,我使用相同的限定符创建了程序包并映射了相应的.java类。但是我的困惑是,由于此程序包是android SDK的一部分,因此我有必要手动创建它们并映射每个。 java类以及它不会产生任何类型的性能开销。

Please refer the below link to know what i am doing let me known is there better solution to achieve this issue. 请参考以下链接,以了解我在做什么,是否有更好的解决方案来解决此问题。

Android: How do I get GSM signal strength for all available network operators Android:如何获取所有可用网络运营商的GSM信号强度

You have to download .jar and include that to class path or add it to you project build path or as external library.You don't have this library in built you have to add it to your project. 您必须下载.jar并将其包含到类路径中,或将其添加到项目构建路径中或作为外部库。您没有内置的库,必须将其添加到项目中。

You also need to read: 您还需要阅读:

Android adding external libraries to project Android将外部库添加到项目


You can see class here 你可以在这里看到课程

Download Jar(Binary Download) 下载Jar(二进制下载)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM