Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Mobile

NoSuchMethodError encodeBase64String on an Android Application

5 replies [Last post]
  • Login or register to post comments
Thu, 04/26/2012 - 00:50
sz0n3
Offline
Joined: 04/26/2012
Groups: None

Hello.

I'm trying to use the libraries(couchbase-client-1.0.2,spymemcached-2.8.0, etc.) on a mobile android application, and following the starting tutorial, but in my main activity instead a java application, it compiles, but when I'm about to run the app on the emulator or my phone, I got this exception on logcat and my application crashes:

java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.encodeBase64String

I don't know if I'm using the library on the right way but it seems that android, internally uses this apache library and it has an older version of the class(Base64) that doesn't contain that method.

Does anyone have an idea how to solve this problem?

As an alone java application, it doesn't throw that exception, and the example is running ok, with some problems on requesting an https URL, but it's another topic problem.

Sorry for my bad english and thanks in advance.

Cheers.

Top
  • Login or register to post comments
Thu, 04/26/2012 - 06:39
mschoch
Offline
Joined: 08/03/2011
Groups: None

Hi,

Before going any further it would help to understand what you're trying to do. Generally speaking the Couchbase Java Client wasn't intended to be used in the Android environment. Typically Couchbase Server is deployed in a firewalled environment and only accessed by an application or application server. So running the client on an Android phone doesn't fit this model.

There is also the Couchbase Mobile project. However, this works with Apache CouchDB and not Couchbase Server. It also uses different client libraries such as Ektorp.

So, if you can provide a little more info about what you're trying to do we can figure out which way you should proceed.

marty

Top
  • Login or register to post comments
Thu, 04/26/2012 - 16:21
sz0n3
Offline
Joined: 04/26/2012
Groups: None

Thank you very much for the answer, the fact is that I obviously am trying to do things in a wrong way, I'm going to try with Couchbase Mobile and let you know if it works.

Thanks again!

Top
  • Login or register to post comments
Tue, 05/22/2012 - 06:36
bennyb
Offline
Joined: 05/22/2012
Groups: None

Which version of android environment are you running?

Top
  • Login or register to post comments
Fri, 07/27/2012 - 21:43
KanyeWest
Offline
Joined: 07/27/2012
Groups: None

Nice, was getting this same issue when working on my android app. Thank god theres an active support forum!

Top
  • Login or register to post comments
Thu, 08/23/2012 - 01:31
satyen4uall
Offline
Joined: 08/23/2012
Groups: None

if the apps are not working one of the main reason could be the compatibility issue.. whether the app version of device issue.

iphone app reviews

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker