Skip to content

ERROR: No build artifacts found #3774

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

Closed
archerLj opened this issue Mar 13, 2019 · 5 comments
Closed

ERROR: No build artifacts found #3774

archerLj opened this issue Mar 13, 2019 · 5 comments

Comments

@archerLj
Copy link

I'm following the build step on JitPack. And JitPack builds always failed. I cannot find the error in my library setting.

build.gradle of project:

buildscript {
    ext.kotlin_version = '1.3.20'
    repositories {
        google()
        jcenter()
        
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

build.gradle of library:

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
group='com.github.archerLj'
version = '2.0'

android {
    compileSdkVersion 28



    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'com.android.support:appcompat-v7:28.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

and there's the build result:

Build starting...
Start: Wed Mar 13 02:47:00 UTC 2019 ba3a7d1bf6f5
Git:
2.0-0-g88af331
commit 88af331e6fa1003b6d50dd54872057db7ef21c55
Author: archerLj 
Date:   Wed Mar 13 10:45:54 2019 +0800

    init


Found Android manifest
Android SDK version: 28. Build tools: 
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Warning: File /opt/android-sdk-linux/.android/repositories.cfg could not be loaded.

Installing Android platform 28
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Warning: File /opt/android-sdk-linux/.android/repositories.cfg could not be loaded.
Found gradle
Gradle build script
Using gradle wrapper
./gradlew: 159: printf: missing format character
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Downloading https://services.gradle.org/distributions/gradle-4.10.1-all.zip
.
Unzipping /home/jitpack/.gradle/wrapper/dists/gradle-4.10.1-all/455itskqi2qtf0v2sja68alqd/gradle-4.10.1-all.zip to /home/jitpack/.gradle/wrapper/dists/gradle-4.10.1-all/455itskqi2qtf0v2sja68alqd
Set executable permissions for: /home/jitpack/.gradle/wrapper/dists/gradle-4.10.1-all/455itskqi2qtf0v2sja68alqd/gradle-4.10.1/bin/gradle

Welcome to Gradle 4.10.1!

Here are the highlights of this release:
 - Incremental Java compilation by default
 - Periodic Gradle caches cleanup
 - Gradle Kotlin DSL 1.0-RC6
 - Nested included builds
 - SNAPSHOT plugin versions in the `plugins {}` block

For more details see https://docs.gradle.org/4.10.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :app
File /opt/android-sdk-linux/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 28.0.3 in /opt/android-sdk-linux/licenses
License for package Android SDK Build-Tools 28.0.3 accepted.
Preparing "Install Android SDK Build-Tools 28.0.3 (revision: 28.0.3)".
"Install Android SDK Build-Tools 28.0.3 (revision: 28.0.3)" ready.
Installing Android SDK Build-Tools 28.0.3 in /opt/android-sdk-linux/build-tools/28.0.3
"Install Android SDK Build-Tools 28.0.3 (revision: 28.0.3)" complete.
"Install Android SDK Build-Tools 28.0.3 (revision: 28.0.3)" finished.

> Task :help

Welcome to Gradle 4.10.1.

To run a build, run gradlew <task> .

To see a list of available tasks, run gradlew tasks

To see a list of command-line options, run gradlew --help

To see more detail about a task, run gradlew help --task <task>

For troubleshooting, visit https://help.gradle.org

BUILD SUCCESSFUL in 28s
1 actionable task: 1 executed
0m4.838s
Getting tasks: ./gradlew tasks --all
./gradlew: 159: printf: missing format character
./gradlew: 159: printf: missing format character
./gradlew: 159: printf: missing format character
./gradlew: 159: printf: missing format character
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Tasks: 

WARNING:
Gradle 'install' task not found. Please add the 'maven' or 'android-maven' plugin.
See the documentation and examples: https://jitpack.io/docs/

Adding maven plugin
Found android library build file in customlibrary
Running: ./gradlew clean -Pgroup=com.github.archerLj -Pversion=2.0 install
./gradlew: 159: printf: missing format character
./gradlew: 159: printf: missing format character
./gradlew: 159: printf: missing format character
./gradlew: 159: printf: missing format character
./gradlew: 159: printf: missing format character
./gradlew: 159: printf: missing format character
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2

> Configure project :
Gradle version Gradle 4.10.1

> Task :help

Welcome to Gradle 4.10.1.

To run a build, run gradlew <task> ...

To see a list of available tasks, run gradlew tasks

To see a list of command-line options, run gradlew --help

To see more detail about a task, run gradlew help --task <task>

For troubleshooting, visit https://help.gradle.org

BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed
Looking for artifacts...
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Looking for pom.xml in build directory and ~/.m2
EXIT_CODE=0
2019-03-13T02:47:39.996897504Z
Exit code: 0

ERROR: No build artifacts found
@jitpack-io
Copy link
Member

Hi,

There seems to be an issue with the Gradle wrapper:
./gradlew: 159: printf: missing format character

@archerLj
Copy link
Author

archerLj commented Mar 14, 2019

@jitpack-io Thanks for your time, but i still can't find out what's wrong in my build.gradle. Can you tell me which step is lost? It's really hard to me to tell what led to this issue.

@jitpack-io
Copy link
Member

The error is in the gradlew file. Perhaps try to re-generate the Gradle wrapper and run your build locally with the command:

  • ./gradlew install

If the command works locally then it should work on JitPack.

@archerLj
Copy link
Author

@jitpack-io It works. Maybe it's the problem of gradle. I did ./gradlew install before, but it does not work. This time i update my gradle to version 5.2.1, and re-execute this command, and everything goes well.

@kuang2010
Copy link

you can try update your release version after the gradle file changed

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

3 participants