I am a newbie in using google loud endpoints in m android app.
I followed several tutorials on developing a GAE back-end for my android app in android studio.
I made an android app and then auto-generated back-end for it.
In back-end module I created a bean and auto-generated end point class for it. But when I try to add annotations like #Entity,#Id etc then they are not recogniZed.
I have added objectify-4.0b1 jar to WEB-INF/lib in api project.
What am I missing?
Please advise.
Manish
The IDE needs to know about the objectify library. Did you use the Google Cloud Module generation built into Android Studio to create your endpoint? If so you should have your backend configured through Gradle. This would give you two options:
option 1) is add the following line to your dependencies clause in your backend build.gradle:
compile 'com.googlecode.objectify:objectify:4.0b1'
Although the latest version is 5.1.4 so if you can you should just use that.
option 2) is to go to file -> project structure, then select your backend module and add a library dependency. That will popup a search dialog where you can search for the objectify dependency and automatically add it to your module. This will update your build.gradle for you.
Related
I'm planning on creating a project that will involve two separate Typescript subprojects (a Node.js server and browser extension). I have found a plugin for node and typescript. I also plan on having another subproject for a flutter app.
Are there any flutter gradle plugins available so I can integrate it as a subproject? I have found the documentation to integrate flutter into an android application with gradle but don't really see it fitting into my niche here; unless I'm missing something from the page.
So my question is whether this project structure makes sense and if so what would be the best way to integrate flutter into it?
After a hiatus of a couple of years I'm picking up Android development again.
I installed the newest Android Studio(4.1.1) with the latest Android SDK version (Android 11, API 30). After that I created a new project with gdx-setup.
If I add the old java source to my newly generated project I get this error:
error: package com.badlogic.gdx.backends.android does not exist
I'm not sure how to add this jar into the new project. In the Gradle configuration I see mentions of the backend, but it's not available.
I also downloaded the 'gdx-backend-android.jar' from the nightly build and put the jar in the Android library folder, all to no avail.
Does anyone actually know how to correctly add this dependency into my project?
I added the jar but still have an error, don't mind the other errors, I first need to fix the GDX import.
The project dependencies are managed by Gradle, so there is no need for you to directly touch any .jar files at all.
The most likely issue you're facing is that you are trying to use Android-specific classes from the core module, which is platform agnostic.
In a typical libGDX project, you do almost all your game code in the core module so it can easily be compiled for any platform. The code you showed above would be in the android module, but your LiveWallpaperStarter class would be part of core.
Some might say there's no reason to use core at all if you're making a Live Wallpaper, since it can't run on any other platforms besides Android. But there is some advantage in keeping the rendering in core so you can test in a desktop game window, because you can more rapidly compile and run on the desktop. This library has some tools that make it easy to wrap your rendering code in a class that lets you simulate a live wallpaper on desktop, for testing.
I am using Android Studio 3.0 with the updated gradle plugin.
I need to use the releaseImplementation keyword in my build.gradle file as I only want the library specified (ACRA) to be built in release. The reason I only want to build ACRA in release is that I've read that Android Studio instant run does not work well with ACRA.
releaseImplementation 'ch.acra:acra:4.9.2'
The problem is, however, that it's a library so I also need to use the api key so I can transitively export in apis to the modules using the library.
api 'ch.acra:acra:4.9.2'
Is it possible to use both keywords or is there a composite keyword to use?
releaseImplementation 'ch.acra:acra:4.9.2'
api 'ch.acra:acra:4.9.2'
In Android Studio 3.0 and newer, the Android Gradle Plugin supports the new Java Library plugin configurations that allow more granular control of dependencies.
As described here, the new Gradle Dependency configurations are available for flavor- or build-type-specific dependencies.
If you wish to use the api dependency configuration for the release build Type, you would add the following:
releaseApi 'ch.acra:acra:4.9.2'
This is the "composite keyword" that you are describing. No additional dependency needs to be specified.
I want to implement GCM Client on Android.
Following the guide here
https://developers.google.com/cloud-messaging/android/client
I have downloaded the configuration file and copied the google-services.json file into the app/ directory of the project.
I have also added the dependencies in the project's build.gradle
classpath 'com.google.gms:google-services:1.3.0-beta1'
and plugin in the app level build.gradle
apply plugin: 'com.google.gms.google-services'
I have also included the Google Play Services SDK
compile 'com.google.android.gms:play-services:6.+'
I have also updated the AndroidManifest.xml file as shown here
https://developers.google.com/cloud-messaging/android/client
To get the Registration Token, when I use the following code
InstanceID instanceID = InstanceID.getInstance(this);
Android Studio does not recognize the class. I get a "Cannot resolve symbol 'InstaceID'". Any reason as to why this is happening?
Update your Play services SDK to
compile 'com.google.android.gms:play-services:7.5.0'
Then clean your Project.
Worked for me. Hope it works for you too!
you are missing the gcm
add on your gradle:
compile "com.google.android.gms:play-services-gcm:10.2.6"
Basically, you have to use the latest version of the Google Play Services, Android Support Repository and Google Repository for this to work, and then include the latest version of the Google Play Services
compile 'com.google.android.gms:play-services:7.5.0'
Checks an official firebase documentation and imports the latest version om.google.firebase:firebase-messaging
eg: implementation 'com.google.firebase:firebase-messaging:17.3.3'
I've downloaded Crashlytics app that integrates Crashlytics.framework into XCode project, and it works great for XCode. But as far as I know, to build Xamarin.iOS binding I need static library, and I can't find it neither in framework nor in Crashlytics.app contents. There is only "run" executable and header. I don't know how to use it under Xamarin.iOS. Btw, AndrewReed on Xamarin forum managed to build dll somehow, so it's possible.
So, how to create crashlytics binding for Xamarin?
AndrewReed answered this question on Xamarin forum:
As with quite a few sdk's, sometimes they bundle a folder instead of the static lib,which essentially is the static library. There will be a sizeable file that maybe doesnt have an extension(this is your .a file) so you can rename that to be .a and then include that in a xamarin bindings project. Run the sharpie marker on the header file in the folder which will generate your necessary files. Watch out for one gotcha, delegate is a reserved word in c#, so you may need to go around and change this by adding an # symbol(to the name) to allow you to use the reserved word.
So what I actually did was, created a project in xcode and ran the crashlytics programme, this then added the crashlytics framework to the project. In finder locate that and you will have a structure like so: - run - /Versions --/A ---Crashlytics ---/Headers ----Crashlytics.h
So the /A folder is essentially your static lib, use this and create your binding from that, or in this particular case, just download it from the mono bindings || my repo.
If you're looking for an officially supported crash reporting plugin, Crittercism just released one (Full disclosure: I'm one of the co-founders). You can download the bindings from the Xamarin store here: http://components.xamarin.com/view/crittercism
The latest version of Xamarin seems to have it build in.
Here are the steps that I followed
1.) In the Xamarin Studio , go to the main app, and add the Crashlytics API key in the Build -> Crash reporting section. Build and run that app. The evidence suggests that is enough to get data sent to Crashlytics. I saw that it knew about older versions of the app I had built and ran weeks ago with the API key already in.
2.) Go to Xcode and create a new project with the same name as the Xamarin project, com.{company}.{appname}. (You probably need to have that profile downloaded.) I did it in Swift by the way with no issues.
3.) Go to crashlytics.com com and go to settings -> Apps (or https://www.crashlytics.com/onboard)
4.) You will get an app to download and run. The app walks through the steps of adding
A.) A build phase run script
B.) Code to the application main Crashlytics.startWithAPIKey(“nnnn”)
5.) Run your Xcode version of the app
The Crashlytics web page popped up immediately.