My app consists of two dynamic modules and instant app. I'm using app bundle to upload my production builds to the Play Store.
When I'm trying to upload apk to the Firebase App Distribution, I use command:
./gradlew assembleVariantRelease appDistributionUploadVariantRelease
Unfortunately, app uploaded in this way results in a crash, and the stacktrace tells me that there are some classes from dynamic modules, that are missing.
The solution I found was to use bundletool and extract universal.apk from it. It turns out, the apk extracted works great, has all the classes included for the app to work.
When I was using Fabric Beta to distribute app, I just needed to provide apk to /projectPath/app/build/outputs/apk/variant/release and run ./gradlew crashlyticsUploadDistributionVariantRelease for it to work. It uploaded working apk file as expected.
When I tried to do the same with Firebase App Distribution (providing the universal apk to the right folder then running ./gradlew appDistributionUploadVariantRelease without adding assembleVariantRelease first), it seems that the command not only uploads apk to the Firebase, but also overwrites my previous apk file by building a new one.
When I upload universal.apk to Firebase manually (via web console), it also works fine.
My question is: Is there a gradle command for Firebase App Distribution to only upload apk from specific folder without triggering a build of a new apk file?
Was just working on this, current firebase documentation is not improved yet so I decided to move to CLI, where you can point out apk path. In midway through, my friend asked about this in firebase-community slack and turns out you can point out apk by adding apkPath to app distribtuion block in gradle.
P.S.: You can join community slack from here -> https://firebase.community/
Related
I uploaded an aab to the play console and finally got it listed on the play store. This app was written in Python and Kivy, and I was able to generate the aab by first running buildozer then running the script through Android Studio by following various instructions around the net.
I can download an apk from the play console which is generated from the aab, and it works just fine. However, when I install the app from the play store it closes as soon as it opens. However, I dont get a true crash report.
This is my first real app, and I'm a little lost on how to proceed.
Questions:
Any idea what's going on here?
What's the difference between the apk generated from the play console vs whatever is installed from the play store?
How can I diagnose this issue if I don't have access to the apk with the issue?
I got it to work by using a dev version of Buildozer to create the aab instead of using Android Studio.
The instructions can be found here by scrolling down to Release Builds:
https://github.com/Android-for-Python/Android-for-Python-Users#how-to-create-a-release-bundle-aab
Use Firebase Crashlytics, it logs crashes in the firebase console. You can use it in cases you can't access the apk. It requires some setup but is pretty easy. In your case, however, I think you can see the stacktrace in Android Studio if you set no filter and manually search for your app in LogCat.
Rather than aab upload file in .apk it will properly run.It is not good scenario to use apk bcz it increase the app size.When we use aab file to upload some files are not working bcz of this crash occurs.
I'm using the Firebase App distribution to send out updates to a few testers and the most recent APK I uploaded will not install on Android devices (actually it is several new versions that all have issues installing). I had previously uploaded a version that worked, but all subsequent updates fail with an 'App not installed' error message. I'm confused by the APK files that are generated from Android Studio and I don't recall which version I previously uploaded that worked. In the apk folder there is a debug folder that contains an apk file named app-debug.apk. I'm pretty sure this is the one I used with the successful version of the distribution. There is also a flutter-apk folder with an identically named file app-debug.apk. Does anyone know the difference between these files and which one I should use? That question is a side note as neither of those files work.
I have tried telling my testers to uninstall the previous (working) version and then try to update their Android with the latest version, but the error still occurs. I do not have any issues with my iOS version and that test group.
Do I need to update the debug.keystore file? I have searched many different threads for a solution and nothing seems to work. Any suggestions to debug the issue would be appreciated.
On Android, if the package exported by debug cannot be installed on some devices, such as "parsing failure", you can add a signature file to the debug version. It is better to generate it yourself, and do not use the tool's own. In addition, you can add a signature file to the debug version androidmanifast.xml Statement under application android:testOnly= "False", which may help you
Problem:
Automation of application uploading after successful promotions. Typically easily done with APK and using gradlew scripts.
However, since App bundles are clearly the direction of the future and have many benefits we are moving to deploying with app bundles. We do not want to upload these manually.
I was wondering if anyone has run into this issue and how they resolved it? Initially, I hoping for a gradle wrapper script but I don't believe this will be available for awhile.
The route I'm currently heading is leading me to write a custom script to deploy using this following api.
https://developers.google.com/android-publisher/api-ref/edits/bundles/upload
Edit: https://fastlane.tools
I ended up choosing fastlane for now for simplicity and its robust reputation. Had aab uploading done in a matter of minutes. So far highly recommend.
EDIT: Ultimately, I ended up letting fastlane only handle aab uploads by getting the latest artifact from the successful build and moving it into an empty fastlane project. From there it requires minimum parameters/variables to be able to successfully deploy to google play WITHOUT needing to integrate fastlane into your Android Studio project.
I want to run my application in phone but I get following message:
Installation failed with message:
INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package signatures do not match
the previously installed version; ignoring!.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
In my phone I have installed previous version of app from google play. I know that uninstalling old version of app from my phone can fix the problem but I don't want to do this because then I might lose all app specific data.
What I tried:
generating signed version of app using the same keystore.jks like previously
changing versionCode and versionName in build.grandle file and then generating new version of app
And still I have the same problem. What should I do to update my app without losing data?
There are two possibilities I can think of
You use Google Play App Signing. If you use Google Play App Signing then the signature in apps coming from Google Play will always be different to the app coming from your IDE. The only way you can get the update to work is to update the app from Google Play. The best way to do this during development is to use an "Internal test track". Google launched these at Google I/O this year and they let you update your app in seconds from Google Play. So when you have an update, don't install from your IDE, upload to Google Play internal test track, republish, and then update from Google Play. It is really quick.
You don't use Google Play App Signing, but you are trying to install your debug build instead of your release/production build. Make sure you are building the production release APK, so it is signed with the same key as the one uploaded to Google Play.
If I'm understanding correctly you want to re install the "same" apk in your phone but with some changes in the code (updates) but Android Studio can't install the new apk.
I can only think in one thing, this is the explanation:
Please remember that android has different "Build Variants" there could be many but you will always have "debug" and "production" build variants, as I can read, you have installed the one in Play Store this means that you have a "production" build variant already installed in your phone, so you need a new "production" variant version of your app with the same build data (code and name version) and the updates in the code.
Build a signed apk with the same data as the previous version (code and name version) (Just like the one you used to upload to Play Store).
Find the signed apk.
Use adb to check your connected devices, expect a list
adb devices
Use adb to install this new apk.
adb -s <device_identifier> install <apk_name_include_apk>
Following those steps should let you install what you need.
Go in your React Native > Android >app
in the app folder,
you can see a build just delete this folder and Clear React Native project by npm cache clean cmd/Terminal Command.
Now try to run I hope it will Run for some of you.
It's working for me.
Am having a bad time with android in order to create new release
i have created a Signed APK with two option
then i zipped the .apk file,after trying to upload it to google console am getting the below error
Your Instant App APKs do not declare a valid 'android:targetSandboxVersion' attribute in their AndroidManifest. Using the 'com.android.feature' Gradle plugin to build your Instant App would add this attribute automatically.
Note : the file zipped and all the solutions asking to zip the file, no luck :(
You need to be clear if you are producing an Instant App or a normal Android app. I think this is what is confusing you, or maybe you just aren't being clear in the question.
Android Instant Apps are special Android apps that launch from a web page, and don't need a user to install them. To build them you need the Instant Apps SDK, and to follow the development instructions here. Android Studio will produce a zip for you, you don't need to do it manually
For normal Android apps, you don't need to zip your APKs. Just upload the APK itself to the Play Console.
I think you are probably making a normal Android app, but because you are zipping it, the Play console thinks you are uploading an instant app. So stopping Zipping your APK, and just upload it to the Play Console as a ".apk" file.
While you are at it, I'd recommend using APK V2 signing - it gives much faster installation on modern devices.