Try this...

  1. Create libs folder under the application folder.
  2. Add .jar files to libs folder.
  3. Then add .jar files to app's build.gradle dependency.
  4. Finally Sync project with Gradle files.

1.Create libs folder:

enter image description here

2.Add .jar to libs folder:

enter image description here

3.Edit app's build.gradle dependency:

  • Open app/build.gradle

enter image description here

4.Sync project with Gradle files:

  • Finally add .jar files to your application.

enter image description here

Happy coding....

'Android > Android Studio' 카테고리의 다른 글

Android Studio에 GitHub를 붙여보자!!  (1) 2014.12.12
Android Studio 단축키 모음  (0) 2014.12.12

출처 :

How to use GitHub with Android Studio

This article will explain how to use GitHub with Android Studio.

Firstly, let’s login to and create a new repository. From the top right corner of the screen, click the +sign and select New repository.

GitHub "New repository" option

Now complete the form to create a new repository called testproject. Leave the Initialize this repository with a README unticked.

GitHub create new repository form

Next, open Android Studio and create a new project. Call your new application TestProject. Click Next to continue.

Android Studio new project window

Leave the next page as default and click Next.

Android Studio "Select the form factors your app will run on" screen

On the Add an activity to Mobile screen select Blank Activity and click Next.

Android Studio "Add an activity to Mobile" screen

In the next screen, leave the default activity name of MyActivity and click Finish.

Android Studio "New file options" screen

Your new project will open in Android Studio. On the top menu, select VCS > Import into Version Control >Create Git Repository.

Android Studio "Create Git Repository" option.

On the next screen, leave it all as default and click OK.

Android Studio "Select directory for git init" screen

Now use Internet Explorer and navigate to the root of your projects folder. Right click and select Git Bash (If you do not see this option, then first install Git for Windows).

When the Git bash screen appears, type:

git remote add origin[username]/[project_name].git

An example of a Git repository URL is:

Entering command into Git Bash

Then press enter. The GitHub remote will be added to your Git repository.

Next, jump back into Android Studio, right click your projects root directory and select Git > Add. This will add all your project files to your Git repository.

Android Studio "Git > Add" option

It will seem like nothing has happened, but trust me, the project files are added.

Now right click the project name again and this time select Git > Commit Directory.

Android Studio "Commit Directory" option

In the next screen, type a Commit Message and select Commit.

Android Studio "Commit Changes" option

If a Code Analysis warning appears, click Commit. (Unless it’s a real project, in which case review and fix the issue before committing!)

Android Studio "Code Analysis" warning

Now, right click the project name, select Git > Repository > Push.

Android Studio "Git Push" option

Check the box Push current branch to alternative branch and leave the branch name as master. Then select push.

Android Studio "Git Push" prompt

Now enter your GitHub Login (email address) and Password. Then click OK.

Android Studio GitHub Remote Login

If it’s all good, you will see this message.

Android Studio Successful Git Push

Now your code is pushed to your GitHub repository. Don’t believe me? Logon and check for yourself.

GitHub repository pushed from Android Studio

Hope that was helpful

'Android > Android Studio' 카테고리의 다른 글

Android Studio에 Lib jar 추가  (0) 2014.12.12
Android Studio 단축키 모음  (0) 2014.12.12




Ctrl + Space : 기본 코드 완성

Ctrl + Shift + Space : 스마트 코드 완성(예상되는 타입의 메소드또는 변수명 )

Ctrl + Q : 빠른 문서보기

Shift + F1 : 외부 문서보기(로 이동)

Ctrl + mouse over code : 간단한 설명.

Alt + Insert : Generate code( Getters, Setters, Constructors, hashCode/equals, toString )

Ctrl + O : Override methods

Ctrl + I : Implement methods

Ctrl + Alt + T : Surround with… (if..else, try..catch, for, synchronized, etc.)

Ctrl + / : 한줄주석

Ctrl + Shift + / : 블럭주석

Ctrl + W : 연속적인 코드블럭 선택

Alt + Enter : 빠른수정.

Ctrl + Alt + L : Reformat code
Ctrl + Alt + O : Optimize imports
Ctrl + Alt + I : Auto-indent line(s)

Ctrl + Shift + V : 이전에 클립보드에 복사한 히스토리 열기.

Ctrl + D : 라인복제 또는 선택블록 복제

Ctrl + Y : 라인삭제

Ctrl + Shift + J : 라인합치기(Smart line join)

Ctrl + Enter : 라인분리(Smart line split)

Ctrl + Shift + U : 대소문자 변환

Ctrl + Shift + ] / [ : 코드블럭 처음또는 끝까지 선택

Ctrl + Delete : 단어끝까지 삭제

Ctrl + Backspace : 단어처음까지 삭제






Double Shift : 모든곳에서 찾기.

Ctrl + F : 찾기

F3 : 다음찾기

Shift + F3 : 이전찾기

Ctrl + R : 바꾸기

Ctrl + Shift + F : 경로에서 찾기(Find in path)
Ctrl + Shift + R : 경로에서 바꾸기(Replace in path)




Usage Search


Alt + F7 / Ctrl + F7 : 사용내용 전체찾기 / 파일에서 사용한것 찾기
Ctrl + Shift + F7 : 현재파일에서 하이라이트
Ctrl + Alt + F7 : 사용된것 새창으로 보여줌.




Compile and Run


Shift + F10 : Run





F8 : Step over
F7 : Step into
Shift + F7 : Smart step into
Shift + F8 : Step out
Alt + F9 : Run to cursor
Alt + F8 : Evaluate expression
F9 : Resume program
Ctrl + F8 : Toggle breakpoint
Ctrl + Shift + F8 : View breakpoints





Ctrl + N : 클래스 열기
Ctrl + Shift + N : 파일열기
Ctrl + Alt + Shift + N : Go to symbol
Alt + Right/Left : 문서탭이동

F12 : 이전에 사용한 도구창 열기

Shift + Esc : 마지막에 사용한 도구창 닫기
Ctrl + G : 줄번호로 이동.
Ctrl + E : 이전에 열었던파일 목록창 열기
Ctrl + B or Ctrl + Click : Go to declaration
Ctrl + Alt + B : Go to implementation(s)
Ctrl + Shift + I : Open quick definition lookup
Ctrl + Shift + B : Go to type declaration
Ctrl + U : super-method/super-class 이동.
Alt + Up/Down : 이전/다음 함수 이동

Ctrl + ] / [ :  코드블럭 처음/끝 이동
Ctrl + F12 : 파일 구조보기

F2 / Shift + F2 : 다음/이전 하이라이트된 에러로 이동.
F4 : 해당 소스로 이동






F5 : 복사
F6 : 이동
Alt + Delete : 안전하게 삭제(지우기전에 사용된곳 확인 가능)

Shift + F6 : 이름바꾸기




Live Templates

Ctrl + Alt + J : Surround with Live Template
Ctrl + J : Insert Live Template
iter : Iteration according to Java SDK 1.5 style
inst : Check object type with instanceof and downcast it
itco : Iterate elements of java.util.Collection
itit : Iterate elements of java.util.Iterator
itli : Iterate elements of java.util.List
psf : public static final
thr : throw new

'Android > Android Studio' 카테고리의 다른 글

Android Studio에 Lib jar 추가  (0) 2014.12.12
Android Studio에 GitHub를 붙여보자!!  (1) 2014.12.12

+ Recent posts