w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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

Failed to import Gradle project on android studio
This problem happens when we work with android sdk studio different from what you should do is install Android Support Repository https://sites.google.com/a/android.com/tools/knownissues

Categories : Android

Error: Gradle: Execution failed "Running /Applications/Android Studio.app/sdk/build-tools/android-4.2.2/aapt failed"
This is because one or more of your asset names have unsupported characters present. Replace all capitals with lowercase letters. Replace all spaces and dashes with an under-bar/underscore. AND to be safe, remove all numbers too. Another suggestion I've seen going around is to make sure your SDK is up to date, but from my own experience it has always been the names of imported assets.

Categories : Gradle

Failed to import new Gradle project: Could not install Gradle distribution from 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'
Thank you, I have resolved this problem already. The cause of this error is really surprising. If you try to download Gradle using 3G connection, it will always fail, that is at least in my case. When I connect using DSL connection Android Studio directly start to download Gradle with no problem and I am able to create new project. Now even if I switch back to 3G connection it is still working. So to replicate my scenario, try to download Gradle using 3G connection or install brand new Android Studio installation using 3G connection. I hope this will help someone. NOTE: My 3G connection speed is better than my DSL connection.

Categories : Gradle

Gradle can't user JAVA_HOME while debugging from Android Studio
I might be reading too much into the error message, but shouldn't JAVA_HOME look more like C:viewsp4libraryea-jrockit1.6.0_29windows-x86_64dist? Notice that it points to a folder called 'dist' instead of to the java.exe itself. To help you figure out the folder, 'dist' has inside of it 'bin'. So maybe try something more like C:Program Files (x86)JavaJre7?

Categories : Android

Android Studio - Gradle Manifest Merging Failed
Make sure that in all your build.gradle scripts the minSdkVersion and targetSdkVersion correspond to those you have in your manifests: android { defaultConfig { minSdkVersion 10 targetSdkVersion 16 } } This worked for me, I hope it does the trick for you, cheers.

Categories : Android

build android project failed with gradle
download latest gradle. Then set your class path by going to MyComputer -> Properties -> Advanced Setting -> Environment Variable. In System Variable tab Make new variable and name it GRADLE_HOME should be in capital. Then after in value set your gradle location path. Mine is C:UsersSJMDesktopgradle-1.6in.; Then apply the changes and open command prompt and write gradle to check its working or not. Then set path to your project which content gradlew file. See the image that I attached here. After setting path to your project in command prompt write this gradle compileDebug The output of the command prompt is showing you error where you go wrong.

Categories : Android

Building Android project with Gradle failed
You need an additional block at the top level after your apply plugin line: repositories { mavenCentral() } In general, you need a repositories block at the same level as any dependencies block (hence why you also need one in the buildscript block). Most of the time, you'd move your buildscript block to the top level build.gradle (so that all your modules use the same gradle build) rather than have them both at the module level.

Categories : Android

How to properly setup Gradle in Android Studio for ActionBarSherlock?
The entry for actionbarsherlock in settings.gradle should be include '..:actionbarsherlock' you should not need project(':actionbarsherlock').projectDir=new File('actionbarsherlock')

Categories : Gradle

Android Studio - Gradle: Execution failed for task ':Foo:dexDebug' - but why?
Is your Foo project in /Foo or /foo folder (note the upper case)? You may need to correct the include 'foo' to 'Foo'? If that doesn't work, please paste the info or debug output of your Gradle build. If you're running AndroidStudio and don't have any output, go to the root of your project and run gradlew.bat assembleDebug --info (on Wins) or ./gradlew assembleDebug --info (on Linux/Mac) or --debug and paste the output here so we can see what went wrong exactly.

Categories : Java

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

Android Studio: Gradle - build fails -- Execution failed for task ':dexDebug'
Could fix this by adding compile 'com.android.support:support-v4:18.0.0' to the dependencies in the vertretungsplan build.gradle, compile and then remove this line and compile again. now it works

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

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

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 add external project to build.gradle
Right click on project - Select "Open Module Settings" - Select "Modules" in left pane - Click on "+" symbol on top - Choose "Import Module". After importing Module. You need to add it as a dependency for your current project. Keep "Modules" Selected in left pane and click on your project - Now Go in dependencies tab and click on "+" symbol that is located at bottom - Choose third option "Module Dependencies" and if you have imported your project correctly, it will show you the all available module that can be added as a dependency to your current project. Hope it would help. Cheers!!

Categories : Android

Android Studio import project with gradle changes iml files
The IDEA official documentation is clear about that : Share all the files under .idea directory in the project root except the workspace.xml and tasks.xml files which store user specific settings, also share all the .iml module files. Source : How to manage IntelliJ IDEA projects under Version Control Systems EDIT : But, sharing iml files seems to be wrong. Best thing is to use a similar gitignore file and to import the project in AndroidStudio for each developer.

Categories : Android

Error when importing a Gradle project into Android Studio
I finally found out why this didn't work. There are two ways to include a project from within the settings.gradle file: include ':..:source:compA-api' and include "source:compA-api" project(':source:compA-api').projectDir = new File(settingsDir, 'source/compA/api') I had used the second form and apparently Android Studio didn't like that :)

Categories : Android

Add commons-io dependency to gradle project in Android Studio
you need to declare a repository where you want to resolve the commons-io library from (e.g. MavenCentral): buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories{ mavenCentral() } dependencies { compile files('libs/android-support-v4.jar') compile group: 'commons-io', name: 'commons-io', version: '2.0.1' }

Categories : Gradle

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

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

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 http://services.gradle.org/distributions-snapshots

Categories : Android

Android Studio Import Project - Use gradle wrapper "Disabled Option"
do the eclipse step where you export to generate the gradle build file stop importing your project for now and create a new one. close android studio. navigate on your file system to the new project. take the "gradle" folder in there and copy it in to your project. try again. :-)

Categories : Android

Gradle 'demo' project refresh failed: Could not fetch model of type 'IdeaProject' using Gradle installation
Is that dependencies block in buildscript? I think you are mixing the classpath of the build and the dependencies of your project. It should look something like: // this is to configure the code running the build, ie where to find the plugin buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } // now we configure the project itself dependencies { compile project(':screentester') }

Categories : Android

Create New Project Android Studio 0.2.3 - Unable to start Gradle daemon process
Well I managed to solve it after many hours of trying. First of all I use Windows 7, with 16GB ram, and it was the system path that was truncated! This left me without the proper GRADLE_HOME path. I manually downloaded the latest Gradle-1.7 build. Android studio 0.2.3 was using 1.6, but subsequently to my manual fix 0.2.5 uses Gradle-1.7. I created a System variable: GRADLE_HOME with value: D:gradle-1.7 that points to my manual Gradle install. I broke my 'real path' (before windows truncated it) into 'extended' path variables, thus shortening my actual path, and inserted the following at the end of the path: %GRADLE_HOME%/bin;%JAVA_HOME%/bin; There are many links on dealing with truncated windows path on stackoverflow. And that was all that was required to get it working. Hope I can

Categories : Gradle

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

How can I get HoloEverywhere to work with a new Android project using Gradle?
org.holoeverywhere doesn't seem to have an android archive: http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.holoeverywhere%22 In the download section there should be a aar link if it supports android & gradle. Ask the developers of holo everywhere to upload a gradle build to maven. Their solution on github seems to be cloning the git repo: https://github.com/Prototik/HoloEverywhere/wiki/Import-in-IDE#android-studio--intellij-idea

Categories : Android

Failure on build with Gradle on command line with an android studio project : Xlint error
It's a nice warning not error, to see the complete lint report you can add these lines to build.gradle: allprojects { tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:deprecation" } } If you really want to get rid of those warnings: Don't use deprecated API Use @SuppressWarnings("deprecation")

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

Gradle Build Failed: "occurred evaluating root project...failed to create a task or type gettype"
For anyone else having the same issue, as Greg mentioned above, switching to the official Google Android Gradle plugin should work: http://tools.android.com/tech-docs/new-build-system/user-guide There are a number of other questions that I believe were using the unofficial version in this question since it comes up high on search results when searching for the Android Gradle plugin.

Categories : Android

Gradle Maven plugin "install" task does not work with Android library project
I just solved the issue by defining an upload archive as described here: Gradle documentation 52.6.2. Deploying to a Maven repository uploadArchives { repositories { mavenDeployer { repository(url: "file://${System.env.HOME}/.m2/repository/") } } } calling gradle uploadArchives deploys the artefact to the (in my case local) Maven repo. I havn't found a simple and more flexible way to specify the local repo's url with e.g. mavenLocal() yet but the above suits my needs.

Categories : Java

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

Gradle project refresh failed
Go to your project folder like so Open the file buid.gradle in any text editor. Under dependencies change to 'com.android.tools.build:gradle:0.5.0'

Categories : Android

Library projects in Android Studio only work if nested in the project tree?
Every step are here : How do I add a library project to the Android Studio? If you want to more about gradle see the Google I/O conference by Xavier Ducrohet on youtube : http://www.youtube.com/watch?v=LCJAgPkpmR0

Categories : Android

Debugging a VC++ 6 Project in Visual Studio 10
Make sure you 'Rebuild' to ensure your binaries are fresh before you start the debug session. If you get build errors, you will need to fix the code or project settings. [Added] Make sure you're building and debugging a Debug build configuration. A Release build usually won't include debug information. If you have VC 6 available, you could instead install VC6 and Daffodil, then set the project's Platform Target to v60. This way you're building with VC6 build tools, thus minimizing the need for code changes.

Categories : Visual Studio 2010

Gradle execution failed for task 'Project:processDebugManifest'
Finally after hours of debugging i got a solution.... [AndroidManifest.xml:3, AndroidManifest.xml:3] Main manifest has <uses-sdk android:minSdkVersion='7'> but library uses minSdkVersion='8' comes as Error-Message when using gradlew - so you need to set your minSdkVerison to 8 in your manifest and everything should be working (Don't forget to edit the build.gradle of your project to minSdkVersion 8 - i just lost another half of an hour to that but now its working)

Categories : Android

Error debugging code in visual studio 2012 - Failed to initialize client proxy: could not connect to
It looks like this happens sometimes when the VS execution engine process is terminated. This was the case for me, since I had terminated the process manually when the process was not responding. You could check if you have "vstest.executionengine.exe" process running when you see this error message. I came across this solution at the MS forum below: Reference: http://social.msdn.microsoft.com/Forums/vstudio/en-US/997291d8-03e4-47ed-a30d-9d47550c0094/cannot-connect-to-the-testexecutor-via-named-pipes-from-vs-2012-rc

Categories : Dotnet

Laravel 4 BelongsToMany sync() method doesn't work properly
I have solved my problem. It's caused by passing wrong parameters when building the relationships. The relationship should be like the code below: class Role extends Eloquent { /** * Permissions */ public function permissions() { return $this->belongsToMany('Permission', 'tbl_link_roles_permissions', 'id_role', 'id_permission'); } } class Permission extends Eloquent { /** * Roles */ public function roles() { return $this->belongsToMany('Role', 'tbl_link_roles_permissions', 'id_permission', 'id_role'); } }

Categories : Laravel

Visual Studio 2008 C++ - Remote Debugging - "Could not load symbols" only for main project
I figured out that I missed a setting for the main project that was done for all other projects. I had to set "Project -> Properties -> C/C++ -> General -> Debug Information Format" to "Program Database (/Zi)".

Categories : C++



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