-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android App Bundle support #610
Comments
added one reference article to show android is moving to this direction: |
I've been investigating this (along with some other gradle updates for stuff like Kotlin and Google Services). It's clear that we should support this going forward, but I don't think it will actually provide any benefits to Cordova apps in terms of APK size. Unfortunately, it doesn't look like I'm going to have any time to work on Cordova stuff for the next month or two, so unless someone else picks it up it won't be until sometime later in the year. |
Thanks @dpogue for giving a timeline. |
So Cordova currently only supports APK right? |
At this time, that is correct. |
Any updates on this? |
(A good solution would probably be to open a Feature Request issue, so this can be tracked and doesn't get lost in a closed issue @fortunella) |
Google is not allowing me to roll-out an APK and it's suggesting me to use the Bundle build, but as far as I understand we can't use that build format yet which makes impossible to publish new apps using cordova-android if I'm right. I think this should be a top-urgent feature to cover to keep using cordova. |
You better create a new issue for this, so it doesn't get buried here. Please also include specific information about your app, like the APK size etc. |
@pabloleone You should be still able to publish apps that contains warnings. In my experience, Google only ever prevents publishing if the contains "errors". But I do agree, this is an important enhancement and something I can definitely can foresee Google enforcing in the future. |
Hi, @pabloleone The steps are:
Note: if you have problems with minSDK version, fix this and make a resync |
Worked for me! thank you so much |
Android studio is not asking you to upgrade the gradle plugin version every time you build the app? |
My project don't have an Android plataform folder, only browser. And when I try to import it, Android Studio says that my project contains non-ASCII characters... Don't know what to do. |
I did not have the problem. But a developer in my company has to update Gradle. Tomorrow I'm going to ask her about that |
You have to add android platform first to build a Android project |
Hello I don't understand. What's step 3? where I can find /platforms/android? I build with PhoneGap and I don't have this folder. Please help me |
I have exactly this problem. Can't get past it. Was changing the Android Gradle Plugin version manually through File -> Project Structure, but didn't help. Anybody knows how to solve it? |
facing the same issue, I build my app by phonegap, even there nobody gives solutions. since 1st August, google will no longer accept Apk, I'm scared! any solution for phonegap?? |
I could not find anything that said Google won't be accepting APKs after August 1st. Are you sure you're not confusing that with the incoming 64-bit enforcement? |
maybe anyway how to enforce to 64bit with Phonegap? |
Not sure... It's important to note that you only need to provide 64bit APK if you use native libraries with your application. Cordova does not use native libraries in any of its plugins that Cordova manages. If you do use a plugin that includes a native library, cordova already supports building multiple APKs by 32/64bit variant which satisfies Google's 64bit enforcement. But whether you need to use that build method is entirely dependent on your app. |
@xale76 You should ask the Phonegap people, not Apache Cordova. And even if you want to ask this here, do so in a new issues instead of asking off topic question in an issue about Android App Bundle support. |
@breautek so I don't understand why Google warnes me: I only build PG with standard Cordova plugins or NPM. please how can I check if I need to take any action or noT? Is there any tool I can use? |
Regarding App Bundles, google is warning everyone who is still publishing the old way. They are just recommending developers to make the switch. At the time of writing, they have announced no plans forcing people to use app bundles. |
Once you've opened, synced and built using the Android Studio (3.2+), you can use this command line from the ./platforms/android/ directory: |
@malvarez-troop |
I don't believe so. |
I found it! Here on Google they have instructions on how to build the bundle file with the command line.
Thanks a lot @BBosman |
@BBosman apologies but I'm not that versed in |
You should run ./gradlew app:bundleRelease from this directory: ./platforms/android/ ./platforms/android/gradlew app:bundleRelease will not do the job. And it will work only when you upgrade Android Studio to 3.2+ and then open your project using the studio, sync it, resolve possible issues and then build. |
@goynov thanks for the tip, I will try it. But according to google instructions
It gives some how the impression that we can avoid Android Studio. But maybe it's like you say, we use the command line but we need to have Android Studio installed and synced. They talk about |
In my case I thought I was not able to publish because of this, but in fact, that was due to others play store sections which was not completly filled |
If anyone experiences errors with leftShift() not found as I did. See this SO post: |
I'm having the same issue and I fixed it via this command.
Found it here: #729 (comment) But when cordova-android will fix it? 🥳 |
Most likely in |
IMPORTANT resolve the grey check points to publish and ignore the alert |
This comment has been minimized.
This comment has been minimized.
ionic cordova build android --prod --release -- -- --versionCode=2 cd platforms/android && ./gradlew bundle
platforms/android/app/build/outputs/bundle/release Finally sign the |
How is the exact way to sign the aab file? I see there 3 options:
|
The easiest way is to include a If you don't want to have your password in the text file, you can leave them empty and the password should be prompted during the build. If you don't want to use the |
Thanks. Two questions:
Thats my file:
I tried with and without password. |
I'd advise creating a new issue describing the problem so that can be tracked. This appears to be related to the prompt feature that suppose to ask you for your password. |
@desmeit cd ~/Android/Sdk/build-tools/28.0.3/
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore /home/USER/KEYSTORE_FILE_PATH/MY_RELEASE_KEY.keystore /home/USER/YOUR_APP/platforms/android/app/build/outputs/bundle/release/app.aab ALIAS_NAME -storepass STORE_PASS Dont forget to replace
Follow this https://ionicframework.com/docs/publishing/play-store just replace |
Thanks @samazgor Just one question. i still have to register for the app signature at google play. he asks me the following:
if i want to work with my existing keystore, should i choose option 3 and upload my old keytore file? |
Google doesn't require you to upload your keystore to the play store, or at least I haven't forced to yet and I've published app updates earlier this week. They will however push you to do so. And once you do, you cannot sign apps yourself, you must let google sign your apps or bundles. |
@desmeit |
OK solved.
on this website (at the bottom) is a very good explanation: Thanks for your help. |
What is the plan to support Android App Bundle .aab in a cordova build?
The text was updated successfully, but these errors were encountered: