如何导入com.android.internal.telephony? [英] How can I import com.android.internal.telephony?

查看:3200
本文介绍了如何导入com.android.internal.telephony?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了Android项目并得到了一些错误。

我如何使用这个进口的Andr​​oid?

 进口com.android.internal.telephony.IccSmsInterfaceManager;
进口com.android.internal.telephony.Phone;
进口com.android.internal.telephony.PhoneFactory;
进口com.android.internal.telephony.SMSDispatcher;

当我导入此,我得到了像这些错误:

 进口com.android.internal.telephony不能得到解决
进口com.android.internal.telephony不能得到解决
进口com.android.internal.telephony不能得到解决
进口com.android.internal.telephony不能得到解决

后来在code有:

 手机电话= PhoneFactory.getDefaultPhone();

通过错误:

 在该行多个标记
     - 电话不能被解析为一个类型
     - PhoneFactory无法解析

等等......

我试图与 http://stackoverflow.com/a/16377968/3203914 修复
但我没有为我工作。

可以请有人告诉我如何解决它?

谢谢!


解决方案

  

我如何使用这个进口的Andr​​oid?


这些都不是Android SDK的一部分。如果您正在编辑的Andr​​oid源$ C ​​$ C,它的构建过程中应该解决这些进口。如果你试图写一个Android应用程序,你不能直接引用它们。事实上, com.android 表明他们是一个独立的应用程序的一部分,不是你的,而不是Android框架。

I downloaded an Android Project and got some errors.

How can I use this imports in Android?

import com.android.internal.telephony.IccSmsInterfaceManager;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneFactory;
import com.android.internal.telephony.SMSDispatcher;

When I import this, I got errors like these:

The import com.android.internal.telephony cannot be resolved
The import com.android.internal.telephony cannot be resolved
The import com.android.internal.telephony cannot be resolved
The import com.android.internal.telephony cannot be resolved

Later in the code there are:

Phone phone = PhoneFactory.getDefaultPhone();

With the error:

Multiple markers at this line
    - Phone cannot be resolved to a type
    - PhoneFactory cannot be resolved

And so on...

I tried to fix it with the http://stackoverflow.com/a/16377968/3203914 but I did not work for me.

Can please someone tell me how to fix it?

Thanks!

解决方案

How can I use this imports in Android?

Those are not part of the Android SDK. If you are editing the Android source code, the build process for it should resolve those imports. If you are trying to write an Android app, you cannot directly reference them. In fact, com.android suggests they are part of a separate app, not yours and not the Android framework.

这篇关于如何导入com.android.internal.telephony?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆