GithubHelp home page GithubHelp logo

Comments (6)

Larpon avatar Larpon commented on May 31, 2024

On my Debian Bullseye this doesn't work as the value of sdk.default_build_tools_version appears to be "debian" at this point.

Have installed debian package android-sdk-platform-23, android-sdk and android-sdk-build-tools , for example aapt is /usr/lib/android-sdk/build-tools/debian/aapt - so I guess there is a problem getting the version from this.

Yes, the Android SDK is an absolute mess in this regard also - with no standards or guideline to where people can place things and how they should name stuff. I remember some other parts of vab had this problem.

from vab.

xandro0777 avatar xandro0777 commented on May 31, 2024

from vab.

Larpon avatar Larpon commented on May 31, 2024

Disabling it will unfortunately break the --build-tools option since it uses the directory names as version numbers (used by recent SDKs - that hopefully won't change any time soon) - but I can maybe add a check

from vab.

Larpon avatar Larpon commented on May 31, 2024

@xandro0777 - can you please post the output of ./vab doctor - this issue should have been fixed long ago?
What version of vab are you using? Try updating vabvia git and build it again and try again.

./vab doctor will help us greatly since I can see how your setup looks like

from vab.

xandro0777 avatar xandro0777 commented on May 31, 2024

Just updated v and cloned a fresh copy of vab in a separate directory and built it:

$ vab doctor
No "sdkmanager" could be detected.

You can set the SDKMANAGER env variable or try your luck with `vab install auto`.
Please see https://stackoverflow.com/a/61176718/1904615 for more help.

vab
        Version 0.2.1 46d0bc6

        Path "/home/rz/prog/vab"
        ANDROID_HOME=/usr/lib/android-sdk
        ANDROID_SDK_ROOT=/usr/lib/android-sdk
        ANDROID_NDK_ROOT=/usr/lib/android-sdk/ndk-bundle
Java
        JDK
                Version 11.0.12
                Path "/usr/lib/jvm/java-11-openjdk-i386"
Android
        ENV
                sdkmanager ""
                sdkmanager.version "0.0.0"
                Managable: false
        SDK
                Path "/usr/lib/android-sdk"
                Writable false
        NDK
                Version ndk-bundle
                Path "/usr/lib/android-sdk/ndk-bundle"
                Side-by-side false
        Build
                API 23
                Build-tools debian
        Packaging
                Format apk
Product
        Name "V Test App"
        Package ID "io.v.android"
        Output "v_test_app.apk"
V
        Version 0.2.4 83d492b
        Path "/home/rz/prog/v"

        OS: linux, Debian GNU/Linux 11 (bullseye)
        Processor: 2 cpus, 32bit, little endian, Intel(R) Pentium(R) CPU 3560M @ 2.40GHz
        CC version: cc (Debian 10.2.1-6) 10.2.1 20210110

        getwd: /home/rz/prog/vab
        vmodules: /home/rz/.vmodules
        vroot: /home/rz/prog/v
        vexe: /home/rz/prog/v/v
        vexe mtime: 2021-09-06 20:48:20
        is vroot writable: true
        is vmodules writable: true
        V full version: V 0.2.4 02d823f.83d492b

        Git version: git version 2.30.2

next cloned a fresh copy of vlang/ui

$ cd ui/examples 
$ vab users.v 
V panic: main.validate_env:463 error converting build-tools version "debian" to semantic version.
semver: semver.InvalidVersionFormatError: Invalid version format for input "debian"
v hash: 83d492b

Further info...

$ dpkg -L android-sdk
/.
/usr
/usr/lib
/usr/lib/android-sdk
/usr/lib/android-sdk/tools
/usr/lib/android-sdk/tools/bin
/usr/lib/android-sdk/tools/proguard
/usr/lib/android-sdk/tools/proguard/bin
/usr/lib/android-sdk/tools/proguard/lib
/usr/share
/usr/share/doc
/usr/share/doc/android-sdk
/usr/share/doc/android-sdk/README.Debian
/usr/share/doc/android-sdk/changelog.gz
/usr/share/doc/android-sdk/copyright

$ cat /usr/share/doc/android-sdk/README.Debian
Versioning Scheme
=================

The versions of the SDK, the Build-tools and the Platform-tools are independent
from each other, and we track the versions in the following places:

  * SDK: https://android.googlesource.com/platform/tools/buildSrc/+/gradle_${latest}/base/version.gradle
  * Build-tools: https://android.googlesource.com/platform/development/+/android-${latest}/sdk/build_tools_source.prop_template
  * Platform-tools: https://android.googlesource.com/platform/development/+/android-${latest}/sdk/plat_tools_source.prop_templaterz@rz-debian:~/prog/ui/examples


$ ll /usr/lib/android-sdk
total 40
drwxr-xr-x   8 root root  4096 Aug 23 01:17 .
drwxr-xr-x 136 root root 12288 Aug 31 23:30 ..
drwxr-xr-x   4 root root  4096 Aug 31 23:31 build-tools
drwxr-xr-x   2 root root  4096 May 27 23:40 licenses
drwxr-xr-x  13 root root  4096 May 26  2020 ndk-bundle
drwxr-xr-x   6 root root  4096 Aug 31 01:19 platforms
drwxr-xr-x   2 root root  4096 May 27 23:40 platform-tools
drwxr-xr-x   4 root root  4096 Aug 31 23:31 tools

from vab.

Larpon avatar Larpon commented on May 31, 2024

@xandro0777 - it was a little more tricky than first anticipated since the filtering of unknown versions was also broken (someone forgot to assign the result of the filtering ahem 😅 ). So this was a result of several bugs.

Nice catch.

I've tried fixing it by allowing "exotic" build-tool versions in dbf8173 - they're now allowed but has the lowest priority when sorted in case there's more than one "type" of version detected.

from vab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.