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).
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.
Has anyone managed to extend "Mobile Backend Starter Java" on Android Studio
https://github.com/GoogleCloudPlatform/solutions-mobile-backend-starter-java
Frustratingly any documentation that exists seems out of date or only for Eclipse".
I want to use Gradle and not Maven , Android Studio and not Eclipse
I followed the Tutorial
https://developers.google.com/cloud/samples/mbs/
but the extend page left me confused
https://developers.google.com/cloud/samples/mbs/extend_backend
I would like to know if anyone has tried this
I thought about going from the other direction creating an app and then Google Cloud Tools and App Engine Backend with Google Cloud Messaging but I do not see a deploy , I did see this, Deploy Google App Engine backend from Android Studio
but have not tried yet
There is a project on GitHub which you can use as module. It provides you with the basic client libraries. You can use it as starting point. See https://github.com/thagikura/mobile-backend-starter-android-client-with-AndroidStudio and follow the instructions there.
This is my first post in StackOverflow.
I am building an android app using Android Studio. This app requires some cloud backend to sync user data across devices. After some research, I came across the Mobile Backend Starter from google which provides a fully deployed app engine backend and a client android application.
The problem is that every video/tutorial out there is using Eclipse to open this client application. When you try to import it to Android Studio, you get an Assertion:Null error.
Another step I tried is that, I opened it in Eclipse, followed google documentation to set
And then tried to import to Android Studio. This time I got an error that the "The filename, directory name, or volume label syntax is incorrect"
Can someone help me out with this? Is it also possible to use the "Generate Mobile Backend" option in android studio? But wouldnt this mean that we cannot leverage the client libraries provided in Mobile Backend Starter?
Edit (to add more details to the question):
If I use the "Tools > Google Cloud Tools > Generate App Engine Backend" method, will I be able to get all the boiler plate code in the Mobile Backend android client?
Also, I tried today to Generate App Engine Backend and point to my existing Mobile Backend Starter app engine project. But this did not bring in end point connections for mobilebackend api. Am I missing something here?
Yes there is an option in Android Studio also for Generating App Engine Backend.
Tools > Google Cloud Tools > Generate App Engine Backend
Here is a nice tutorial on Android Blog for the same
http://android-developers.blogspot.in/2013/06/adding-backend-to-your-app-in-android.html
But look in to this post before doing this as Google App Engine Back-end still uses maven so you need to install that before using it.
Maven needed when generating Google App Engine backend in Android Studio
This is an old question but for those that come to this now the easiest way to get started is with this unofficial build for android studio. Why couldn't google do this themselves?
https://github.com/thagikura/mobile-backend-starter-android-client-with-AndroidStudio
I am new to Android development Platform. Here is what I am currently facing
I am trying to create this app in Eclipse with two more people working on same app. I am using bitbucket over git plugin to share that project with other two. In this app I have used facebook sdk to enable users of app to log in using their facebook login details till everything is fine on my local machine I can run this app and its working perfectly. Now when I commit this code and push it to bitbucket repo other members are not able to see either facebook sdk folder when they pull from bitbucket repo.
My questions
When i have downloaded facebook sdk from git do i need to move it into C:\Users\myname\git\mysampleapp\ or it doesn't matter where i keep it.
I also plan to use Gplus login my app for that i have to use Gplus sdk do i need to do same process as Facebook sdk?