aidl link error, couldn't find import for class com.android.internal.telephony.gsm.NetworkInfo

by maliha » Thu, 19 May 2011 19:49:34 GMT


Sponsored Links
 Hi,

I am trying to re-use PhoneUtils.java (~/android_src/packages/apps/
Phone/src/com/android/phone/) within my app with some customizations.

I have added INetworkQueryServiceCallback.aidl and
INetworkQueryService.aidl into my app folder (~/android_src/packages/
apps/USSDActivity/src/com/myapp/ussdactivitytest) however when i am
building alongside android source I am getting the following error:

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Aidl: com.myapp.ussdactivity <= packages/apps/USSDActivity/src/com/
myapp/ussdactivitytest/INetworkQueryService.aidl
Aidl: com.myapp.ussdactivity <= packages/apps/USSDActivity/src/com/
myapp/ussdactivitytest/INetworkQueryServiceCallback.aidl
packages/apps/USSDActivity/src/com/myapp/ussdactivitytest/
INetworkQueryServiceCallback.aidl:19: couldn't find import for class
com.android.internal.telephony.gsm.NetworkInfo
make: *** [out/target/common/obj/JAVA_LIBRARIES/
com.myapp.ussdactivity_intermediates/src/src/com/myapp/
ussdactivitytest/INetworkQueryServiceCallback.java] Error 1

Android.mk:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SRC_FILES += \
        src/com/myapp/ussdactivitytest/EventLogTags.logtags \
        src/com/myapp/ussdactivitytest/INetworkQueryService.aidl \
        src/com/myapp/ussdactivitytest/
INetworkQueryServiceCallback.aidl

#maliha before any including any $(BUILD_XXXX) script.
LOCAL_MODULE := com.myapp.ussdactivity
include $(BUILD_STATIC_JAVA_LIBRARY)
include $(CLEAR_VARS)
LOCAL_STATIC_JAVA_LIBRARIES := com.android.phone.common
LOCAL_JAVA_LIBRARIES := core framework
#maliha fix FRAMEWORKS_BASE_JAVA_SRC_DIRS comes from build/core/
pathmap.mk
LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)

LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SRC_FILES += \
        src/com/myapp/ussdactivitytest/EventLogTags.logtags \
        src/com/myapp/ussdactivitytest/INetworkQueryService.aidl \
        src/com/myapp/ussdactivitytest/
INetworkQueryServiceCallback.aidl

LOCAL_PACKAGE_NAME := USSDActivity
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
# Build the test package
include $(call all-makefiles-under,$(LOCAL_PATH))

Cheerio!
- Maliha

-- 



aidl link error, couldn't find import for class com.android.internal.telephony.gsm.NetworkInfo

by maliha » Thu, 19 May 2011 22:35:34 GMT


 Hi,

I am trying to re-use PhoneUtils.java (~/android_src/packages/apps/
Phone/src/com/android/phone/) within my app with some customizations.

I have added INetworkQueryServiceCallback.aidl and
INetworkQueryService.aidl into my app folder (~/android_src/packages/
apps/USSDActivity/src/com/myapp/ussdactivitytest) however when i am
building alongside android source I am getting the following error:

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Aidl: com.myapp.ussdactivity <= packages/apps/USSDActivity/src/com/
myapp/ussdactivitytest/INetworkQueryService.aidl
Aidl: com.myapp.ussdactivity <= packages/apps/USSDActivity/src/com/
myapp/ussdactivitytest/INetworkQueryServiceCallback.aidl
packages/apps/USSDActivity/src/com/myapp/ussdactivitytest/
INetworkQueryServiceCallback.aidl:19: couldn't find import for class
com.android.internal.telephony.gsm.NetworkInfo
make: *** [out/target/common/obj/JAVA_LIBRARIES/
com.myapp.ussdactivity_intermediates/src/src/com/myapp/
ussdactivitytest/INetworkQueryServiceCallback.java] Error 1

Android.mk:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SRC_FILES += \
        src/com/myapp/ussdactivitytest/EventLogTags.logtags \
        src/com/myapp/ussdactivitytest/INetworkQueryService.aidl \
        src/com/myapp/ussdactivitytest/
INetworkQueryServiceCallback.aidl

#maliha before any including any $(BUILD_XXXX) script.
LOCAL_MODULE := com.myapp.ussdactivity
include $(BUILD_STATIC_JAVA_LIBRARY)
include $(CLEAR_VARS)
LOCAL_STATIC_JAVA_LIBRARIES := com.android.phone.common
LOCAL_JAVA_LIBRARIES := core framework
#maliha fix FRAMEWORKS_BASE_JAVA_SRC_DIRS comes from build/core/
pathmap.mk
LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)

LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SRC_FILES += \
        src/com/myapp/ussdactivitytest/EventLogTags.logtags \
        src/com/myapp/ussdactivitytest/INetworkQueryService.aidl \
        src/com/myapp/ussdactivitytest/
INetworkQueryServiceCallback.aidl

LOCAL_PACKAGE_NAME := USSDActivity
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
# Build the test package
include $(call all-makefiles-under,$(LOCAL_PATH))

Cheerio!
- Maliha

-- 


Sponsored Links


Other Threads

1. Simple question... how do I open the browser?

You need to use an intent

startActivity(new Intent(Intent.ACTION_VIEW, newUri ));




-- 

2. retrive checked CheckBoxes鈥檚 items in Listview

Hi,

Ive got ListActivity and i am using custom CursorAdapter.

in my list view i have items. in each item i got also a checkbox.

the listview is binded to database via CursorAdapter.

I want on a button press, to retrieve all items which thire checkboxes
status is CHECKED.

how can i retrive all the checked ones?

ive done focusable:false, so i can use OnClickListener, but i dont
know how farther then this..

but in other hand:
protected void onListItemClick(android.widget.ListView l, View v,
                int position, long id)

donesnt realy resdpond:


some code:

this is in my ListActivity class:

    final String columns[] = new String[] { MyUsers.User._ID,
            MyUsers.User.MSG, MyUsers.User.LOCATION };

    int[] to = new int[] { R.id.toptext,
R.id.bottomtext,R.id.ChkBox,
R.id.Location};

    Uri myUri = Uri
    .parse("content://com.idan.datastorageprovider/users");

    Cursor cursor = getContentResolver().query(myUri, columns, null,
null, null);

                startManagingCursor(cursor);


    ListCursorAdapter myCursorAdapter=new ListCursorAdapter(this,
            R.layout.listitem, cursor, columns, to);

     this.setListAdapter(myCursorAdapter);
and this is my Custom Cursor adapter class:

public class ListCursorAdapter extends SimpleCursorAdapter

{

     private Context context;
private int layout;

public ListCursorAdapter(Context context, int layout, Cursor c,
        String[] from, int[] to)
{
    super(context, layout, c, from, to);

    this.context = context;

    this.layout = layout;

}

@Override
public View newView(Context context, Cursor cursor, ViewGroup parent)
{

    Cursor c = getCursor();

    final LayoutInflater inflater = LayoutInflater.from(context);
    View v = inflater.inflate(layout, parent, false);
               return v;
      }
@Override

public void bindView(View v, Context context, Cursor c)
{
    TextView topText = (TextView) v.findViewById(R.id.toptext);
    if (topText != null)
    {
        topText.setText("");
    }

    int nameCol = c.getColumnIndex(MyUsers.User.MSG);
    String name = c.getString(nameCol);
    TextView buttomTxt = (TextView) v.findViewById(R.id.bottomtext);
    if (buttomTxt != null)
    {
        buttomTxt.setText("Message: "+name);
    }

    nameCol = c.getColumnIndex(MyUsers.User.LOCATION);
    name = c.getString(nameCol);
    TextView location = (TextView) v.findViewById(R.id.Location);
    if (locationLinkTxt != null)
    {
        locationLinkTxt.setText(name);
    }

    }

Thanks

-- 

3. Application flow/interaction graphing

4. Dalvik Turbo

5. Hey Mr or Ms Moderator...

6. Share intent

7. Acne Treatement