Build project error - android-studio

I am trying Android Studio. Installed on Windows XP and got the following error
while trying to build a new project. One of the error messages: the SDK directory is not found.
I have tried to change the path to the SDK but cannot find the option in the configuration menu. Any help is welcome
RESOLVE ERROR:
Failed to import new Gradle project: Could not fetch model of type 'IdeaProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.
Build file 'L:\Documents and Settings\Administrador\AndroidStudioProjects\Prueba3Project\Prueba3\build.gradle' line: 9
A problem occurred evaluating project ':Prueba3'.
A problem occurred evaluating project ':Prueba3'.
The SDK directory 'L:\Documents and Settings\Administrador\Configuración local\Datos de programa\Android\android-studio\sdk' does not exist.

You need to modify the local.properties file in your project.
I had manually point it to the path of my SDK, which for me, on Mac, looked like this:
sdk.dir=/Applications/Android Studio.app/sdk

Related

Getting gradle sync failed error when I try creating a module

I tried creating a module in Android Studio. The module appears in my project structure but not the sidebar. Its dependencies aren't showing up under gradle scripts and I'm getting an error message saying that gradle sync failed.
I tried creating a module named MeepMeepTesting in Android Studio using New --> Module --> Java or Kotlin Library. I gave the library and class the same name. The module shows up in my Project Structure, but not in the sidebar, and I also cannot find its build.gradle under Gradle Scripts. This is the error I get when I tried creating the module: Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly. In my build window, I'm getting the message "null"
I updated my gradle and made sure I'm not in offline mode.
I'm unsure why this is happening, as I have already completed this process twice successfully.

Gradle sync failed: Could not create task ':app:lintFix'

I just installed Android Studio v4.1.2 but whenever I try to create a new project then it gives me the following error:
Could not create task ':app:lintFix'.
Could not create task of type 'LintFixTask'.
Could not generate a decorated class for type LintFixTask.
com/android/tools/lint/gradle/api/LintExecutionRequest
com.android.tools.lint.gradle.api.LintExecutionRequest
Please help me to resolve this issue.
Not sure about the root cause of the problem but as it's your first project & fresh installation, I suggest you try this :
Link to fresh new folder: https://www.filehosting.org/file/details/921571/MyApplicationtoresolveissueswithfirsttimeprojectcreationinandroidstudio.zip
I've created fresh new project in my Android studio I am sharing the zip file with you after the gradle build was successfully finished.
Now I recommend that you download this and open it as a fresh new project using your Android studio as it is a successful project so it might give you the pop ups to take necessary actions and might resolve your issue.
Let me know if it helps.

Getting Error in style.xml file in android studio.Can not resolve symbol theme.Validates resource references inside Android XML files

The Application build and run correctly and there is no error in gradle build but the style.xml shows error.
I am using android studio 3.1 gradle version 4.4
Please see The Image.
from the top menu File -> Close project.
Remove it from the projects list.
Open existing project -> choose the project folder.

How to set building SDK in Android Studio 1.0?

I'm trying to import an eclipse project to Android studio 1.0.
First I get this message:
Error:failed to find target android-19 : ...\Android\sdk
Install missing platform(s) and sync project
But I don't want to install SDK 19, so I use F4 key on module to open settings, but then I get:
Error:(18) A problem occurred evaluating root project '2TVSSA-Library'.
Could not find method android() for arguments [build_9n8e326ws1pb1ogxq6eh7vjg0$_run_closure3#4815ddf5] on root project '2TVSSA-Library'.
I just downloaded Android Studio 1.0, but it tells me android() is missed? Does anyone know what I'm doing wrong?
Thanks!
The problem was an auto-created or imported module in the project. I can't modify the building SDK in root, since it does not have apply plugin: 'com.android.library'.
Change sub-module's build.gradle's android->compleSdkVersion solved the problem.

Package / Publish error on Azure

I've recently upgraded an Azure Project from Azure SDK 1.6 (Visual Studio 2010) to Azure SDK 2.0 (Visual Studio 2012). The project will build with no errors or warnings on the local machine. I can debug on the local machine, but I cannot package or get a build on the build server. The error I get is:
error MSB4057: The target "PipelineTransformPhase" does not exist in the project.
I've confirmed that the C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplications.targets file exists locally and on the build server.
The original project pointed to the \v10.0\ path and I manually changed that to the \v11.0\ path trying to resolve the error with no luck.
I have noticed that when project is not able to access Microsoft.WebApplications.targets file it usually says "The target "PipelineTransformPhase" does not exist in the project."
You need to import Microsoft.WebApplications.targets file into the project. You can do it by adding following line in your project.
<Import Project="C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" />
When importing Microsoft.WebApplication.targets into the project file, make sure you don't set explicit Condition="false". I have seen similar error when Microsoft.WebApplication.targets was imported to the project along with Condition="false".
One more thing to consider when importing Microsoft.WebApplication.targets into project file, always make sure that default variable $(MSBuildExtensionsPath32) is set to "C:\Program Files (x86)\MSBuild\".

Resources