BaseGameUtils import using Eclipse - android

Hey :) I am trying to add the BaseGameUtils library to my workspace, I am using this guide: https://developers.google.com/games/services/android/init , I have downloaded from here :https://developers.google.com/games/services/downloads/ The BaseGameUtils sample but when I am trying to import it using Eclipse it gives me so many wrong things like Main,MainActivity and not the real BaseGameUtils, what is wrong here?

You need to run "make_eclipse_compat" script, located at Scripts/make_eclipse_compat in order to be able to import all of these projects using eclipse (they are created to use by Android-Studio by default).
Once you have run the script, a new folder called "eclipse_compat" will be created. You need to import the projects located at THAT folder. So, import BaseGameUtils, mark it as library and add a google_play_services as a library dependence.
Hope it helps

Related

couldn't import BaseGameUtils properly

I a don't use Android Studio and I have followed this post. I have downloaded the Base Game Utils and replaced the file BaseGameUtils\libs\android-support-v4 with android-support-v4. I also replaced GameHelper.
You need to run "make_eclipse_compat" script, located at Scripts/make_eclipse_compat in order to be able to import all of these projects using eclipse (they are created to use by Android-Studio by default).
Once you have run the script, a new folder called "eclipse_compat" will be created. You need to import the projects located at THAT folder. So, import BaseGameUtils, mark it as library and add a google_play_services as a library dependence.
Hope it helps

Why can't I import google play services into eclipse?

I am trying to import the google-play-services_lib into Eclipse but I am not able to import it as I am getting the following warning no projects are found to import. Can anyone suggest a solution to this? Please give step by step instructions as I am a newbie.
You can import android project in two ways,
In your case I suggest you to use 2nd way.
Note, the Android project which doesnt contain .class file, .project file can be import using 2nd option. In all other cases 1st option is better.
Delete project (google_play_services) from SDK Manager then reinstall project (google_play_services) and import.
You should choose option to 'Create project from existing source' from File->New->Android Project

Cannot import google-play-services_lib because the project name is in use

I've done an application which displays a Google map referring this tutorial
http://www.vogella.com/articles/AndroidGoogleMaps/article.html
The application has worked fine and it displayed a Google Map as shown in the tutorial. But now, when I open the project, it shows several errors relating to the import of com.google packages. I've already added the google_play_services_lib. But now, that is not shown in the application. When I try to import the google_play_services_lib again, this error appears,
"Cannot import google-play-services_lib because the project name is in
use"
What is the problem? Please help me.
This generally occurs, if you have a project or folder by the same name existing in your workspace.
In general, You can solve it by changing the name of the existing folder using 'F2' shortcut key. But, since this is a library I recommend you to shift the existing folder "google_play_services_lib" from your workspace directory to somewhere else and then again try and import the "google_play_services_lib" .
this means that google-playservices.lib is using by another projects, you can solve it by.
remove the reference to it from the project which is using it.
OR close that project using eclipse->right click->close.
Remove this project from your workspace then import from your sdk place.
[http://developer.android.com/google/play-services/setup.html#Install]
It seems that when you import google-play-services_lib, Eclipse creates a project by the same name. Even though I deleted manually the google-play-services_lib folder from my workspace folder, I also had to delete the google-play-services_lib project in Eclipse as well. After doing it, I was able to import the lib, and then use it in my project.

Cocos2d-x android can't resolved coscos2dx library

i am starting by macOSX xcode4.5 .
i tried to tutorials.
Using cocos2dx, it completes building of macOSX,
The problem occurred in android sources.
No contents of cocos2dxActivity are described.
so, org.cocos2dx.lib is not other files.
android is not running.
i use ndk-r8.
What will be a problem?
In cocos2d-x 2.0.3 ...Cocos2d-x Lib java files has been considered as a different project only
So import that project in the eclipse
Lets make it Simple
First Import the project in eclipse from this path - cocos2d-2.0-x-2.0.3/cocos2dx/platform/android/java
You will see libcocos2dx project in eclipse ...Keep this project open always otherwise your projects will give error on the syntax of library
Run create-android-project
Now Import the project which you have created and just Run (If you know the concept of isLibrary then that's how they are maintaining it now ..)
Also additional information to run build-native.sh from eclipse only ,
Right Click Project ->C/C++ Build
Uncheck Use Default Build COmmand
and add following bash ${workspace_loc:/YourProjName}/build_native.sh NDK_DEBUG=1 V=1
Good Luck ..If any question please feel free to ask
Change
import org.cocos2dx.lib.Cocos2dxActivity;
to
import android.app.Activity;
and change
extends Cocos2dxActivity
to
extends Activity
You can copy the folder (cocos2d-2.0-x-2.0.3/cocos2dx/platform/android/java) beside the proj.android folder of your game folder, then import it with the game in eclipse.After importing these 2 projects, open Properties of the game and then add libcocos2dx as library and click apply and build.
i have tries these and works for me
i figure out by myself..
Using cocos2dx 2.0.3 (2012-09-26),
eclipse source:org.cocos2dx.lib is not created.
(org.cocos2dx.lib is created cocos2dxActivity only.
and cocos2dxActivitiy is no contents described.
cocos2dxActivity:
package org.cocos2dx.lib;
mport android.app.Activity;
public class Cocos2dxActivity extends Activity{
}
)
therefore,
Using cocos2dx 2.0.2 (2012-08-30), eclipse build ok.
i can't understand what is problem...

Not able to import the another project as a library?

I am going to licensing my Application. I know all the process for licensing application.
But for that I have to load the Library Project in My Workspace.
I have loaded the Library Project in my WorkSpace then i have imported it into my Original project. It works great.
But now the problem is, If i have once deleted that library project and then if i have imported into workspace from another location and if i import it in to my that project then it is not going to import it.
And if i Import it from the previour one location, then its again works fine. . .
So why it is happening like that?
Why i am not able to import the library project from any location?
Please guide me for this.
Thanks.
I dont know why it is happend. But if you have import once from any location. and then delete it.
Now if you are imported the same project from another location than it is also not going to imported.
For sollution you have to Put that library project at once place for which you what it every time.
And if necessary then do not delete that library project after Importing it to the Original Project.
Thanks.
If you want to include a project to your current project follow the steps,
1.) Right Click(or Alt+Enter) on the project_as_library->Library-> check mark Is Library
2.) Right Click(or Alt+Enter) on the project where you want to include the Library, go to Android->Library->Add. When you click Add you will see the Project name that you declared as Library, selected that and Press Ok and you are done.
From your question, i am assuming that you want to import any library into your project and if you want to use any library(.jar) then you can do these steps:
create "libs" folder inside your application's structure, at same level of "src" directory.
Now copy those libraries into this libs folder.
Right click on any librarary -> Build Path -> Add to Build Path.
Update:
As you have commented below as its library project, i would suggest you to go through this Android doc on Setting up a Library Project

Categories

Resources