简体   繁体   English

java.lang.NoSuchMethodError:com.google.api.client.util.Strings.isNullOrEmpty

[英]java.lang.NoSuchMethodError: com.google.api.client.util.Strings.isNullOrEmpty

I am trying to upload the users profile Image in the Google Cloud Storage when i run my application in local It does not affect the oAuth flow and the image uploading is also fine. 当我在本地运行我的应用程序时,我试图在Google Cloud Storage中上传用户个人资料图像。这不会影响oAuth流程,并且图像上传也可以。 But when I deploy the same into Google App Engine Image uploading flow fails by throwing an Runtime exception java.lang.NoSuchMethodError: com.google.api.client.util.Strings.isNullOrEmpty 但是,当我将其部署到Google App Engine图像时,由于抛出运行时异常java.lang.NoSuchMethodError:com.google.api.client.util.Strings.isNullOrEmpty,上传流程失败

Here is my code 这是我的代码

    private static GCSUpload gcs = null;
    public static synchronized GCSUpload instance() {
        if (gcs == null)
            gcs = new GCSUpload();
        return gcs;
    }

I included the following jars 我包括以下罐子

google-api-client-1.4.1-beta google-api-client-1.5.0-beta google-api-client-1.4.1-beta google-api-client-1.5.0-beta

I also include other jar files needed. 我还包括其他需要的jar文件。 Removing google-api-client-1.4.1-beta jar fails the image uploading flow in local itself and removing google-api-client-1.5.0-beta jar fails oAuth flow in local itself adding these jar works properly in local but not in GAE Can anyone help me. 删除google-api-client-1.4.1-beta jar无法在本地本身中上传图像,而删除google-api-client-1.5.0-beta jar则无法在本地oAuth流中添加这些jar,但在本地正常工作在GAE中有人可以帮助我吗? Thanks in advance!. 提前致谢!。

How are you uploading your code? 您如何上传代码? If you're using Eclipse, be wary of adding external libraries that don't "follow" your code when you deploy. 如果您使用的是Eclipse,请避免添加在部署时不会“遵循”代码的外部库。 Make sure all external jars you add are in WEB-INF/lib. 确保您添加的所有外部jar都在WEB-INF / lib中。

This was explained here . 这在这里解释

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 谷歌驱动器dredit错误java.lang.NoSuchMethodError:com.google.api.client.http.HttpRequestFactory.buildRequest - google drive dredit error java.lang.NoSuchMethodError: com.google.api.client.http.HttpRequestFactory.buildRequest GAE:java.lang.NoSuchMethodError:com.google.api.client.json.GenericJson.set - GAE: java.lang.NoSuchMethodError: com.google.api.client.json.GenericJson.set java.lang.NoSuchMethodError: com.google.api.client.http.HttpTransport.isMtls()Z - java.lang.NoSuchMethodError: com.google.api.client.http.HttpTransport.isMtls()Z java.lang.NoSuchMethodError: 'boolean com.google.api.client.http.HttpTransport.isMtls() - java.lang.NoSuchMethodError: 'boolean com.google.api.client.http.HttpTransport.isMtls() java.lang.NoSuchMethodError:com.google.api.services.admin.reports.Reports $ Activities.watch - java.lang.NoSuchMethodError: com.google.api.services.admin.reports.Reports$Activities.watch AppEngine错误:java.lang.NoSuchMethodError:com.google.appengine.api.search.Index.add - AppEngine Error: java.lang.NoSuchMethodError: com.google.appengine.api.search.Index.add google appengine issue - java.lang.NoSuchMethodError:com.google.common.collect.ImmutableList.copyOf(Ljava / util / Collection - google appengine issue - java.lang.NoSuchMethodError: com.google.common.collect.ImmutableList.copyOf(Ljava/util/Collection java.lang.NoSuchMethodError:com.google.api.server.spi.SystemService.builder端点2.0 - java.lang.NoSuchMethodError: com.google.api.server.spi.SystemService.builder Endpoints 2.0 App Engine Java部署错误:java.lang.NoSuchMethodError:com.google.common.reflect.TypeToken.isSubtypeOf - App Engine Java Deployment Error: java.lang.NoSuchMethodError: com.google.common.reflect.TypeToken.isSubtypeOf 找到:'java.util.Date',需要:'com.google.api.client.util.DateTime' GAE - Found: 'java.util.Date', required: 'com.google.api.client.util.DateTime' GAE
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM