Thursday, November 6, 2014

Android Studio/IntelliJ false error Object.getClass() shows as ambiguous method call

Tired of seeing this issue? Yes, it's terrible because it creates a lot noise for us to find the real errors. And we don't want to bend our code to remove the redness in the IDE with this hack - ((Object)this).getClass(). Solution: Link into the source code by clicking getClass() in your IDE. We should see the code below
    public final Class<?> getClass() {//Remove <?>
      return shadow$_klass_;
    }
Remove the <?> and refresh the project. The red lines should be gone.
    public final Class getClass() {//<?> removed
      return shadow$_klass_;
    }

10 comments:

  1. I simply want to tell you that I’m all new to blogs and truly liked you’re blog site. Very likely I’m likely to bookmark your site . You surely come with remarkable articles. Cheers for sharing your website page.

    Hadoop Training in Chennai

    ReplyDelete
  2. wow really superb you had posted one nice information through this. Definitely it will be useful for many people. So please keep update like this.

    Email Marketing Chennai

    ReplyDelete
  3. Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your.
    Digital Marketing Company in India
    seo Company in India

    ReplyDelete
  4. Learning new technolgy would help oneself at hard part of their career. And staying updated is the only way to survive in current position. Your content tells the same. Thanks for sharing this information in here. Keep blogging like this. ios App Development Company in India

    ReplyDelete
  5. your information is really awesome as well as it is very excellent and i got more interesting information from your blog.
    Security alarm in Chennai

    ReplyDelete
  6. It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command .
    Australia Education Consultants in Chennai

    ReplyDelete
  7. Very nice post here and thanks for latest smartphone applications it .I always like and such a super colors of phone for these post.Excellent and very cool idea and great models and different kinds of the more information's.

    Fresher Jobs in Chennai
    Fresher Jobs in Delhi
    Fresher Jobs in Bangalore
    Fresher Jobs in Kolkata

    ReplyDelete

  8. That is very interesting; you are a very skilled blogger. I have shared your website in my social networks..!

    Payday loans in Alabama
    Title loans in South Carolina

    ReplyDelete
  9. I do trust all of the concepts you’ve presented on your post. They’re really convincing and will definitely work. Still, the posts are too brief for newbies. May you please extend them a little from subsequent time?Also, I’ve shared your website in my social networks.
    Informatica Training in Chennai
    iOS Training in Chennai
    J2EE Training in Chennai

    ReplyDelete
  10. Really Good blog post.provided a helpful information.I hope that you will post more updates like this.
    Digital marketing company in Chennai

    ReplyDelete