Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8114867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:17:04+00:00 2026-06-06T03:17:04+00:00

I am facing an error while binding the service with interface stub() . Here

  • 0

I am facing an error while binding the service with interface stub().

Here is my Connection code:

class LogConnection implements ServiceConnection {

    public void onServiceConnected(ComponentName className,
            IBinder boundService) {
        logService = ILogService.Stub.asInterface((IBinder) boundService);
    }

but its not working for me.

Logcat:

06-22 12:17:28.632: I/dalvikvm(1973): Could not find method com.sam.logservice.ILogService$Stub.asInterface, referenced from method com.sam.logclient.LogClientActivity$LogConnection.onServiceConnected
06-22 12:17:28.662: W/dalvikvm(1973): VFY: unable to resolve static method 28: Lcom/sam/logservice/ILogService$Stub;.asInterface (Landroid/os/IBinder;)Lcom/sam/logservice/ILogService;
06-22 12:17:28.662: D/dalvikvm(1973): VFY: replacing opcode 0x71 at 0x0009
06-22 12:17:28.662: D/dalvikvm(1973): VFY: dead code 0x000c-0016 in Lcom/sam/logclient/LogClientActivity$LogConnection;.onServiceConnected (Landroid/content/ComponentName;Landroid/os/IBinder;)V
06-22 12:17:28.702: W/ActivityManager(61): Unable to start service Intent { cmp=com.sam.logclient/com.sam.logservice.ILogService }: not found

EDIT:
I am following the example of below link :

Remote Service call

When I did Debugging the code at that time I struck at the same
position

  logService = ILogService.Stub.asInterface((IBinder) boundService);

Hope you have some solution.

Please let me know if you want more data to conclude on reason.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T03:17:06+00:00Added an answer on June 6, 2026 at 3:17 am

    In your code I observed thats why are you casting boundService it to IBinder there is actually no need to cast it just pass it as it is.
    So, your line should look like this

      logService = ILogService.Stub.asInterface(boundService);
    

    make sure the service written in same package ..

    The class where your extending service just create object of interface

     ILogService.Stub logService = new ILogService.Stub();
    

    and in onBind method return it as shown below

     @Override
        public IBinder onBind(Intent intent) {
            return logService;
        }
    

    Hope this explanation works for you .

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I didn't understand ..why I am facing this error.. Here is my code: package
I am facing error C2065: 'IOCTL_NDISUIO_OPEN_DEVICE' : undeclared identifier error in beneath code. Where
I am currently facing an error called Bad Base64Coder input character at ... Here
I am facing this error while running my Java/ GWT application Any idea Thanks
While executing the following code i gets this error Late bound operations cannot be
I am facing this error while running my GWT application. I have these jar
I have a problem that I am facing OuOfMemory Error while printing a string
Im a newbie to hibernate and I'm facing an error while trying to use
I am facing this error, Cannot create unknown Type '{clr- namespace:ActivityLibrary1;assembly=ActivityLibrary1}MyActivity1' while trying to
I am facing a strange problem while running my application. I have a class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.