FAILURE: Build failed with exception. When downloading apk with Savillians- gradle and Triple-T gradle

I tried savillians-gradle and Triplet-T to publish my apk to the Play Store using gradle. However, I got the same problem in both directions. I guess I can do something wrong or there may be a problem from both libraries. I do not know where the problem is.

I configured everything as a mention of the fact that I can successfully build gradle in both directions.

Then I will try to download the apk file for playback in the store, but received an error message.

  • Please checck my below implementation and output for savillians gradle

I have a gradle task running as below:

gradlew androidPublish

With the above command, I received an error message as shown below:

D: \ Directory \ myproject> gradlew AndroidPublish: buildSrc: compileJava UP-TO-DATE: BuildSrc: compileGroovy: buildSrc: processResources UP-TO-DATE: buildSrc: classes: BuildSrc: jar: BuildSrc: assembly: buildSrc: compileTestJ -DATE: buildSrc: compileTestGroovy UP-TO-DATE: buildSrc: processTestResources UP-TO-DATE: buildSrc: testClasses UP-TO-DATE: buildSrc: test UP-TO-DATE: buildSrc: check UP-TO-DATE: BuildSrc: to build

FAILURE: assembly failure with exception.

  • What went wrong: Failed to notify the listener about the completion of the task.

    com.google.common.hash.HashCode.fromString (Ljava / languages ​​/ String;) Lcom / Google / Other on / hash / HashCode; com.google.common.hash.HashCode.fromString (Ljava / languages ​​/ string;) LCOM / Google / Other on / hash / HashCode; com.google.common.hash.HashCode.fromString (Ljava / languages ​​/ string;) LCOM / Google / Other on / hash / HashCode; com.google.common.hash.HashCode.fromString (Ljava / languages ​​/ string;) LCOM / Google / Other on / hash / HashCode; com.google.common.hash.HashCode.fromString (Ljava / languages ​​/ string;) LCOM / Google / Other on / hash / HashCode;

  • Try: Run with the --stacktrace option to get a stack trace. Run with --info or --debug to get more log output.

STRICTLY MALFUNCTIONAL

Total time: 23.185 seconds

  • Please checck my below implementation and output for Triplet-T gradle

I have a gradle task running as below:

gradlew publishApkRelease

With the above command, I received an error message as shown below:

D: \ Directory \ myproject> gradlew publishApkRelease: buildSrc: compileJava UP-TO-DATE: BuildSrc: compileGroovy: buildSrc: processResources UP-TO-DATE: buildSrc: classes: BuildSrc: jar: BuildSrc: build: buildSrc: UPileTestTileTest -DATE: buildSrc: compileTestGroovy UP-TO-DATE: buildSrc: processTestResources UP-TO-DATE: buildSrc: testClasses UP-TO-DATE: buildSrc: test UP-TO-DATE: buildSrc: check UP-TO-DATE: BuildSrc: to build

FAILURE: assembly failure with exception.

  • What went wrong: Failed to notify the listener about the completion of the task.

    com.google.common.hash.HashCode.fromString (Ljava / languages ​​/ String;) Lcom / Google / Other on / hash / HashCode; com.google.common.hash.HashCode.fromString (Ljava / languages ​​/ string;) LCOM / Google / Other on / hash / HashCode; com.google.common.hash.HashCode.fromString (Ljava / languages ​​/ string;) LCOM / Google / Other on / hash / HashCode; com.google.common.hash.HashCode.fromString (Ljava / languages ​​/ string;) LCOM / Google / Other on / hash / HashCode; com.google.common.hash.HashCode.fromString (Ljava / languages ​​/ string;) LCOM / Google / Other on / hash / HashCode;

  • Try: Run with the --stacktrace option to get a stack trace. Run with --info or --debug to get more log output.

STRICTLY MALFUNCTIONAL

Total time: 6.9 seconds

So please help me in this matter. I need help downloading apk file for playback in repository using gradle.

0
android android-gradle google-play app-store gradle
Feb 17 '15 at 10:48
source share
1 answer

This issue has been resolved. I guess I added the wrong configuration and another task. Therefore, because of this, he first looks for the apk file for the release, which he downloads, even if it is not created. Because of this, I may have a problem.

But after setting everything up with separate tasks (First Build, then release), it works fine.

Below is my gradle.build file. This can help others if someone is having problems.

// --------------------------------------------- --- -------------

apply plugin: 'com.android.application' android { compileSdkVersion 19 buildToolsVersion "21.1.1" defaultConfig { applicationId "com.your_package.your_project" minSdkVersion 14 targetSdkVersion 20 versionCode 10 versionName "0.0.9" } signingConfigs { release { storeFile file("C:\PATH_FOR_KEYSTORE\YOUR_KEYSTORE.keystore") storePassword "KEYSTORE_PASSWORD" keyAlias "KEYSTORE_ALIAS" keyPassword "ALIAS_PASSWORD" } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' signingConfig signingConfigs.release } debug { } } packagingOptions { exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' exclude 'META-INF/LICENSE' exclude 'META-INF/NOTICE' } } // For the TRIPLET gradle demo apply plugin: 'play' buildscript { repositories { mavenCentral() } dependencies { // ... classpath 'com.github.triplet.gradle:play-publisher:1.0.2' classpath 'com.google.guava:guava:18.0' } } play { serviceAccountEmail = 'randomNumber@developer.gserviceaccount.com' pk12File = file('D:\someDirectory\MyProject\number.p12') track = 'beta' // or 'beta' or 'alpha' or 'production' } dependencies { // some required dependencies for the project library } 

Hope this helps others and save their time when they have such a problem.

Enjoy the coding ... :)

+1
Feb 18 '15 at 13:13
source share



All Articles