couldn't import BaseGameUtils properly - android

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

Related

Android Studio won't import Porcupine project

When I do File > New > Import Module and select the porcupinemanager module, which looks like this:
It tells me it also needs to import the module called porcupine (which i don't know where it is).
I get an empty directory in my Android Studio project:
This gets added into my settings.gradle:
include ':app', ':porcupine'
I still can't access any of the classes.
In settings.gradle ':porcupine' is there, even though porcupine doesn't exist.
How do I import this library properly? Here's the repo:
https://github.com/Picovoice/Porcupine
import the whole project from outside folder or add sdk tools
It seems the issue is with the Android Plugin Version under Project Structure --> Project might be different to the version of your plugins all used. Once you align them to the same version, you could see all your classes from your imported module.
I had the same issue. Depending on what you want to achieve, you have to import either the Activity or the Service directory.

Android Studio, Sample Code - Not working

There is sample code on the developer site that i wish to run.
When I import as a new Android Studio project, I'm not given any ability to run the code (disabled buttons).
I attempted to copy the source files over into the shell of a new project, but i than got errors that didn't make sense. reference to duplicate declarations in source files that had nothing relating inside them.
Is there an idiots guide on how to properly use android studio, or is it just this difficult?
In order to correctly import the project, you should follow the Samples guide as found in the developer docs.
To import a downloaded project:
Unpack the downloaded project package.
In Android Studio, chose File >
Import Project and select the root folder of the unpacked project.
Android Studio may ask you to choose the type of project you are
importing.
If this is the case, make sure to choose Import project
from external model and select the Gradle option.
Alternatively, if the Gradle option does not work, I would attempt to use the Eclipse option.
Open .gradle file when you import the project, not the folder of the proyect.

How to add library project to an existing android project in AndroidStudio

how can I add a custom library project (in my example the CuXtomCam library) to an existing android project using Android Studio 1.1?
I've read about changing the build.gradle file. But where should I place the library ressources?
Thank you in advance for all answers and comments!
To import library into Android Studio:
select File > Import, and then select the directory containing the project to import.
a wizard will open and guide you through the rest of the import process.
When the project import has finished, it will open up a file called "import-summary.txt" which lists all the steps taken during import and suggestions for next steps. For example, it may note files that were not migrated, it may note missing components in your SDK install, and so on.
Just right click on the project then New>Module. from the new window select Import existing project. Give the directory. I think this will help

BaseGameUtils import using Eclipse

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

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...

Categories

Resources