|Where is android studio building my .apk file?|
When Gradle builds your project, it puts all APKs in build/apk directory.
You could also just do a simple recursive find command for *.apk in the top
level directory of your project.
Here is a better description...
View full image at http://i.stack.imgur.com/XwjEZ.png
|Android studio fails building, dx.bat error|
Here is my own answer, I think I figured it out:
1) To debug the project (at least with Windows). Open CMD.exe, then
navigate to your project folder. Then write: "gradlew build --info"
2) This showed me this message:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added:
Following some information on different blogs, I found one solution, I
removed this dependency from my project (but kept it in facebook):
This worked and compiled successfully.
|Is it possible to test In App Billing in an Android App connected to and running from Android Studio|
Except for the static purchase test items, you are generally no longer able
to test in-app billing features while in debug mode. You have to use a
release version of the app and complete the app setup on Play Developer
Console to do so.
So to answer your main question, while you can track the overall flow of
your purchase feature in debug mode on your app, you won't be able to test
a successful transaction while using the debugger.
|Building Android Studio project with HoloEverywhere fails|
There is an issue in the manifest merger that requires the library to have
an application node in its manifest. So just edit Holoeverywhere's manifest
|Prevent Android Studio/Intellij Idea from building project on startup|
Sounds like you have Make project automatically enabled.
This setting can be found in Settings -> Project Settings ->
Compiler, under the Use external build setting.
You can also try disabling the Rebuild module on dependency change setting
(it is in the same place).
|How to scroll a scrollable layout in the Android Studio?|
According to this change set:
https://android-review.googlesource.com/#/c/61089/ , there is a fix for
this coming soon. I'd hazard a guess you'll see the fix in 0.1.7.
|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
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
|Android Studio multiple processes running|
Check whether your project is set to make automatically. To do this go to
File -> Settings -> Compiler, then uncheck Make project automatically. Do
the same under Compiler -> Gradle.
|android studio open debug mode when app is running|
In Android Studio (I'm currently using I/O Preview 0.2.10) simply click on
the icon in the toolbar that looks like a phone with a bug over it - the
hover text says: Attach debugger to Android process. It's the third icon
A list will then appear showing your processes that you can debug. Choose
one and select OK - your application is now being debugged!
Note: Make sure your app is debuggable, as shown here.
|Android Studio: Background task running indefinitely|
I've this problem recently and in my case I'm using a linux 64bit SO and my
android studio was in a ntfs disk. Since ntfs doesn't support executable
permition the file fsnotifier64 was unable to execute and android-studio
fallback into a compatibility mode that is much slower. The solution was
copy the android-studio folder into my home folder that was ext4 and that
way i was able to set permitions.
|Android studio: getting lots of cannot resolve symbol error after running inspect code|
There is a known problem with android studio causing cannot resolve symbol
errors right now. Google has suggested turning off Preferences > Compiler >
Use external build as a workaround.
cannot find symbol in Android Studio without rebuilding project
|AVD not working correctly in android studio|
Im guessing you already had android-sdk with eclipse, android studio
creates it's own. set your studio's sdk to the old one, click your
project's settings and choose it from the SDK pane.
Also if that fails you can try to create an AVD from the studio AVD manager
not from eclipse. that worked for me.
|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
|Running simple JUnit tests on Android Studio (IntelliJ) when using a Gradle-based configuration|
Normally, you can't. Welcome to the world of Android, where all tests must
run on a device(except Robolectric).
The main reason is that you don't actually have the framework's sources -
even if you convince the IDE to run the test locally, you will immediately
get a "Stub! Not implemented" exception.
"Why?" you might wonder? Because the android.jar that the SDK gives you is
actually all stubbed out - all the classes and methods are there but they
all just throw an exception. It's there to provide an API but not there to
give you any actual implementation.
There's a wonderful project called Robolectric which implements a lot of
the framework just so you can run meaningful tests. Coupled with a good
mock framework (e.g., Mockito), it makes your job manageable.
Gradle plugin: https://githu
|Why is AdMob integration in my app using Android Studio not working?|
Check your target api level and minimum api level. i had similar issue
before and i solved it like this:
target api level = highest available
minimum api level = 9
I dont know much about Android studio but you can do it from manifest.xml
i hope it helps.
|Layout preview not working in Android Studio|
I had the same problem and I solved as follow
Update all build.gradle files with:
Now android studio 0.2.+ uses gradle 0.5
Closes de IDE and via Terminal/Console
Do a clean: $gradle clean
Do a build: $gradle build
Assemble it: $gradle assembleDebug
Open the Android Studio and be happy ;)
|Android Studio "Project Structure" window not working?|
Before Android Studio, IntelliJ Android plugin users used to use the
Project Structure dialog to add/remove modules from their projects.
Android Studio aims to have a single model for building your application
from both the command line and from the IDE. So if you have to modify the
project structure, the correct way to do it is to modify your build.gradle
(and/or settings.gradle) build scripts and reimport the project.
Eventually (within a few months), Android Studio will hook up the project
structure dialog to automatically edit the gradle build scripts for you, or
will provide a different UI, just like the error message says.
You'll find the gradle plugin user guide at
http://tools.android.com/tech-docs/new-build-system/user-guide to be
helpful in figuring out how to add libraries to
|Android Studio - Auto complete and other features not working|
I have not run into this problem personally, but try checking the following
settings (File -> Settings or Alt+F7):
Project Settings [name]
Inspections - ensure that Android and Android Lint is checked, or
alternately just set it back to default using the dropdown box at the top.
Editor -> Code Completion - ensure the Autopopup code completion is checked
(and check the rest of the settings based on your preference.
|Xamarin.Android Intellisense not working in Visual Studio 2010|
Kannan Balasubramanian has posted an answer that worked for me (Binary
Here's Kannan's solution:
Most of the people who work with Xamarin’s Mono for Android in Visual
Studio 2012 face a bug where Intellisense doesn’t work for AXML in source
One of the fix which worked for me is mentioned below.
Launch Visual Studio 2012
Open a solution with .AXML file in it
Now XML main menu should be visible on top
Open “Schemas…” menu
Sort by “File Name” column and see if “android-layout-xml” and
schemas.android.com.apk.res.android” are there. If found, skip to step 13
If not found, go to “Program Files” if 32-bit system or “Program
Files (x86)” if 64-bit system.
Then go to “MSBuildNovell” or “MSBuildXamarinAndroid”
You should be able to see 2 files
|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?
|Android Studio 0.2.2 + ActionBarSherlock setttings: Could not find class 'android.support.v4.app.FragmentActivity'|
As you requested my settings to be shared, I here post my project settings
Hope that you can help.
1. ActionBarSherlock project.
Note that only android-support-v4 is checked to be exported.
2. My personal project settings windows.
Nothing special but only ActionBarSherlock project is referenced.
|Android Studio: Android Manifest doesn't exists or has incorrect root tag|
I ran into a similar problem. Looks like my .../src directory for whatever
reason moved under my .../lib directory. I moved it out of the /lib
directory. Now both /lib and /src are at the same level. After a couple of
clean rebuilds and restarts of Android studio everything is back to normal.
My emulator started up fine.
You might want to check your directory structure. Compare the directory
structure with a working project. You might be able to see the difference.
|How do I add the library android-support-v7 in IntelliJ IDEA (Not Android Studio/Gradle)?|
You just need to add "@string/abc_action_mode_done" in your
appcompat/res/values/strings.Do not "set mediarouter as a dependency for
appcompat library".(In my case,"@string/abc_action_mode_done" already
exists in the appcompat/res/values/strings.I don't know why you miss it.)
"add depenency appcompat to mediarouter" is necessary.
|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
|Maven repository and "Android support library", revision 18 for Android Studio 0.2.x|
Install fresh Android Studio 0.2.x. Upgrade from pre 0.2 doesn't work as
Reason is that new Android Studio is shipped with maven repo for serving
Alternatively edit build.gradle and replace
then copy support jar to libs folder.
|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
|How to setup and test an Android Library Project with Gradle and Android-Studio?|
i think this tutorial will help you :
|Android Studio Error: "You must install the Android Support Repository though the SDK Manager"|
you must manualy run SDK Manager
android or android-sdk
new Support Repository must be already selected, and need only click
|Wrong build being deployed on Android device using Visual Studio 2012 Xamarin.Android|
I have no idea why it does this, I had this issue before. I also noticed
that the device log was somewhat behind (ie, at 3.30pm, the last record on
the device log was 11.00am).
Uninstalling the app from the device and re-deploying it seems to correct
Note: I had this issue in VS, didn't check with XS.
I would look at the difference in your deployment settings in VS and XS (I
think it may have something to do with the Fast Deployment option).
|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.
|How to navigate/view/edit android platform sources (AOSP) using Intellij IDE (Android Studio preferably)?|
Well, first you have to install Android studio from here:
Then, if you already have a project in Eclipse here is how you export it to
|How to open android documentation and samples of code in android studio|
First you need to make sure the documentation is added to Android Studio.
Go to File -> Project Structure. Under the Platform Settings heading, add
or select an Android Platform. Go to the Documentation Paths tab and make
sure the path to your SDK's documenation folder is added there - it should
eference, where [SDK] is the full path to your SDK
installation. If it is not there add it manually.
Once this is done, use Ctrl+F1 while your cursor is on the item you want to
display help for.
The samples have not been ported to Android Studio yet, but I'm sure google
will get around to it at some point. For now follow the instructions in the
comments by androidika (you will need a copy of Eclipse installed).
|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 Logcat is empty when debug with device in android studio|
As of 0.4.0 I have noticed that the logcat tab does not work in the
debugger window - only in the Android DDMS window (hit Alt+6 to bring up
the working logcat while debugging). Awkward I know :)
|Android Studio "Cannot resolve symbol XXX" on basic Android tutorial|
so, it turns out that Studio is (understandibly) buggy, and that these
errors are false negatives...
I can also add the hierarchical parent by hand in the code so the question
about the popup is moot too :/
|Android Studio - Export Android library aar with pure gradle|
You should try updating/upgrading your build tools and gradle through
AndroidStudio. Once you do this, or if you have already done it, you should
be able to modify your build file to reflect the updates:
NOTE: I am still unable to generate aar files even with this setup,
although compiling is fine. At least this might get you past this hurdle.
|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: Emulator in Android Studio doesn't start/launch|
Well, Android Studio is waiting for you to start the virtual device.
You can do that from AVD Manager --> 'Select the device you chose in
Android Studio' --> Start.
I hope this answers your question
|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
|Questions about calabash-android support in Android Studio: Ruby, Editing features and steps, Launching tests|
Very good question. Xamarin had a webinar on using Calabash tests in their
Test Cloud product. Towards the end of the talk there is quite a bit of
hands-on with setting up the testing ecosystem and running Calabash tests
for Android. There's lots in there that don't apply to your environment,
but some very good tips and insights from Karl Krukow - one of the main
contributors to calabash-android.