Visitar URL original
Getting an Android build error on old legacy nativescript system · Issue #1823 · NativeScript/android · GitHub
Skip to content

Getting an Android build error on old legacy nativescript system #1823

Description

@erjdriver

I've got a legacy app that needs to be maintained.

Here's the tns info

✔ Getting NativeScript components versions information...
⚠ Update available for component nativescript. Your current version is 8.5.3 and the latest available version is 8.8.2.
✔ Component tns-core-modules has 6.5.27 version and is up to date.
⚠ Update available for component @nativescript/ios. Your current version is 6.5.6 and the latest available version is 8.8.2.
⚠ Update available for component @nativescript/android. Your current version is 8.5.4 and the latest available version is 8.8.5.

When I do a tns build android, get the following error

Build file '/Users/mini/Projects/ccs-mobile/platforms/android/app/build.gradle' line: 586
A problem occurred configuring project ':app'.
Could not find net.gotev:uploadservice:3.4.2.
Required by:
    project :app

Command ./gradlew failed with exit code 1

Here's my build.gradle file with line 586

// Discover all jars and dynamically create tasks for the extraction of each of them
project.ext.allJars = []
allprojects {
    afterEvaluate { project ->
        def buildType = project.selectedBuildType
        def jars = []
        def artifactType = Attribute.of('artifactType', String)
        android.applicationVariants.all { variant ->
            if (variant.buildType.name == buildType) {
                variant.getCompileClasspath().each { fileDependency ->         <<<<<<<< line 586
                    processJar(fileDependency, jars)
                }
            }
        }
    }
}

This is legacy app and would just like to build it without changes - I didn't make any changes since last successful build which was about 6 months ago. Help appreciated!

Activity

  1. HForbus commented on Nov 1, 2024

    @HForbus

    We are having a similar issue when building an 8.8.4 app. I get a different error but it points to the same line.

    Error:

    <redacted>/app/platforms/android/app/build.gradle' line: 574
    A problem occurred configuring project ':app'.
    invalid code lengths set
    
    // Discover all jars and dynamically create tasks for the extraction of each of them
    project.ext.allJars = []
    allprojects {
        afterEvaluate { project ->
            def buildType = project.selectedBuildType
            def jars = []
            def artifactType = Attribute.of('artifactType', String)
            android.applicationVariants.configureEach { variant ->
                if (variant.buildType.name == buildType) {
                    variant.getCompileClasspath(null).each { fileDependency ->             <<<< Line 574
                        processJar(fileDependency, jars)
                    }
                }
            }
        }
    }
    

    Environment Info:

    ✔ Component nativescript has 8.8.2 version and is up to date.
    ✔ Component @nativescript/core has 8.8.4 version and is up to date.
    ✖ Component @nativescript/ios is not installed.
    ✔ Component @nativescript/android has 8.8.6 version and is up to date.
    
    openjdk version "17.0.13" 2024-10-15
    OpenJDK Runtime Environment Temurin-17.0.13+11 (build 17.0.13+11)
    OpenJDK 64-Bit Server VM Temurin-17.0.13+11 (build 17.0.13+11, mixed mode, sharing)
    
  2. triniwiz commented on Nov 1, 2024

    @triniwiz
    Member

    You will need a couple things an older cli, npm, node and runtimes.

  3. erjdriver commented on Nov 3, 2024

    @erjdriver
    Author

    Any headway on this?

    This component net.gotev:uploadservice:3.4.2 is being used by one of the ns modules - but haven't been able to figure out which.

    I'm using android@8.5.4 - but looking at my revisions looks like last one that worked was 6.5.3 - but when I try to add that version - nothing loads. I get

    Command npm failed with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions