2

I want to build TWA using BubbleWrap CLI

When I try to build my app using bubblewrap build

|  |) /_,--.,--|  |-.|  |-.|  |,---.,--.   ,--,--.--.,--,--.,---.
|  .-.  |  ||  | .-. | .-. |  | .-. |  |.'.|  |  .--' ,-.  | .-. |
|  '--' '  ''  | `-' | `-' |  \   --|   .'.   |  |  \ '-'  | '-' '
`------' `----' `---' `---'`--'`----'--'   '--`--'   `--`--|  |-'
                                                           `--'    
(node:1798) ExperimentalWarning: The fs.promises API is experimental


cli ERROR The given androidSdk isn't correct.

It shows error cli Eroor The given androidSdk isn't correct

Here is my file structure is

- application
|
|- jdk
|- android-sdk
|- my-app

My ~/.bubblewrap/config.json contains

{
  "jdkPath":"~/application/jdk",
  "androidSdkPath":"~/application/andoid-sdk"
 }

My OS

PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

3 Answers3

2

I got Bubblewrap to work with the latest version of command-line tools downloaded from https://developer.android.com/studio. (currently 6858069)

The downloaded archive file will have a directory called cmdline-tools, this needs to be renamed tools and put inside the android-sdk directory.

Your directory structure should look like

./android-sdk/
./android-sdk/tools
./android-sdk/tools/bin
./android-sdk/tools/lib

Then Bubblewrap asks for android-sdk I used the absolute path to the android-sdk directory, instead of using the ~ (tilde) character. I do not believe ~ is supported by Bubblewrap, as it is a node application and node does not support ~ by default according to https://github.com/nodejs/node/issues/684 . This should be true for your jdk path also.

Bubblewrap will continue and ask you to accept the licenses. After, it will start downloaded extra files to the android-sdk directory so read-write access is also needed.

Dalesjo
  • 51
  • 1
  • 4
  • Thanks, had the same error and had to create a folder: "tools", default name after extract was cmdline-tools – millenion Nov 11 '20 at 04:16
1

*Modify the folder of the android-sdk to look like this: android-sdk -> tools -> bin, lib

Optional Commands:

bubblewrap updateConfig --androidSdkPath [your android-sdk path]

run bubblewrap doctor to check all

Hope it will help.

Shay Elbaz
  • 51
  • 5
1

to solve when you can not execute and you get the address error message. just duplicate and copy the sdk/tools/bin/sdkmanager.bat to sdk/tools/bin/sdkmanager, in the same directory.

Gianmet
  • 11
  • 1