|Change project file structure after migrating from Eclipse to Android Studio gradle structure|
While migrating your project from Eclipse to Android Studio, no change have
been done on project structure. The only that have changed are new .iml and
Your java code stays in project/src/ folder, and has not been moved in
project/src/main/java folder (like in a new created project from
Your AndroidManifest file also stays in the project/ folder and has not
been moved in project/src/main/ folder (like in a new created project from
At migration, the build.gradle file is customized in order to be able to
compile with the old structure is described in the gradle documentation :
Configuring the Structure
For a new created project in AndroidStudio, the sourceSets part of the
build.gradle file :
main.java.srcDirs = ['src/java']
|no gradle file in eclipse project Android studio|
All you need is a simple build.gradle file for your ActionBarSherlock
project. Here's one I've created:
apply plugin: 'android-library'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
|How do I migrate my Android Eclipse project to using Gradle and Android Studio?|
You should create a folder in you project's root and name it libs.
Then copy your jar file to that folder and add
compile fileTree(dir: 'libs', include: '*.jar')
to your build.gradle file.
If above won't work. You may need to try this post
|Import an Android Project from Eclipse to Android Studio and I have this error message "failed to find Build Tools revision 8.0.0"|
Your build.gradle is trying to use Android SDK tools 8 which isn't
installed on your machine.
If you look at your build.gradle file you probably have this line
buildToolsVersion "8". You want your build.gradle file to point to the
Android SDK tools that you currently have installed (preferably the
latest). Just open the Android SDK manager and see which tools you have
installed and change the buildToolsVersion "8" to the right version.
|Android Studio new project Eclipse style|
You shouldn't use Android Studio if you want to stay with Ant (or even use
the maven android plugin).
For now, Google maintains Eclipse and Android Studio.
If you want to benefit from the Android Studio improvements but stay with
Ant, you should have a look at IntelliJ product : IDEA Community Edition.
|How to import Android Studio project in Eclipse?|
As the others say, a full import is not possible, but just try a manual
'import'. The key files for an Android project are the Java sourcecode (src
directory), the resource XML files and the Manifest. Just create a new
Android project in Eclipse and simply copy these files over. You may have
to create a new package structure, so construct the necessary packages and
copy each sourcefile over and refactor the package name if necessary. If
you use any additional libraries, you may have to manually import them as
|Importing Eclipse project with 2 libraries to Android Studio|
Create an ANDROID_HOME environmental variable pointing to the Android sdk
directory which is included in Android Studio or create a local.properties
file containing the path to the Android sdk for each of your projects. The
local.properties file should be located in the root / workspace directory
of your project; it needs only to contain one line:
|Importing Eclipse project into Android Studio - getBuildScript error|
Fixed: I think I might have screwed things up by having a separate gradle
installation in addition to whatever is installed by the Android Studio
bundle. I uninstalled gradle AND Studio, then just installed the default
Studio build things worked better. I still had to update the gradle value
in the gradle-wrapper.properties file to "1.7" instead of "1.6".
But now all of my projects import correctly.
BTW, this was on Windows 7.
|Cannot resolve Symbol R (Imported project from Eclipse to Android Studio)|
Try to use the new version (0.4.3) of the gradle build plugin, that was
More information about this version on g+ here.
|Importing an eclipse project in Android studio. Error with Gradle|
You have used Gradle 1.8, as your error mentions, you should use Gradle
1.6. Download it from here
|Android JNI won't compile without a project.properties file|
The easiest workaround would be to put this one-line file in jni/..
You can also add APP_PLATFORM=android-10 to your ndk-build command line.
You can also set it in your Application.mk. Unfortunately, you cannot set
this in Android.mk.
|ant.properties file missing in android project|
Run android update project -p .
Create ant.properties file manually with the following contents
# This file is used to override default values used by the Ant build
# This file must be checked in Version Control Systems, as it is
# integral to the build system of your project.
# This file is only used by the Ant script.
# You can use this to override default values such as
# 'source.dir' for the location of your java source folder and
# 'out.dir' for the location of your output folder.
# You can also use it define how the release builds are signed by declaring
# the following properties:
# 'key.store' for the location of your keystore and
# 'key.alias' for the name of the key to use.
# The password will be asked during the build when you use the 'release'
|Android Studio Project Structure (v.s. Eclipse Project Structure)|
The mystery: Android Studio's Project Structure and Build System
I don't know if this is because of the Gradle Build System (I'd wager it
is), but I'll tell you what I've understood so far.
Update 4: 2014/09/11 Added Cheat Sheet for BuildTypes, Flavors and
Variants(I finally feel confident to write this :D)
Update 3: 2014/09/11 Updated the comparison workspaces and projects to be
Update 2: 2014/04/17 Added more detail to AS project structure
Update 1: 2013/07/29 Added IntelliJ Project Structure
The IntelliJ's Project structure (shown at the end) is for IntelliJ with
the android plugin. The Android Studio, however, has a project structure
divided like so:
Structure: Projects and Modules
module in Android Studio is like a project in Eclipse
project in Android Studio is like a
|create-android-project.sh:line 103:/home/laschweinski/android/android-sdk-linux_86/tools/android:No such file or directory|
Open create-android-project.sh file, you should see two line codes like
Then what you just need replace these paths with yourself's paths, as
mentioned in your post
|Android: How can I open an older android project in Android Studio?|
Look at this links.
How do I open my existing Eclipse projects in Android Studio?
|Error Building Project in Android Studio "Error: No resource found that matches the given name (at ____ with value '@drawable/')|
Alright, so after fussing with the rebuild for hours trying different
methods (renaming particular files [i.e. those with the problems],
rebuilding the app after renaming folders inside the build folder, etc) I
finally decided that I would go to the source of the problem and see if it
worked like other IDE's. Indeed it did, this is how I performed the fix:
Find the location of the problem - For me, all four of the errors I had
were inside the 'build' folder of the project.
Close any open instances of the project
While the project is closed, rename this folder from windows explorer (or
other if youre using a different OS) (i.e. If the folders name is "build",
rename it to "build.old")
Open the project once more
Go to Build > Rebuild Project
You should not have any issues doing this, lik
|Project imported from Eclipse to Android Studio. APK files and some other files in bin folder are not updating anymore|
I don't know if there's a way to get a clean build via the UI (I haven't
found it yet, anyway), but it's pretty easy via commandline. From the root
directory of your project:
|How to access a js file from another js file in titanium studio android project|
You have to use Alloy to do this, to open the Home controller view just do
var homeController = Alloy.createController('home');
// If home.xml's container is a Window this will work
|ERROR: Android Source Generator: [project] AndroidManifest.xml file not found|
Go to the directory where you have installed Android SDK. There, go to
tools directory. Note down the path of tools directory.
Open command prompt/terminal, and cd to tools directory:
cd <tools directory path>
android update project -p <path to project directory> -n <name of
project> -t android-15
To create a new project:
android create project -p <path to project directory> -n <name of
project> -k <package name> -a <hello world activity name> -t
<android version like: android-15>
|No Android facet found, issues compiling with Android Studio 0.2|
Add an android facet to your module by following below steps.
1) Go To File Menu -> Project Structure, or press (Ctrl+Alt+Shift+S)
shortcut to open "Project Structure".
2) Select "Facets" which is under the "Project Settings" tab. (First
3) Click on "+" button which is at the top of the Second Column to add new
4) Select "Android" facet from that "Add "menu which will prompt another
dialog box to select a module. (Select a module to which you want to apply
5) Select your module and that's it. :)
Hope this will solve your problem.
|Android Studio: Plugin with id 'android-library' not found|
Instruct Gradle to download Android plugin from Maven Central repository.
You do it by pasting the following code at the beginning of the Gradle
Replace version string 1.0.+ with the latest version. Released versions of
Gradle plugin can be found in official Maven Repository or on MVNRepository
|Android Studio - Build an Android project with Android library which depends on another Android Library|
The manifest files for the library must currently have a <application
/> node, even if it's empty.
It's a restriction we'll remove at some point but for now, just add it.
|Cannot create new Android application project or access Android preferences using Eclipse Kepler|
Ran into this same problem today running a Windows 7 machine. It has been
a while since this question has been asked, but having an answer here might
prove useful since this thread is ranking highly on Google for the error
I found that cleaning all projects in Eclipse and restarting it once it was
finished solved the issue and I was able to successfully create a new
Android project afterwards.
Eclipse menu: Project >> Clean
Similar problem/answer found on stackoverflow.
|How to setup and test an Android Library Project with Gradle and Android-Studio?|
i think this tutorial will help you :
|Automatically versioning Android project from git describe with Android Studio/Gradle|
After some further reading and several false starts, I ended up with this,
added to the bottom of build.gradle in the project directory (that is,
MyAppProject/MyApp/build.gradle, not MyAppProject/build.gradle --
confusing, I know, but the former directory is projectDir in Gradle so
that's how I refer to it here). It depends on no external utilities other
than Git, which is assumed to be in the path, so it should work on any OS
(even though I used forward slashes in the paths, they get converted to
backslashes on Windows).
It could probably stand to be improved, I'm sure, as my understanding of
Gradle is pretty rudimentary and my Groovy may not be very idiomatic
(though that in particular is less of a concern). I have a feeling that my
approach is suboptimal because it involves generatin
|Android Studio & Gradle: Add outside java classes to Android main project|
you might want to make your Dir a own module
add include 'Dir' to your settings.gradle
create a build.gradle inside your Dir directory with this content apply
now you can go into your main projects build.gradle and add to
dependencies: compile project(':Dir')
if your Dir uses android related stuff, you might want to use the New >
Module(right click on your project in Android Studio) Function of Android
Studio to create an Android Library.
But i haven't tested that feature yet. If Android Studio throws an
Exception when trying to use the New Module, you should try to update
Android Studio, in the latest Version it works for me.
You might also want to check the Gradle User Guide and the DSL Reference
both are very helpfull in getting into Gradle and understanding i
|new to android - downloaded android project from git, imported into eclipse and everything looks wierd|
Those are not honeycomb. Its called packages. You can find java class in
different packages. Packages are defined to solve the problem complexity
and package name should describe what functionality the java classes
provides which is in it.
|How to create the best Android app project structure with Android Studio and Gradle?|
You should look at the multiproject example for the layout attached in the
Essentially you want a top level settings.gradle that tie all the pieces
together. Ideally they should be in one single git repo to make your life
easier. However you probably can use symlink to tie them into a common
build repo that contain your top level settings.gradle.
|Android Studio: how to import Android library project|
Go back to Project Structure window where you added the new module. Click
on your main module, go to Dependencies tab, click the plus icon and select
|Android copy existing project with new name in Android Studio|
The steps in the link you specified should also work for Android Studio.
Just make a copy (using a file manager) of the entire module folder and
give it a new name. Now open it up and use Refactor -> Rename (right
click on the item you want to rename) to rename your module and package.
See this for details about refactoring in IntelliJ/Android Studio.
|How to add android library project in another android project in eclipse|
Check this please for example Facebook SDK:
and try to press Apply before press Ok
|Add a non-Android library project to an Android app in Eclipse|
Method#1 seems so far the option to go for, but you need to study why
you're getting that ClassNotFoundException - unpack the APK (since it's an
archive), undex it and see why the library classes are not included.
From experience, if you're working with Eclipse, I believe you're getting
that exception because you didn't check the library as exported when you're
adding it to Android project - after you've added it to build path, do the
following: Project Props -> Build Path -> Order and Export, here make sure
your library project is selected. There is a known issue/frustration about
this ClassNotFoundException and the work-around is to select the export
tab. I believe this article contains more details or this SO topic.
When it comes to debugging the jar code, you need to include in the
|Eclipse - How to fix error "No persistence.xml file found in project" JPA issue|
If you are using eclipse.
Try right clicking the Project File -> Build Path -> Configure Build Path
Step 1: Add the folder META-INF to the build path
Step 2: Right click the Project File -> Maven -> Update Project
|Failed to import Gradle project error creating new project with Android Studio|
I had same issue with the latest Android Studio () today, and I finally
found that configuring a https proxy for Gradle can solve the issue. I only
set a http proxy at the beginning. Gradle needs to sync some files via
HTTPS. Use IP address instead if hostname of proxy can't work.
|java servlet project and android library project in eclipse - NoClassDefFoundError|
First of all - I believe Java Web Project will not work with any of Android
specific classes due to many reasons.
If your MonitoringModel contains some Java code that you want to share
between Android and Web application you can extract it to separate Java
project and use a Link Source option in Properties->Build Path to link
it to both projects.
|Eclipse: How to import git project as library for Android Project which has to be pushed to Bitbucket|
If the library is a .jar file, you can simply paste it into the libs folder
of your app. Android should automatically add it to the build path. As
far as pushing/pulling from BitBucket goes, as long as you add the .jar
file in git the library will be committed like any other file.
|Publishing a project after migrating from visual studio 2010 to 2012|
For the googlers:
After Click-Once failed to supply all required features, I have decided to
use Installshield limited edition (some details are available here and
in order to make sure that new deployments of the software will replace
older installations, the following steps were required (based on Cosmin
Pirvu's answer ):
Open the old MSI with Orca and get its UpgradeCode from Property table
in your InstallShield LE project go to "General Information" in solution
make sure that the "Upgrade Code" field is set to your old MSI UpgradeCode
(You can read more about upgrades here)
make sure that ALLUSERS property has the same value as the old MSI (it's
the same approach).
Go to Installshield Organize Your Setup->Upgrade Paths section. Right-click
on Upgrade Paths and sel
|Add an Android Studio / IntelliJ project to a code.google.com project with git|
OK, so the best solution I've come up with is to create a local git
repository, create a code.google.com git project, and then manually connect
the local repository to the code.google.com project. Note that this
requires git to be installed on your development machine.
Create the app project in Android Studio.
Select the root project folder.
Select VCS > Import into Version Control > Create Git Repository
Select project folder to create a git repository.
Now the project is under source control.
Create a project at code.google.com using git source control.
Go to the Source > Checkout page of the project and get the clone URL.
Open a terminal and navigate to the project directory.
Modify the local git repository to connect the remote repository on
git remote add origin ht
|Android Studio: Importing project into existing project|
Try going to File -> "Import Module" instead of "Import Project". In
Android Studio, an entire window is a project. Each top-level item in that
project is called a module. Coming from the Eclipse world, it'd be:
Eclipse workspace = Android Studio project
Eclipse project = Android Studio module
|Eclipse not generating android button properties|
I hope you do everything in such sequence:
1.Create layout at res/layout/your_layout.xml
2.Put button in this layout:
3.And then in your Activity (onCreate)
Button btnSubmit = (Button) findViewById (R.id.btnSubmit);