Error java.lang.NoClassDefFoundError when trying to instantiate a GCS service

I am very new to java / Android development. My optional IDE is Android Studio. Essentially, I need to upload vidoes clips / video clips and audio clips to GCS. I create a service instance like this

"final GcsService gcsService => GcsServiceFactory.createGcsService (RetryParams.getDefaultInstance ());"
When I launch the application, I get the following
java.lang.NoClassDefFoundError error : com.google.appengine.api.utils.SystemProperty at> com.google.appengine.tools.cloudstorage.GcsServiceFactory.createRawGcsService (GcsServiceFact: ory.) at> com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService (GcsServiceFactory> .java: 34) at> com.horcu.lme.gavi.cloud.CloudPersister.downloadDataFromGcs (CloudPersister.java:30) at> com.chor .lme.gavi.MainActivity $ PlaceholderFragment.onCreateView (MainActivity.java:159)
The dependency section of my build.gradle file is as follows

dependencies {compile 'com.android.support:support-v4:19.0.1' msgstr "compile fileTree (dir: 'libs', include: [' * .jar ']) compile' com.google.guava: guava-collections : r03 @jar 'compile' com.google.appengine.tools:appengine-gcs-client: 0.3.3@jar 'compile' commons-io: commons-io: 20030203.000550@jar '

}

As you can see, I am including the appengine-gcs-client jar application file and it compiles just fine, but it crashes at runtime. Can anyone suggest a fix for this?

+1
source share
1 answer

, . , GCS , appengine-gcs-client. -, , joda-time.jar.

, API, , Google Java, ?
https://code.google.com/p/google-api-java-client/

, , "com.google.appengine.api.utils.SystemProperty", . JAR ? Android Studio, , JAR- JAR - , .

Android Studio, Eclipse + ADT, . Google , Android STudio GAE, Android , .

+1

Source: https://habr.com/ru/post/1545455/


All Articles