vlang / vab

V Android Bootstrapper
MIT License
319 stars 29 forks source link

`vab` doesn't support traget API > 31 #261

Closed ArtemkaKun closed 1 year ago

ArtemkaKun commented 1 year ago

When I set up --api to 33, vab still uses 31 and fails

      - name: Setup Android SDK
        uses: amyu/setup-android@v2
        with:
          sdk-version: 33
          build-tools-version: '33.0.2'
          ndk-version: '23.1.7779620'
          cache-disabled: true

      ...

      - name: Build APK
        run: vab --api 33 --archs 'arm64-v8a' -v 3 .
| Replacing minimum SDK version "21" with "21"
| Replacing target SDK version "21" with "31"
| Replacing declaration of OpenGL ES version "0x00020000" with "0x00020000"
| Replacing activity name "io.v.android.VActivity" with "io.v.android.VActivity"
| Copying assets
| Running aapt From: /home/yuart/Projects/v-project-basement
| /root/.android/sdk/build-tools/33.0.2/aapt package -v -f -m -M "/tmp/vab/package/apk/AndroidManifest.xml" -S "/tmp/vab/package/apk/res" -J "/tmp/vab/package/apk/src" -A "/tmp/vab/package/apk/assets" -I "/root/.android/sdk/platforms/android-31/android.jar"
| Packaging didn't succeed.
| /root/.android/sdk/build-tools/33.0.2/aapt package -v -f -m -M "/tmp/vab/package/apk/AndroidManifest.xml" -S "/tmp/vab/package/apk/res" -J "/tmp/vab/package/apk/src" -A "/tmp/vab/package/apk/assets" -I "/root/.android/sdk/platforms/android-31/android.jar" failed with return code 1:
| asset W 02-26 20:10:16  1238  1238] Asset path /root/.android/sdk/platforms/android-31/android.jar is neither a directory nor file (type=1).
| ERROR: Asset package include '/root/.android/sdk/platforms/android-31/android.jar' not found.
| Found 0 custom asset files in /tmp/vab/package/apk/assets
| Configurations:
|  (default)
|
| Files:
|   mipmap/icon.png
|     Src: () /tmp/vab/package/apk/res/mipmap/icon.png
|   values/strings.xml
|     Src: () /tmp/vab/package/apk/res/values/strings.xml
|   AndroidManifest.xml
|     Src: () /tmp/vab/package/apk/AndroidManifest.xml
|
| Resource Dirs:
|   Type mipmap
|     mipmap/icon.png
|       Src: () /tmp/vab/package/apk/res/mipmap/icon.png
|   Type values
|     values/strings.xml
|       Src: () /tmp/vab/package/apk/res/values/strings.xml
| Including resources from package: /root/.android/sdk/platforms/android-31/android.jar
larpon commented 1 year ago

I don't know the runner you're using, but when vab usually fallback it's because you don't have an NDK that matches the SDK. What does vab doctor output?

ArtemkaKun commented 1 year ago

Give a sec, checking

ArtemkaKun commented 1 year ago

Ok, thanx for the help, this is a problem from my side - I have SDK 33 and NDK 31 installed and vab doctor mentions that

larpon commented 1 year ago

The devil is in the details. As some say 🙃