I am trying to implement Google Play Services support in my application on Eclipse. I've downloaded google-play-services_lib and linked it to my project. I've also downloaded sample games and extracted BaseGameUtils from there (it wasn't possible to link it to my project as library, so I've marked it with Is Library checkbox manually and then linked it): libraries

But the following code fails:

import gms.common.api.*;
import com.google.example.games.basegameutils.BaseGameActivity;

for both imports it says that it could not be resolved.

Upd. I've replaced the first import with

import com.google.android.gms.common.api.*;

but still couldn't resolve the second import problem.

有帮助吗?

解决方案

OK, I've downloaded the samples and used the BaseGameUtils lib from

android-samples-master/BasicSamples/libraries/BaseGameUtils

when

android-samples-master/eclipse_compat/libraries/BaseGameUtils

should be used instead.

Then, google-play-services_lib should be referenced to in BaseGameUtils.

其他提示

I add to this...

go to root ./android-samples-master/

from there run

./Scripts/make_eclipse_compat

Then those projects are ready to be used with Eclipse

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top