ProgressNS / sidekick-feedback

This repository is for feedback regarding NativeScript Sidekick. Use the issues system here to submit feature requests or vote for existing ones.
45 stars 9 forks source link

APK builted is not optimized on rewiew process (Android App Bundle format required) #395

Open nulele opened 5 years ago

nulele commented 5 years ago

Please, provide the details below:

Did you verify whether this issue has already been reported here?

_Yes

Tell us about the problem

I followed step 1 and 2 of this Nativescript doc to perform a cloud build. At point 9 of step 2 I get a warning: APK is not optimized. The suggested solution is to use the Android App Bundle (aap) format. I looked for a solution on Nativescript docs and found this article but it seems not to work for cloud build but for local build only.

tns cloud build android --release --key-store-path {path} --key-store-password {password} --key-store-alias {alias} --key-store-alias-password {alias_password} --aab --copy-to {path}

Where I get

This command does not support --aab (Android App Bundle) parameter.

... and this is very funny since I chose Sidekick just for avoiding the local installation of the SKD stuff!

Apart from my disappointment... don't know if this problem is related to my app size (about 20 Mb) but I noticed that the built of a newly created project with Sidekick is about 20 Mb too.

Which platform(s) does the issue occur on?

_Android _Windows

Provide the following version numbers that the issue occurs with:

Tell us how to recreate the issue in as much detail as possible

Run -> Build Target Platform = Android Build type = Cloud Configuration = Release Clean Build checked Webpack Uglify and Snapshot checked Create new app in Google Console and review

Does this issue happen every time?

_Yes

nulele commented 5 years ago

Well I gave up and downloaded and configured the Android SDK stuff, then I run the command

tns build android --release --key-store-path {path} --key-store-password {password} --key-store-alias {alias} --key-store-alias-password {alias_password} --aab --copy-to {path}

and it worked! Finally I succesfully managed to upload my aab file to Google Console.

Now I'm still waiting to understand why a tool that is claimed to be able to create APK ready to be published to the Google stores, in the end is not!

tsonevn commented 5 years ago

Hi @nulele This issue can happen if you have used an old tns-android version. Make sure that you are using the latest Android version 5.4.0. You can try clearing up the project by deleting platforms and .cloud folders and selecting File->Clean Cloud Workspace in SideKick. Then try again to build the project for production via cloud builds.

nulele commented 5 years ago

Hi @tsonevn, I've already tried several times to clean the cloud project and delete the platforms folder... and as you can see below I use the latest tns-android version, but the problem persists :(

{
  "nativescript": {
    "id": "###",
    "tns-android": {
      "version": "5.4.0"
    },
    "tns-ios": {
      "version": "5.4.2"
    }
  },
  "description": "###",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "axios": "0.19.0",
    "jwt-decode": "2.2.0",
    "moment": "^2.24.0",
    "nativescript-pulltorefresh": "2.3.0",
    "nativescript-theme-core": "~1.0.6",
    "nativescript-ui-listview": "6.4.2",
    "nativescript-vue": "~2.2.2",
    "nativescript-vue-navigator": "0.0.3",
    "tns-core-modules": "~5.4.3",
    "vuex": "3.1.1"
  },
  "devDependencies": {
    "@babel/core": "~7.4.5",
    "@babel/preset-env": "~7.4.5",
    "babel-loader": "~8.0.6",
    "nativescript-dev-webpack": "^0.24.1",
    "nativescript-vue-template-compiler": "~2.2.2",
    "node-sass": "^4.12.0",
    "vue-loader": "~15.7.0"
  }
}

Maybe I've never tried to clean the .cloud folder as well... I'll give it a try.

Thanks

alexisconsuegra commented 4 years ago

Hi, I am having the same issue. I did cleared the cloud folder. My version is 6.2.0. Is there anything else I should configure for Sidekick to use the Android App Bundle?

{
  "nativescript": {
    "id": "com.domain.myid",
    "tns-android": {
      "version": "6.2.0"
    },
    "tns-ios": {
      "version": "6.2.0"
    }
  },