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.
Related
I have this weird error, I've been using appcenter for a long time, but never experienced this.
I setup a build with appcenter which fetches from azure devops repo. The application is a Xamarin.Android native application. Once I run the build, everything goes well. Untill the signin step. When the step is about to start, I get this error:
##[error]No matching files were found with search pattern: /Users/runner/work/1/s/**/*.apk
Looks like the APK was not found, though the build runs successfully without error.
Please I need your help to figure out a solution to this issue.
In your csproj file for the Android Application project. Check whether <AndroidPackageFormat>apk</AndroidPackageFormat> is set to apk or aab. If it is aab then you need to change the search pattern to search for /**/*.aab instead. Otherwise, it will be looking for stuff that wasn't produced during the build.
To change the search path of appcenter, go to your build configurations and toggle the switch with label: “Build android app bundle”.
the change <AndroidPackageFormat>aab</AndroidPackageFormat> for <AndroidPackageFormat>apk</AndroidPackageFormat> works for me
If you are developing Android Apps and publishing them through Play Store, starting August 2021, new apps are required to target API level 30 (Android 11) and use the Android App Bundle publishing format. (aab)
If you want to know more about the Android App Bundle publishing format, here you have more information. As Cheesebaron is mentioning, if you are using AppCenter for building and packaging your Apps, just use the flag "Build App Bundle" in the Build configuration
I'm following this https://cloud.google.com/community/tutorials/building-android-apk-with-cloud-build-gradle-docker-image to build Android APKs via Cloud build
Already have image (with digest): gcr.io/cloud-builders/docker
Unable to find image 'gcr.io/fullstackgcp/gradle:latest' locally
/usr/bin/docker: Error response from daemon: pull access denied for gcr.io/fullstackgcp/gradle, repository does not exist or may require 'docker login'.
See '/usr/bin/docker run --help'.
Did anyone experience this as well?
This account had been suspended for billing issues (likely because people were all referring to that image, instead of hosting it themselves); I've already reported that. Meanwhile I've created another one fully working example (without making the same mistake to share the builder image): cloudbuild-android, which is just as good, if not a tad better.
Full disclosure: I've wrote that builder, because of the problem with the image.
I also had this error. Digging deeper I figured that you first need to prepare a Docker image that will build your Android app and upload that image to Google Cloud Registry. To do that I used: Cloud Builders Community:
Checkout their repository
Go to cloud-builders-community/android/
Trigger CloudBuild to build & upload a docker for you (specify the Android SDK version you need):
gcloud builds submit --config=cloudbuild.yaml --substitutions=_ANDROID_VERSION=28
At this point you should be able to use gcr.io/$PROJECT_ID/android:28 instead of gcr.io/fullstackgcp/gradle in the cloudbuild definition provided in the tutorial.
However I decided not to risk and hit the next error, so I used this one (provided by Cloud Builders Community again). They do have a step for caching the gradle build so you would also need a tar docker:
Go to cloud-builders-community/tar/ and run:
gcloud builds submit --config=cloudbuild.yaml
After all of this is done you can build your app by running the following in the app folder:
gcloud builds submit --config=cloudbuild.yaml --substitutions=_ARTIFACT_BUCKET=<your_bucket>,_CACHE_BUCKET=<your_bucket>
The trigger you have already created as part of the tutorial will also work. You just need to add the two variables above: _ARTIFACT_BUCKET and _CACHE_BUCKET
I'm trying to figure out the CI portion that provided by AppCenter. I've implemented CodePush for my app and please correct me if my understanding is wrong.
We build the native android app and generate a signed apk.
Release the generated signed apk to playstore
execute command to upload bundle appcenter codepush release-react -a <owner>/<android-app> -d Production
The above are generally the way I understand CodePush and I've tested and working fine.
Now I've noticed that we can integrate our github project branch to appcenter, and whenever there is a git push, AppCenter will build it automatically and we can configure to release to playstore automatically.
Now the part I don't understand is, is this CI auto build by AppCenter actually nothing to do with CodePush?
If now my situation is only having updates on JS code side, actually when I git-push to repo, there isn't a need to auto-release to playstore right?
Correct, Build and Push are separate services in App Center. Build does the binary build of your app while CodePush simply updates the JavaScript and related code in an Apache Cordova or React Native. They're separate workflows and it seems you want to trigger them separate ways.
If you're using CodePush, you can't also use Build to auto build and deploy the native app to devices, you're duplicating work. I'm not an expert, but you probably want to manually deploy your builds whenever you make changes to the native side of the app (which should be rarely, right?) - like when there's major updates to the native framework or new plugins added to the native app
I'm trying to deploy my first (very generic) app built using Ionic. According to the docs for deployment, I'm supposed to use some plugins. However, other sources suggest that I'm supposed to install Google's IDE called Android Studio and create an APK file.
I can't judge which approach is most valid nor if the one is an obsoleted version of the other. And we know how fast the wheels rotate in JS world...
NB. I'm confident in programming in general, I know Angular and have experience with deployments as such. In this case, I'm not looking to set up CI nor testing. I simply want my first app to be reachable through the store.
My suggestion would be to make a build: ionic cordova build android. Next sign it using the command line.
https://developer.android.com/studio/publish/app-signing.html
I am new to react-native app development. I wanted to know how can a developed app be shared between other developers without having a local dependency. Is an apple developer account needed for a test build to be shared in ios as well? How can the test build be created?. I wanted the build to be created and downloaded on any ios device or android for testing purpose and without having depending any of the local code changes.So the build downloaded should not get updated after any code change done after that.
Is there an easy way to do it?
To share a release build for Android please follow this guide Generating Signed APK.
But for iOS you gonna need a Apple Developer account, I don't know the whole process exactly.