Questions tagged [android-studio-import]

86 questions
547
votes
52 answers

SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable

I recently tried to import sample Android games I downloaded from Google's developer website. After importing them into Android Studio, I'm getting the following error: Error: SDK location not found. Define location with sdk.dir in the…
Sameer Shamsudeen
  • 5,577
  • 2
  • 11
  • 8
102
votes
4 answers

Could not find method android() for arguments

I've been trying to import a project to Android Studio and this is where I am stuck, there is a similar question on Stack Overflow but it did not provide a solution to my particular error. This is my error log: C:\
51
votes
18 answers

Project already contains module with this name -- Android Studio

I had successfully imported a Module in my Application project in Android Studio. Then I deleted or removed the module by following the below link: How to delete a module in Android Studio I also removed the project module from the dependencies of…
47
votes
9 answers

Android Studio: Could not find com.android.tools.build:gradle:2.0.0-alpha2

Recently I have updated my Android Studio to latest version from Latest Android Studio Canary Build: 2.0 Preview After updating to the new version, my current working directory stop working at all. Every single time when I am trying to clean and…
24
votes
8 answers

Import eclipse project to Android studio - error "this project refers to Eclipse workspace..."

I tried to import an existing project eclipse to Android Studio, but I got a dialog message in import that I can't solve : "this project refers to Eclipse workspace relative path in its project metadata. To help import the project, please point to…
Zeta
  • 663
  • 1
  • 12
  • 27
18
votes
2 answers

Android Studio AAPT err: libpng error: Not a PNG file

I have search all the possible available solution but still i am facing same issue with unclear error for me. Now the complete error is- AAPT err(Facade for 370671127): libpng error: Not a PNG file Error:Execution failed for task…
admaurya
  • 181
  • 1
  • 1
  • 3
17
votes
4 answers

How to stop highlights of static import methods/constants in Android Studio?

I am using static imports in Android Studio as: import static android.opengl.GLES20.*; But android studio highlighting every static member/constant related to static import in code as. I've also tried to look for an option in Settings > Editor >…
Vikas Patidar
  • 42,865
  • 22
  • 93
  • 106
10
votes
1 answer

How can Android project compile when imported class is missing in SDK?

OK, perhaps it is very simple, but I just can not figure it out right now. I have imported google sample project Card Reader in Android Studio 1.5.1, it compiles at compileSdkVerison 23, it works on my Mobile. Then I walked through the SDK while…
8
votes
1 answer

Android Studio Library Dependency - All Options are Alpha Versions

When I try to add a library to my Android Studio project they are all the latest alpha version instead of the current release version. It won't let me install non-alpha versions either via their direct name.
Angel
  • 311
  • 1
  • 4
  • 16
6
votes
3 answers

How to generate file using GsonFormat plugin in Android Studio

Here is the link http://api.rottentomatoes.com/api/public/v1.0/lists/movies/box_office.json?apikey=9htuhtcb4ymusd73d4z6jxcj and I want to generate a file using GsonFormat plugin which is already installed on Android Studio. I'm using windows 7
bizimunda
  • 819
  • 2
  • 9
  • 26
6
votes
1 answer

Android studio Import Module: Specify location of the Gradle or Android Eclipse Project

I was trying to import ViewPagerIndicator Library however they show this. How to solve this problem ? ]2
beginnerK
  • 404
  • 1
  • 5
  • 20
5
votes
1 answer

Imports on the fly is adding random Resources and Static ID

I am using Android Studio 2.2.2; and "Optimize imports on the fly" option is checked. The problem is, when I'm using a resource without its package; for example sampleString instead of R.string.sampleString Android Studio adds the below…
4
votes
4 answers

android - Cannot resolved symbol PlusShare

I follow this Google link to make a sharing function in my application. However, Android studio cannot resolved symbol PlusShare in the sample code. My google play service is updated to the newest version (Rev 32). I also have this line in my…
4
votes
2 answers

gradle.properties file missing while making Eclipse ADT project to android Studio

I am stuck with the Importing of the Eclipse Project in Android Studio. I tried to import it but gradle.properties file is missing. So when I sync project it says the following error. Error:Unable to start the daemon process: could not reserve…
4
votes
1 answer

How to build the native Android sources from Codename One's build server

I'm using the new gradle build switch when sending an Android build for Codename One. One of the highlighted benefits of building with gradle is the ability to open/run in Android Studio and indeed the project opens for me but I'm getting the…
1
2 3 4 5 6