w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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 this: function login_Click(e){ var homeController = Alloy.createController('home'); // If home.xml's container is a Window this will work homeController.getView().open(); }

Categories : Android

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: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.4.2' } } apply plugin: 'android-library' dependencies { compile 'com.android.support:support-v4:13.0.0' } android { buildToolsVersion "17.0" compileSdkVersion 17 sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } } }

Categories : Eclipse

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.

Categories : Android

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 code.google.com: git remote add origin ht

Categories : Android

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

Categories : Android

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 .gradle files. 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 AndroidStudio). 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 AndroidStudio). 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 : sourceSets { main.java.srcDirs = ['src/java']

Categories : Android

How to setup and test an Android Library Project with Gradle and Android-Studio?
i think this tutorial will help you : http://cyrilmottier.com/2013/06/27/a-productive-android-development-environment/ !

Categories : Java

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

Categories : Android

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 plugin: java 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

Categories : Java

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? http://developer.android.com/sdk/installing/migrate.html

Categories : Android

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 dependencies { compile fileTree(dir: 'libs', include: '*.jar') } to your build.gradle file. If above won't work. You may need to try this post

Categories : Java

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 doc. http://tools.android.com/tech-docs/new-build-system http://docs.google.com/viewer?a=v&pid=sites&srcid=YW5kcm9pZC5jb218dG9vbHN8Z3g6NDYzNTVjMjNmM2YwMjhhNA 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.

Categories : Android

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.

Categories : Android

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

Categories : Android

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.

Categories : Android

Collaborating on Android Studio Project using git
You would need to check if: you can configure Android Studio to use relative paths in the .iml (as shown in this old issue, using file://$PROJECT_DIR$/..., or this issue using content url="file://$MODULE_DIR$/...) or you would need to register a content filter driver (in a .gitattributes file) able to replace, on checkout, any absolute path by $MODULE_DIR$. If that 'smudge' script doesn't detect any, your module.iml will be unchanged. If it does detect absolute path, that script can introduce the proper modifications, and you will add and commit those, for others to reuse your project in a more portable way.

Categories : GIT

Android studio: new project vs new module
From the documentation (Android Studio is based on Intellij IDEA) : Whatever you do in IntelliJ IDEA, you do that in the context of a project. A project is an organizational unit that represents a complete software solution. Your finished product may be decomposed into a series of discrete, isolated modules, but it's a project definition that brings them together and ties them into a greater whole. For Android, it means one project per app, and one module per library and per test app. There are multiple issues if you try to build multiple apps within the same project. It's possible, but if you try (like I did), you will see that almost everything is designed to work with a single app per project. For example, there is an option to "rebuild the project", which makes n

Categories : Android

Add Holoeverywhere to project in Android Studio
To get it working on the most basic of levels just follow the advice given here: https://github.com/Prototik/HoloEverywhere/wiki/Import-in-IDE Basically close all projects so you get to the welcome screen. Then: -> Checkout from Version Control - Git -> Type in Repository URL: https://github.com/Prototik/HoloEverywhere.git -> Press 'Clone', wait until repository checkout -> click 'Yes' on the proposal to open a project. This should give you a HoloEverywhere project thats ready to work with. Open up File > Project structure and check for any errors with missing libraries (for example I had to download manually the v4 r18 file). Click apply > ok to make sure changes are saved and return to the project. Click on demo and then click Run > Edit configurations. Click + then Android Applica

Categories : Android

Change project name on Android Studio
Right-click on your root project directory Select Refactor -> Rename Select rename project and change the name there. Also Select rename module and change it there as well. If you get an message saying module name already changed thats fine. Now right-click on the project root folder again and select Open Module Settings. Under the Modules section remove whatever folders are associated to your old project name. Apply Settings and hit OK. Restart Android Studio. Hope that helps!

Categories : Android

How to use a Android Studio project on two computers?
Like the others i agree, that using a VCS would be the best solution. Even though you can try to filter all android studio related files (like *.iml, .idea folder and local.properties). I don't know if you can do this with dropbox or if you need some kind of 3rd software. After that you should be able to make source code changes on both computers without greater problems. (You may have to declare project dependencies changes for the android studio twice) Builds depending on the build.gradle files should work to. But again: using a VCS is the better way to go.

Categories : Android

Remove Project from Android Studio
File > Close Project move your mouse cursor on the project and press Delete keyboard button :) EDIT try this solution, works for me

Categories : Android

Add JS and CSS support to Android Studio project
JS/CSS are not part of Android Studio. You'd have to install IntelliJ Ultimate edition if you need those. In general, you won't get a feature like that which is only available in a paid version in a free tool like Android Studio or IntelliJ Community Edition.

Categories : Android

How do I export an Android Studio project?
In the Android Studio go to File then Close Project. Then take the folder (in the workspace folder) of the project and copy it to a flash memory or whatever. Then when you get comfortable at home, copy this folder in the workspace folder you've already created, open the Android Studio and go to File then Open and import this project into your workspace. The problem you have with this is that you're searching for the wrong term here, because in Android, exporting a project means compiling it to .apk file (not exporting the project). Import/Export is used for the .apk management, what you need is Open/Close project, the other thing is just copy/paste.

Categories : Android

Android Studio cannot create a new project
Extending on what @hoss said, updating any version prior to ver 0.2.0 requires a full un-unstallation, then re-install the new version found at the android developer website. Read specificly updating to 0.2.x You will find that many errors will be caused if these directions are not followed. This is because of a change in the build Gradle.

Categories : Java

Android Studio The project is already registered
I had a similar problem with ABS and other library imports. The 'Project Structure' interface just wouldn't show the modules. On trying to import the modules, it would prompt, "The project is already registered". Seems to be an IntelliJ/Android Studio issue. Invalidate Caches option didn't help. Reimporting the project after some cleanup did work for me. As a precaution, take a backup of your project and store it safely Ensure that your project builds via gradle command-line and you have all required dependencies specified in respective build.gradle files. Try building with: gradle clean && gradle build Close the project in Android Studio (or close Android Studio) Delete .iml files and .idea folders from all modules and the main project Start Android Studio and reimport the proj

Categories : Android

Import project into Android-Studio
Managed to solve on my own. Needed to alter the build.gradle file a bit so the buildscript->dependencies will hold this: classpath 'com.android.tools.build:gradle:0.5.+' and not: classpath 'com.android.tools.build:gradle:0.4' Then used the "local gradle distribution" option with the 1.6 version I downloaded and it worked fine.

Categories : Intellij Idea

Android Studio need to rebuild project before each run
It's a known issue. Maybe you should try this: Same issue here, to avoid rebuild EACH TIME, i'm going to my module project settings -> Dependencies and up or down one of my library item -> Apply -> Ok -> Make regenerating R.java. You could also try unchecking "Use external build" in compiler settings: File -> Settings (Ctrl+Alt+S) -> Compiler -> Uncheck "Use external build"

Categories : Android

Possible to clone TFS project with Android Studio
The problem was I didn't have my secondary credentials setup. From the visualstudio website: Note: To clone and use this repository from Git tools outside Visual Studio, you need to ensure alternate credentials are enabled in the Profile dialog. Once I added that I was able to clone the repo without a problem.

Categories : GIT

Android Studio: add project as library
Edit the settings.gradle file (in directory f:/my project), it must contains something like this: include 'my app','my library' If this file don't exists: create it manually. The settings.gradle contains the list of gradle modules in a multi-module project. Then you must add the dependency to your library in app. To do so edit the my app/build.gradle and add this line : dependencies { compile project(':my library') } I also notice that you don't use default structure for your projects (i.e. you put the code in src/ instead of src/main/java) so you will have to overwrite some values of the default fileSet in the build.gradle of your projects. Be sure to have something like this in my app/build.gradle and my library/build.gradle : android { sourceSets { main {

Categories : Java

Android Studio Create Project Trouble
See my answer here: http://stackoverflow.com/a/18575460/1980819 You need to specify your source folders in the project tree (they'll go blue after, like below):

Categories : Java

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.

Categories : Android

Failed to create new project in android studio 0.2.3
Make sure that the SDK folder you mention exists - I'm not sure if it is a typo or not but the path you specified is a bit weird - it should be C:Program Files (x86)Androidandroid-studiosdk On the menu go to File -> Project Structure, then choose SDKs under Platform Settings. Check that the path for the Android Platform you use is correct, and if not, change it to the correct path. Also make sure that the Project is set to use the correct Android Platform.

Categories : Android

What files should I add to SVN ignore in an Project using Android Studio
I added the following items in my .gitignore, it should be the same for SVN: gradle .idea *.iml build .DS_Store (for mac only)

Categories : Android

Error in android studio while creating a new project
Go to Gradle Download last version Open grandle location within Android Studio (in my case is: C:Program Files (x86)Androidandroid-studiopluginsgradle" Important: backup your existing Android Studio gradle lib folder (in case things go wrong, as some of the commenters have pointed out) Open download file from 2. Override lib folder within Android Studio with lib folder within downloaded file.

Categories : Java

How to create a project in same window of Android Studio?
Please visit the below mentioned link: Android - Studio How to open multiple project in single window? Hope this will help you.

Categories : Android

Whenever I create a new project in android studio, I get an error
"You should download the full zip package from http://services.gradle.org/distributions/gradle-1.6-bin.zip manually and copy this zip package to C:Documents and Settings(Your name).gradlewrapperdistsgradle-1.6-bin72srdo3a5eb3bic159kar72vok If it does works ,you had to re-install Android Studio and take this again. If you use win7 64bit,Try to edit android-studioinstudio.bat SET VM_OPTIONS_FILE=%IDE_BIN_DIR%studio%BITS%.exe.vmoptions to SET VM_OPTIONS_FILE=%IDE_BIN_DIR%studio%BITS%.exe SET JRE=%JDK% IF EXIST "%JRE%jre" SET JRE=%JDK%jre SET BITS= IF EXIST "%JRE%libamd64" SET BITS=64" Stole from Gradle settings cannot be cast error

Categories : Android

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

Categories : Android

Android Studio adding external JAR to the project
the error message format shows that you are not using Gradle to build. You either loaded the eclipse project file (.classpath/.project) or had some existing iml files. This means changes to build.gradle will have no effect since Studio uses the IntelliJ internal builders instead. You need to import your build.gradle file instead to create a new Studio project.

Categories : Gradle

Android Studio Can't resolve Gradle project
I just ran into this problem when moving to a new computer. What I did was choose to import a project (using build.gradle as import file) rather than open a project. When prompted about gradle information I didn't supply a gradle home but selected to use the gradle wrapper.

Categories : Android

Can't add custom Library Project with Android Studio
I believe the build.gradle file of the project you are trying to import do not specify the right paths because it can't find AndroidManifest.xml: Main Manifest missing from C:UsersckuAndroidStudioProjectsMyApplicationProjectMyLibrarysrcmainAndroidManifest.xml It is trying to locate AndroidManifest.xml inside the default folder structure which should be: -Project - src -instrumentText -main -java -res AndroidManifest.xml As you are importing a project I believe it has other folder structure, which you should inform in build.gradle like this: sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs =

Categories : Gradle



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.