import SDK in Android Studio - android

I just finished an application for Android and I would like to put ads on it to earn some money... I decided to use the network Unity Ads but I have a problem : I do not know how to import the SDK library project in Android Studio (this is only explained for Eclipse and I work on Android Studio). Could you explain me how to do that ?

According to the documentation, the SDK seems to be an Eclipse Project :
To import the SDK library project, go to Eclipse's 'File' > 'Import' menu, and select 'General' / 'Existing Projects into Workspace'
In Android Studio, you just need to go to File -> Import Project, then choose the root of your SDK folder, and follow the wizard. All should work.

In Android Studio Go to File-> Import Module. Specify the location and import the module.Once done; Open Project Structure( You will find a Folder icon at the top) ->Select the app module ->Switch to Dependencies Tab-> Click on + icon to add a Library/File/Module dependency-> There you will find the module you just imported. Add and rebuild.

Related

Cant import OpenCV module in android studio

I've been trying to import Open CV module to android studio exactly as many tutorials online told me to but it wont work. I googled the issue a bit and found a solution to choose the sdk folder as the directory and not java but even that dosent work.Im using Android Studio v4.0.1 and the latest version of OpenCV. Help.
First of all make sure your sdk folder in your downloaded opencv sdk contains a build.gradle file. If your downloaded sdk doesn't have build.gradle try another version of opencv sdk, Unless you have to select java folder in the opencv sdk and after that copy jni files into your project tree.
The easiest way to import OpenCV sdk into your project is as follow:
Create an Android Project
File -> New -> Import Module -> path to OpenCV/sdk/ -not java folder! (opencv 4+)
File -> Project Structure -> add OpenCV as 'Module Dependency' of 'app'
Clean Project
Done! no need to copy jni libs and other things.
Importing opencv to androidstudio
->First download opencv from https://opencv.org/releases/
for your current using android studio version,and extract it.
->open android studio create new project if project is already
exist follow the below.
->in android studio choose option in MENU->File->Import
Module here please select the your opencv-android directory
till sdk selection
eg:("E:\stardev\OpenCV-android-sdk\sdk") and
then finish, if your downloaded same version it's good to go
else change the build.gradle setting from opencv build.gradle
and sync.
->after this to add as a dependency in android studio
Choose
Menu->File->Project Structure->dependencies,
select app from tab and add(+ icon) from menu select module
dependency and select sdk from here.
->to test goto your project activity and
(import org.opencv.core.Core)
If you are using Arctic fox and still facing this issue, This Solution worked for me.
If your next and/or finish buttons is still not clickable after adding the right path
https://stackoverflow.com/a/68738767/12052997

AndroidBootstrap could not be found

How to solve it when I import eclipse project into my android studio
Image to understand issue
Edit 1:
Import Eclipse Project to Android Studio:
Start Android Studio and close any open Android Studio projects.
From the Android Studio menu click File > New > Import Project.
Alternatively, from the Welcome screen, click Import project (Eclipse ADT, Gradle, etc.).
Select the Eclipse ADT project folder with the AndroidManifest.xml file and click Ok.
Select the destination folder and click Next.
Select the import options and click Finish.
The import process prompts you to migrate any library and project dependencies to Android Studio, and add the dependency declarations to the build.gradle file.
For detail description try this link
https://developer.android.com/studio/intro/migrate.html#migrating_from_eclipse
Edit2:
Well, there might be another way of solving this problem, but I ended up removing the line in the project.properties file that was making reference to the Android Bootstrap library.

How to open the project from GitHub in Android studio? Troubles with Maven and android support libraries.

I'm starting to use Android Studio. I'd like to open project from GitHub
https://github.com/TonicArtos/StickyGridHeaders
On first screen I click 'Check out from Version Control', 'GitHub', select place on disk.
After cloning I have a question 'You have checked out an Android Studio project fileā€¦ Would you like to open it?', I agree.
Than I agree to auto-import for Maven project.
Than I find the project 'Examples', try to build it and get 'No resource found that matches the given name Theme:AppCompat', and import android.support.v7.app.ActionBarActivity does not work.
https://www.dropbox.com/s/ph04ogcr2txmge3/Screenshot%202014-07-24%2017.42.22.png
What to do to make the example app? Requirement is to save the project structure for using 'git status' and 'git diff' commands.
There are several SO questions on this topic, but #MartinRevert's answer (https://stackoverflow.com/a/24978323/5025060) is the only one I found mentioning Android Studio's (AS's) Gradle dependency. If the Github project was built with Eclipse, importing it to AS will work but the result will not be buildable with AS (indication: the project's "Make project" icon is grayed out in AS).
Building on Martin's answer, and using IntelliJ's Migrating From Eclipse Projects page as a reference, I found a simple and transparent way to import an Eclipse-based Github project into AS 2.1.2:
Import the Github project using AS:
File->New->Project from Version Control->Github
This clones the Github project, but if it is not a Gradle Project (see above), follow these additional steps:
Create a new project using:
File->New->Import Project and click on the folder you stored the project to in step (1) above. Accept all of the defaults and AS will "import" the Eclipse project to a Gradle project which it will now be able to build.
You may now delete (using a native directory removal tool) the project you created in (1) above.
Related questions:
Android Studios - import project from GitHub
How to import an existing project from github into Android Studio
The project is not a Gradle Project, so it is not compatible with Android Studio yet.
I recommend to check out from Github inside Eclipse and export as a 'Gradle Project'.
Then, proceed to import that project into Android Studio.

Error when trying to import ActionBarSherlock Sample Project

When I import the ActionBarSherlock Sample Project I get error saying [SampleList] Unable to resolve target 'android-14'. What could it be.please help
Start Android SDK Manager and update downloading Android 4.0 (API 14).
Or
Change the Project Properties to compile with an existing Android OS Version.
(Right click to your project folder > Properties > Android > select any version you want)
ok,atlast managed to solve this issue. the problem was solved by importing the demo project in my eclipse workspace.for some reason eclipse did not like me to run the sample app from the actual folder. so you need to import the demo folder in ../JakeWharton-ActionBarSherlock-071a61c\actionbarsherlock-samples\demos and in eclipse while importing check the "copy files to workspace"

Why can't android projects be imported into eclipse?

I have a root directory with a number of android eclipse projects inside. They all have .project files, but eclipse does not seem to see them as eclipse projects? Does anyone know the reason why?
Cause for not importing projects in eclipse :
Reason 1 : Project Structure Differs
Reason 2 : Project Configuration files missing or not available
Reason 3 : Project can be already exists in workspace
Reason 4 : Don't have Proper and Standard Naming Convention
Follow these steps.
Hope you have android sdk and ADT plugin for eclipse.
File-->Import-->Android-->Existing Android code into workspace.
Then import the projects from your root directory using Browse button. If you don't have ADT plugin definitely you never import your android projects.
You have to import them manually
First File > Import
Then General > Existing Project Into Workspace
Either select root directory or Select archive file, click Browse to locate the directory or file containing the project that you want to import
Under Projects select the project that you want to import
Finally click finish to import the project
Here is a link to the eclipse help section on this
http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-importproject.htm

Categories

Resources