• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
polyfrag

Adding Google play services library eclipse

4 posts in this topic

I copied the google-play-services_lib folder to my projects directory following the instructions here

 

https://developer.android.com/google/play-services/setup.html#Setup

 

But it gave me these errors 

 

[2014-01-06 11:21:06 - google-play-services_lib] Project has no target set. Edit the project properties to set one.
[2014-01-06 11:21:06 - google-play-services_lib] Project has no target set. Edit the project properties to set one.
[2014-01-06 11:21:06 - google-play-services_lib] Parser exception for /google-play-services_lib/AndroidManifest.xml: Premature end of file.
[2014-01-06 11:21:07 - google-play-services_lib] Parser exception for /google-play-services_lib/AndroidManifest.xml: Premature end of file.
[2014-01-06 11:24:03 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for C:\Users\polyfrag\Desktop\Projects\google-play-services_lib\AndroidManifest.xml: Premature end of file.
 
I looked in the AndroidManifest.xml and it's empty. I coped the contents from the original location and it's still showing a red excalamation mark near the project icon.
 

 

<?xml version="1.0" encoding="utf-8"?>

    package="com.google.android.gms"
    android:versionCode="4030530"
    android:versionName="4.0.30 (889083-30)" >
 
    <uses-sdk android:minSdkVersion="8"/>
 
</manifest>

 

I tried adding the library to the android project I'm working on but it doesn't show up in the list of libraries. What do I need to do. Trying to add ads to my app.

 

 

0

Share this post


Link to post
Share on other sites
I deleted the google play services lib in the SDK manager and reinstalled it, now it complains because the project description '.project' file is missing. Can somebody at least give me the contents of their google-play-services_lib/.project file if they don't know what's wrong?
0

Share this post


Link to post
Share on other sites

Did you follow the instructions on the site?

 

I haven't done it in a while but as I recall you import into your workspace as separate project and add it as a reference library project to the project that you want to use it in.

 

These are basic steps you need to do:

 

import the library project into your workspace. Click File > Import, select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.

 

See the Referencing a Library Project for Eclipse or Referencing a Library Project on the Command Line for more information on how to do this.

Note: You should be referencing a copy of the library that you copied to your development workspace—you should not reference the library directly from the Android SDK directory.

After you've added the Google Play services library as a dependency for your app project, open your app's manifest file and add the following tag as a child of the <application> element:

<meta-data android:name="com.google.android.gms.version"
           android:value="@integer/google_play_services_version" />

2

Share this post


Link to post
Share on other sites

I just added the google play services .jar to my project's /libs/ folder and hard-coded the "com.google.android.gms.version" value from google play service lib's /res/values.xml file.

 

But I didn't see that "Setting up a library project" page and might have to follow that.

0

Share this post


Link to post
Share on other sites

Ya, the android documentation isn't great.

 

 

Also, is your google play services project building successfully?

 

You'll want to add the following as well to your starting activity in your app:  

It's buried somewhere on the site.  What it does is ensures that the google play services are available and up to date on the device when the the application starts you should also use it before any calls to the google play services to prevent the application from crashing.   It displays an error dialog that can kick off the the update process on failure.

private boolean googlePlayServicesConnected()
	{
		// Check that Google Play services is available
		int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
		// If Google Play services is available
		if (ConnectionResult.SUCCESS == resultCode)
		{
             		// Continue
			return true;
			
		} else // Google Play services was not available for some reason
		{

			Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, CONNECTION_FAILURE_RESOLUTION_REQUEST);

			// If Google Play services can provide an error dialog
			if (errorDialog != null)
			{
				// Create a new DialogFragment for the error dialog
				ErrorDialogFragment errorFragment = new ErrorDialogFragment();
				// Set the dialog in the DialogFragment
				errorFragment.setDialog(errorDialog);
				// Show the error dialog in the DialogFragment
				errorFragment.show(getFragmentManager(), "Google Services Error");
			}

			return false;
		}
	}
Edited by TechnoGoth
2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0