Firebase Test Lab - Not authorised to use project - android

I followed this tutorial to create tests in android studio: https://developer.android.com/training/testing/unit-testing/instrumented-unit-tests#run-ctl. I successfully ran those tests on my physical device. Then I created the test run configuration for test lab, also followed the same tutorial. When I want to run this configuration I am receiving the following error:
What am I doing wrong? Why am I not authorised for my own project? I was able to add my firebase project normally. I am using only free spark billing in Firebase.

When you prepare your test run configuration, make sure you select your Firebase project (the one you created and to which you have access) from the list of all cloud projects you see. Also, if you created your project after your login in Android Studio, it might help to log out and re-login (using the icon in the top right corner of Android Studio).

Related

Is there a way to handle Firebase projet and android application creation automation?

I'm working on a continuous project creation from an administrator tool. This tool is able to create a create a gitlab and jenkins project from template.
The android template use Firebase crashlytics and we all know that google-services.json file will be mandatory to use Firebase service.
After creating the project from our template using our administrator tool, jenkins build failed because of lack of google-services.json file.
So to retrieve google-services.json file, we need to create project firebase and android application. All of these actions are manual. My question is there a way to get this file using kind of Firebase APIs to create project and android application ?
Thanks
In android studio you get the option to link your Firebase Account. Double tap Shift and type Firebase You should get the assistant and then follow the instructions.

Firebase console sdk setup showing as unfinished

I created an android application on Android studio 3.4.2 and integrated Firebase using the firebase assistant tool provided on Android studio.There is no problem with using the features of Firebase on the app but when going to the developer's console of Firebase and going to the project overview, it appears as if the the sdk setup is not finished ,I tried following the sdk setup steps provided and the setup won't finish at the last stage i.e, "checking if the app has communicated with our servers,you may need to uninstall and reinstall the app". I've uninstalled my app and reinstalled it but doesn't seem to be registering the app on the Firebase server.
I've tried restarting the internet, Uninstalled my app and reinstalled,made sure net connectivity are okay on both emulator and pc
Check your Firebase console projects, Is there any project with the same package name?. If there is any please remove and try again.

AWS Android Project Sign on

I just tried AWS for the first time to build a basic hello world android app with user authentication and I seem to be missing something critical. I worked with Android apps before so I have all the software setup there plus AWS CLI installed I created an android project in AWS Mobile Hub, created user pool, I configured signon/register add on in my new AWS project and I clicked on Integrate button but I'm not sure what's next. I saw on youtube some people had build and test buttons that they used to generate Android Studio project on a menu on the left, I'm not seeing any of that, how can I build a skeleton project in AWS to download so I can finalize it with Android Studio? Any help would be appreciated.
Thank you
Here is a link which teach you step by step on how to build a skeleton project in AWS https://github.com/aws-samples/aws-mobile-android-notes-tutorial/blob/master/tutorial/analytics.md.

Firebase test lab never start

I have setup a project in Firebase to run Instrumented Test for my app. I created the project from Android Studio, then I went to the Firebase Console and moved the project to Blaze Plan. I logged in and setup the project in Android Studio, so far so good, the thing is that when I try to run the test in Firebase using the Sample Spark Configuration but Android Studio never finishes to upload the APK, I don't have any error neither, what I get in Android Studio RUN console are the following lines:
Testing started at 11:29 ...
Using Cloud Storage Bucket location test-bucket-id
Uploading app APK ...
So, it seems there are some issue witht the bucket or with the project, but I'm not able to read any error anywhere. So, where can I access any log to know what is going on? Does a firebase project expose logs though its web UI or does Android Studio allows me to get some kind of logs besides what I get on the build window?
I had the same issue. Turned out there wasn't anything wrong with the project or the bucket. All I had to do was specify the package of my instrumented tests instead of using the "all in module" option in the run configuration.

Deploy to App Engine trouble - You must be logged in to perform this action

I am new to Android Studio and have just runned through the tutorial
https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/GcmEndpoints
without much trouble.
However, when I try to deploy my backend to the app server it promts me: "You must be logged in to perofrm this action".
I have no idea of why it teels that. I can easely find me project on the list, and Im logged in to my google acount on various browsers including Chrome.
Have seached the internet, but found no one else with the problem before.
Best Regards Allan
It's possible that your auth has been done a little while ago and the system cannot properly see you authenticated anymore, which would explain such a behavior.
At the bottom of the list of projects, you should see a "add account" button. Click on this and just re-auth. Should clear the bad tokens :).
Steps For Intrgration of App Engine Endpoints Module.
.....................................................
1-:Create an Google Devloper Console Account.Create a new project after completing the project creation they give you a Project id and project no.
2-:Open Android Studio File-->New-->New Project.
3-:After Project creation is completed Right Click On your project select Module-->Google Cloud Module as shown in images folder chouse_module image.
4-:When you Select The Google Cloud Module Then choose "App Engine Java Endpoints Module".as shown in images folder endpoints image.
5-:As soon as the backend module is added to your project and Gradle sync finishes,a new run configuration with your backend's module is created.
6-:Rebuild your project via "Build → Rebuild Project"
7-:Now Check Your Backend started sucesfully naivigate to http://localhost:8080.if your Backend started sucessfully you saw the screen as as shown in images folder devappserver-endpoints image.
Connecting your Backend to your android project.
...........................................................
8-:After Backend Module is created and added strong libraries is automatically genrated for you.
9-:To start sending requests to the added Cloud Endpoints backend API.you Have to created one Async Class in your Project file.you Can Get the Async task class in required Packages folder with name AsynctaskClass.java
10-:To make the actual call, invoke this AsyncTask from one of your Android activities.In this way :: new EndpointsAsyncTask().execute(new Pair(this, "Message"));
11-:Ckeck that you granted an internet permission in menifest or not.
12-:Now check that you have accese to local host as shown in point 7.
13-:Its time to Check in Emulator Change your Run confrigation and run your project If everything goes well, you should see the following toast in your app as shown in images folder emulator-Toast image.
Deploying the backend live to App Engine
......................................................
14-:If your backend is working locally, you can deploy it to Google App Engine.
Stop the backend, if it is running locally, by selecting Run > Stop.
Than navigate to Build > Deploy Module to App Engine.
15-:update your src/main/webapp/WEB-INF/appengine-web.xml file's property and replace myApplicationId with the ID of the project that you just created.as shown in point 1.
16-: you can see the screen as shown in images folder deploy-image image.
17-:In the Deploy to you have to select the project you created on Google Devloper Console.as shown in point 1.
18-:Put the version name and click deploy Button.
19-:Once you have deployed your backend to App Engine, you can connect your Android app to it by modifying AsyncTask class defined in point 9 replace the perticular lines shown in ReplaceCode.java file in required Packages folder.
20-:Now you can communicate with your new App Engine backend!.
For More Info -:
https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/HelloEndpoints.
https://cloud.google.com/tools/android-studio/app_engine/add_module?hl=en.
Ive never used android studio but Im sure its like eclipse sdk puglin.
There is an easy way to deploy ur apps on ur mobile device, but before u get to that point u need to eanable android mobile on debug mode (On settings,developer options).Once u have done that, Im pretty sure there is an option which lets u run ur app on android device making much smother than doing it virtual app.
Hope I helped ya...
Use the gradle commands.
Open the terminal within android studio and run
gradlew appengine:update
Or navigate to the gradle project window and look for the google appengine folder under your backend. And double click the appengineUpdate command.
Adding the backend with android studio should automatically add the appengine plugin for gradle in your backend build.gradle file like this. This plugin is allows you to run the appengine update command.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.google.appengine:gradle-appengine-plugin:1.9.18'
}
}
I was facing similar issue using Android Studio Ver2.2 in Ubuntu 14.04
I was not able to do sign-in into Android Studio using the SignIn icon from top-left of the Android Studio IDE. When signin icon clicked, a pop-up says that Sign-in using external browser but nothing would pop-up.
Build->Deploy to app Engine->Deploy to tab was also showing the same message as above but no browser would pop up
Even gradlew api:appengineUpdate was not working. (no browser would pop up).
Problem got resolved by changing the File->Setting->Web Browsers (it was listing browsers Chrome, Firefox, Safari in that order). The Default Browser was set to "First listed". I unchecked the chrome and my problem got solved, I was able sign-in and deploy my project.
I spent lot of time finding solution for this, thought it might help others, so posting it.
I had the same issue.
I did not realize it at first but when you get this message, you simply click on the dropdown "Deploy To", and then it invites you to log into your google account.
It is not very intuitive if your project is already selected by default.

Categories

Resources