Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Build Failed due to leftShift() method not found in ":scalarinputapi:generateRelease" #38

Open
rlogical-techsoft opened this issue Jun 27, 2019 · 4 comments
Assignees

Comments

@rlogical-techsoft
Copy link

I am getting issue while importing project in Android Studio.

Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method leftShift() for arguments [android_release_aar_8aaffqenud6qsg8w8hrovmfvc$
_run_closure7@5f35a04c] on task ':scalarinputapi:generateRelease' of type org.gradle.api.DefaultTask.
        at org.gradle.internal.metaobject.AbstractDynamicObject.methodMissingException(AbstractDynamicObject.java:179)
        at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:164)
        at org.gradle.api.DefaultTask_Decorated.invokeMethod(Unknown Source)
        at android_release_aar_8aaffqenud6qsg8w8hrovmfvc.run(https://raw.githubusercontent.com/ArthurHub/release-android-library/master/android-release-aar.gradle:62)
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:90)

I can see there is << available in "https://raw.githubusercontent.com/ArthurHub/release-android-library/master/android-release-aar.gradle" and this is deprecated android not allowed this.

I have research on this issue but not getting the solution.

Please help me..

Thank you

@JeneaVranceanu
Copy link

Hi, @rlogical-techsoft ! I resolved the issue by downloading Gradle file behind this link. File was added to the same level as the build.gradle that uses this file.

<< was replaced with doLast { ... }. The solution is not good because file behind this link may change but you won't receive any updates.

The other solution would be to lower Gradle version to 4.. In version 4. sign << was deprecated but still used. In 5.* it was removed.

@lizlooney
Copy link
Contributor

Thanks for the bug report. I'll take a look.

@lizlooney lizlooney self-assigned this Jun 28, 2019
@rlogical-techsoft
Copy link
Author

@lizlooney : You mean you have downloaded the android-release-aar.gradle file and replaced << with doLast { ... }. Where you have placed in code or uploaded?

@JeneaVranceanu
Copy link

JeneaVranceanu commented Jul 1, 2019

@rlogical-techsoft
Downloaded and physically placed the file on the same level as build.gradle that uses this file.

Screenshot 2019-07-01 at 09 21 15

In build gradle next line

apply from: 'https://raw.githubusercontent.com/ArthurHub/release-android-library/master/android-release-aar.gradle'

was changed to

apply from: 'android-release-aar.gradle'

And inside this android-release-aar.gradle file the block using << was changed to

task generateRelease {
    doLast {
        println "Release ${version} can be found at ${localReleaseDest}/"
        println "Release ${version} zipped can be found ${buildDir}/release-${version}.zip"
    }
}

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

No branches or pull requests

3 participants