Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAILURE: Build failed with an exception. #42

Closed
ShreyashPromact opened this issue Feb 17, 2015 · 9 comments
Closed

FAILURE: Build failed with an exception. #42

ShreyashPromact opened this issue Feb 17, 2015 · 9 comments

Comments

@ShreyashPromact
Copy link

Hello,

I have include your library and try to upload apk file to my developer account. But i am not able to get it updated. I got error message with log like below:

D:\someDirectory\myProject>gradlew publishApkRelease
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy
:buildSrc:processResources UP-TO-DATE
:buildSrc:classes
:buildSrc:jar
:buildSrc:assemble
:buildSrc:compileTestJava UP-TO-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:build

FAILURE: Build failed with an exception.

  • What went wrong:
    Failed to notify task execution graph listener.

    com.google.common.hash.HashCode.fromString(Ljava/lang/String;)Lcom/google/comm
    on/hash/HashCode;
    com.google.common.hash.HashCode.fromString(Ljava/lang/String;)Lcom/google/comm
    on/hash/HashCode;
    com.google.common.hash.HashCode.fromString(Ljava/lang/String;)Lcom/google/comm
    on/hash/HashCode;
    com.google.common.hash.HashCode.fromString(Ljava/lang/String;)Lcom/google/comm
    on/hash/HashCode;
    com.google.common.hash.HashCode.fromString(Ljava/lang/String;)Lcom/google/comm
    on/hash/HashCode;

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

BUILD FAILED

Total time: 6.929 secs

Am i doing something wrong or there is problem with the library. Please help me to resolved this issue.

@bhurling
Copy link
Contributor

Looks like there is an issue with an old version of the guava lib library. What version of this plugin are you using? Do you apply any other plugins? The buildscript section of your build.gradle might help.

@ShreyashPromact
Copy link
Author

Thanks for reply to my issue.
I am using version 15.0 for guave
Please check my below build.gradle for more information.

apply plugin: 'play'
buildscript {
repositories {
mavenCentral()
}
dependencies {
// ...
classpath 'com.github.triplet.gradle:play-publisher:1.0.2'
classpath 'com.google.guava:guava:15.0'

}

}

play {
serviceAccountEmail = 'someRandomNumber@developer.gserviceaccount.com'
pk12File = file('D:\SomeDirectory\MyProject\NUMBER.p12')
track = 'beta' // or 'beta' or 'alpha' or 'production'
}

I have also put question on SO with below link. So that you can also answer there if you have solution to that.
http://stackoverflow.com/questions/28560205/exception-during-publishing-app-with-savillians-gradle-and-triple-t-gradle
Thanks.

@ShreyashPromact
Copy link
Author

I have just added latest version of guava 18.0 its start downloading it first then try to build the project but then same issue. :(.
Need help please.

@ShreyashPromact
Copy link
Author

Other than this library, i have apply the android application plugin for my project.
apply plugin: 'com.android.application'

@ShreyashPromact
Copy link
Author

Hello bhurling,
That issue is resolved. I guess i have added the configuration and other task with wrong manner. So because of that, it is first looking for the release apk file to upload even it is not build. Because of that I might got issue.

But, after configuring all with in separate tasks (First Build then release), its working great.

Below is my gradle.build file. It might help others if anyone getting same problem.
//-------------------------------------------------------------
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
}

Thanks for your support and valuable reply to my query.

@bhurling
Copy link
Contributor

Before I close this issue I'd like to clarify: For what purpose do you need guava on the builscript class path? I think you can just drop that extra line because the android plugin transitively pulls in version 18 anyway.

@ShreyashPromact
Copy link
Author

Hi, Thanks for the reply and information. I am not sure guava is required or not. But there is on some SO answer it is said that you will required that to be added in to dependency of the buildScript. You can refer this: http://stackoverflow.com/questions/23413126/nosuchmethoderror-hashcode-fromstring-when-using-com-android-tools-buildgradle

Please let me know if it is required or not? If not then what is the alternate of it?

@ShreyashPromact
Copy link
Author

@bhurling yes, you are right. There is no need for guava library. I have just commented it and try to upload it. It works great.

Thanks for support and your valuable replies. I would like to know more for how i can upload description for the information of my uploaded build, How i can upload images for the app or what maximum i can do with your library.

Sincerely,
Shreyash.

@bhurling
Copy link
Contributor

You need to drop your descriptions and screenshots into a folder structure as described in the README. You should also consider running the bootstrapReleasePlayResources task that helps setting up that structure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants