Build Error: gradlew-fdroid no such file

#1

Hi, I’m still trying to upload my first application to F-droid (following the official documentation).

I am progressing (fdroid lint com.ahorcado without Warnings) but I can not overcome an error with this command:

$fdroid build -v -l com.ahorcado

This returns at the end:

DEBUG: Directory: build/com.ahorcado/app
DEBUG: > /usr/lib/python3.7/site-packages/gradlew-fdroid clean
ERROR: Could not build app com.ahorcado:
OSError while trying to execute /usr/lib/python3.7/site-packages/gradlew-fdroid clean:
[Errno 2] No such file or directory: ‘/usr/lib/python3.7/site-packages/gradlew-fdroid’:
‘/usr/lib/python3.7/site-packages/gradlew-fdroid’
INFO: Terminado
INFO: 1 build failed

Some help? Thank you

1 Like

Actualizar proyecto en GitLab importado desde GitHub
#2

How did you install fdroidserver?

Repo link for your app?

1 Like

#3

I installed fdroidserver from the AUR repository of Manjaro.

I have also cloned the repository:
git clone https://gitlab.com/fdroid/fdroidserver.git

My app is at https://gitlab.com/Webierta/fdroiddata (imported from https://github.com/Webierta/ahorcandroid)

1 Like

#4

Do add a LICENSE file clarifying that situation.

This minimal metadata works ok:

License: GPL-2.0-only
SourceCode: https://github.com/Webierta/ahorcandroid
IssueTracker: https://github.com/Webierta/ahorcandroid/issues

RepoType: git
Repo: https://github.com/Webierta/ahorcandroid

Builds:
  - versionName: '1.3'
    versionCode: 4
    commit: v1.3
    subdir: app
    gradle:
      - yes

AutoUpdateMode: None
UpdateCheckMode: Tags

You did this:

git clone https://gitlab.com/fdroid/fdroiddata
git clone https://gitlab.com/fdroid/fdroidserver
sudo ln -s $(pwd)/fdroidserver/fdroid /usr/local/bin
cd fdroiddata
../fdroidserver/fdroid init
fdroid build ...

…right?

2 Likes

#5

OK thanks.

My metadata file is:

Categories:
  - Games
License: GPL-3.0-or-later
SourceCode: https://github.com/Webierta/ahorcandroid
IssueTracker: https://github.com/Webierta/ahorcandroid/issues
Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=986PSAHLH6N4L

AutoName: Ahorcado
Summary: Juego de El Ahorcado para android
Description: Esta aplicación revive el clásico juego de lápiz y papel "El Ahorcado"
    cuyo objetivo es descubrir una palabra secreta.

RepoType: git
Repo: https://github.com/Webierta/ahorcandroid

Builds:
  - versionName: '1.3'
    versionCode: 4
    commit: v1.3
    subdir: app
    gradle:
      - yes

AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: '1.3'
CurrentVersionCode: 4

I was missing this command!!:

sudo ln -s $(pwd)/fdroidserver/fdroid /usr/local/bin

Now the process advances but finds another error:

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:kaptReleaseKotlin’.
    Internal compiler error. See log for more details
  • 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.

I keep working on it …

I EDIT: More error information:

Task :app:kaptReleaseKotlin FAILED
e: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
    at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3138)
    at java.base/java.lang.Class.getConstructor0(Class.java:3343)
    at java.base/java.lang.Class.newInstance(Class.java:556)
    at org.jetbrains.kotlin.cli.jvm.plugins.ServiceLoaderLite.loadImplementations(ServiceLoaderLite.kt:50)
    at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension$loadProcessors$efficientProcessorLoader$1.doLoadProcessors(Kapt3Extension.kt:83)
    at org.jetbrains.kotlin.kapt3.base.ProcessorLoader.loadProcessors(ProcessorLoader.kt:42)
    at org.jetbrains.kotlin.kapt3.base.ProcessorLoader.loadProcessors$default(ProcessorLoader.kt:25)
    at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.loadProcessors(Kapt3Extension.kt:88)
    at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:171)
    at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:98)
    at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM$analyzeFilesWithJavaIntegration$2.invoke(TopDownAnalyzerFacadeForJVM.kt:96)
    at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:106)
    at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:82)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:384)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:70)
    at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:107)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:375)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:123)
    at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:159)
    at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:57)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:96)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:52)
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:93)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$1$2.invoke(CompileServiceImpl.kt:442)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$1$2.invoke(CompileServiceImpl.kt:102)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:1013)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:102)
    at org.jetbrains.kotlin.daemon.common.DummyProfiler.withMeasure(PerfUtils.kt:137)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl.checkedCompile(CompileServiceImpl.kt:1055)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl.doCompile(CompileServiceImpl.kt:1012)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:441)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
    at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
    at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 49 more
1 Like

#6

Did you install fdroidserver from a distro repo then cloned fdroidserver and used that? If yes, you need to uninstall the repo one and use the cloned one (that you linked)

You have Java 8 setup in alternatives, right?

2 Likes

#7

Got it! Following the indications of Licaon_Kter:

  1. Uninstall fdroidserver from the repository.

  2. Java change by default from version 11 to 8. In Manjaro (in case you help someone):
    archlinux-java status
    sudo archlinux-java set java-8-openjdk

  3. BUILD SUCCESSFUL in 31s!!

I guess now I just need to open a merge request to add my app…

Thank you very much Licaon_Kter, without your help I would not have achieved it because I am still learning. That’s why I’d like to thank you by writing a link to your website (or a link to this forum) in the acknowledgments section of my app (in the first update ).

Thank you!

1 Like

Mastodon