需要你手工建一个包,同时创AIDL文件,把下面的内容copy过去。http://www.netmite.com/android/mydroid/1.5/frameworks/base/telephony/java/com/android/internal/telephony/ITelephony.aidl

解决方案 »

  1.   

    你这是编译单个应用还是什么?你如果有整个android工程,就把你的应用放到里面去编译就可以了,不会报错的,这里报错是因为这些模块使用的方法很多在framework层的,自然会报错,到整个工程里面编译就OK了
      

  2.   

    我现在就在源码的packages\apps\Launcher2下面import,用的mm编的
      

  3.   

    我是在完整工程的packages\apps\Launcher2下面编的,只编整个应用。
      

  4.   

    我在源码的工程下面,里面就有itelephony.aidl
      

  5.   

    如果你aidl的文件内容完全正确,应该会帮你自动生成一个java 文件来编译的
      

  6.   

    我没改过itelephony.aidl啊, 我只是import
      

  7.   

    你在现在你的应用中调用这个类吗?那这样是不行的,因为在android.jar中没有这个类的,你要嘛用反射调用,或者是这里import了,使用里面的方法,再到android工程里面去编译你的应用
      

  8.   

    大哥,你说的到工程下面去编译是什么意思?我现在就改的luanch2,系统自带的应用啊。
      

  9.   

    大哥,你说的到工程下面去编译是什么意思?我现在就改的luanch2,系统自带的应用啊。当然也是在launcher2下面用mm -B编译的
      

  10.   

    我没用eclipse,是系统自带应用。用的mm -B编译
      

  11.   

    各位,大侠可以在源码的package/apps/launcher2下面,随便哪个java里面 import下就知道了
      

  12.   

    差不多的问题,http://stackoverflow.com/questions/13930201/internal-app-can-not-import-com-android-internal-policy-implinternal app can not import com.android.internal.policy.impl?I added an app in packages/apps in android build system and my app use some internal api.But when I use mm or mmm to make the app,android build system shows error:package com.android.internal.policy.impl does not exist etc.But I saw Phone app also uses internal api like com.android.internal.xx and it builds with no errors.I want to know whether there are something i missed and how can i use internal api in internal apps.BTW,my app can import com.android.internal.telephony,but cannot import com.android.internal.policy.impl.Thanks. 
     
         
    you have to change the access policy of the jar (in the build section, in eclipse) –  njzk2 Dec 18 '12 at 9:49 
            
     
    It's not eclipse thing,I work in build system environment,working on system app,and one of my app needs to import com.android.internal.policy.impl.xxxs.java,but build system show errors like com.android.internal.policy.impl does not exist. –  futurexiong Dec 18 '12 at 10:49 
            
     
    A/ check in the jar if the class is indeed present. if it is, B/ check the content of the manifest. there may be the access rules there that forbids biding to it –  njzk2 Dec 18 '12 at 13:30 
       
     Finally I add LOCAL_JAVA_LIBRARIES := android.policy framework in Android.mk, and it works.
     
    futurexiong
    11828 
     
     
       add a comment  
      

  13.   


    就是在整个android工程,包含全部源代码,先整体编译一下android工程,再编译你的应用