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. Determine images at runtime - getResources().getIdentifier()

Hi all,

in my application I have a table that stores information for symbols.
These symbols have to be displayed, so also the source, the *.png, is
stored in each row. These symbols are loaded randomly at runtime.

How do I get the the image(s) to be loaded?

getResources().getIdentifier(symbolIdentifier, null, null) always
results 0 (zero).

Here is the code:
    private void loadSymbol(final String source) {
        int imageIdentifier = getResources().getIdentifier
(symbolIdentifier, null, null);
        Bitmap bitmap = BitmapFactory.decodeResource(getResources(),
imageIdentifier);
        mImageOfSymbol.setImageBitmap(bitmap);
        mImageOfSymbol.setVisibility(ImageView.VISIBLE);
        mImageOfSymbol.refreshDrawableState();
    }

It says in the JavaDoc that the use of getIdentifier() is discouraged.
What is a best practice to load images at runtime, when only knowing
the source as a string?

Many thanks in advance.

Ciao,
  Tommaso
--~--~---------~--~----~------------~-------~--~----~

2. How to setclip of a view

There is another post asked this question. A guy give a solution using
invalidate(int, int, int, int). But this seems work only once -- the
drawing right after the invalidate. After that time of drawing, every
repaint will draw the whole view. I need a real setClip permanent.

Any help will be highly appriciated.

--~--~---------~--~----~------------~-------~--~----~

3. Queue and Display Call Log, Names Only

4. Build application with Android OS source code

5. problem occur while writing andro id.provider.Settings.Secu颅re.ENABLED_INPUT_METHODS

6. CheckBox test= (CheckBox) findViewById(R.id.test); returns null

7. rebooting from application