Gradle assemble error.

Create issue
Issue #179 closed
Miku AuahDark created an issue

A change is missing to make compiling with API 26 work correctly. The root build.gradle must be changed to this one

// Top-level build file where you can add configuration options common to all sub-projects/modules.

allprojects {
    repositories {

buildscript {
    repositories {
    dependencies {
        classpath ''

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files

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

repositories {

I hope that build.gradle is used.

Related links about this issue:

Comments (8)

  1. Martin Felis repo owner

    As for overlooking: nope. I had forgotten to push the change until you mentioned the problem.

    As for the issue: seems to be related to running it from the CLI. When opening the directory using Android Studio it works for me. Though CLI would be much desirable. However even when using your build.gradle from a clean repo I get the following error messages:

     % ./gradlew assemble
    :app:preBuild UP-TO-DATE
    :love:preBuild UP-TO-DATE
    :love:preDebugBuild UP-TO-DATE
    :love:compileDebugAidl NO-SOURCE
    :app:compileDebugAidl NO-SOURCE
    :love:packageDebugRenderscript NO-SOURCE
    :love:compileDebugJavaWithJavac FAILED
    FAILURE: Build failed with an exception.
    * What went wrong:
    Execution failed for task ':love:compileDebugJavaWithJavac'.
    > Could not find tools.jar. Please check that /usr/lib/jvm/java-8-openjdk-amd64 contains a valid JDK installation.
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    * Get more help at
    BUILD FAILED in 4s
    23 actionable tasks: 23 executed

    Any ideas what the proper way is here?

  2. Miku AuahDark reporter

    That looks like because you're missing JAVA_HOME environment variable and Android Studio ships with their own JDK by default.

    Pada tanggal Sen, 10 Des 2018 05.55, Martin Felis <

  3. Miku AuahDark reporter

    Yep. Build now works correctly. However, there's this problem tho

    D:\Data\Dev\love-11.2\love-android\app\src\main\res\values-w820dp\dimens.xml:5: Error: The dimen "activity_horizontal_margin" in values-w820dp has no declaration in the base values folder; this can lead to crashes when the resource is queried in a configuration that does not match this qualifier [MissingDefaultResource]
        <dimen name="activity_horizontal_margin">64dp</dimen>

    Not a big deal I guess.

  4. Log in to comment