2015年6月11日 星期四

Android Studio安裝教學與問題排解

1. 安裝Android Studio前要先安裝好
    a. JAVA jdk ----- 編譯java用
    b. Gradle ------ 用來管理Project的程式

1.1 Java JDK 安裝:
       設定環境變數:
       JAVA_HOME: C:\Program Files\Java\jdk1.8.0_45
1.2 Gradle 安裝:
       a. Download Gradle from here : https://gradle.org/downloads/ , select Complete distribution.
       b. Unzip this file.
       c. 設定環境變數, 新增變數GRADLE_HOME, 在原有Path後新增%GRADLE_HOME%\bin:
           GRADLE_HOME: F:\software\gradle-2.4
           Path: xxx;%GRADLE_HOME%\bin



      d. 測試是否安裝成功: 在cmd下執行gradle -v, 若有版本顯示則安裝成功。
2. 安裝Android Studio:
     Download from here: https://developer.android.com/sdk/index.html, click "Download Android Studio For Windows".

########## 問題排解 #############
Q1.使用ActionBar時啟動出現 java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity...... ?

A: change styles.xml to
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar" />
Q2.How to add pic to android studio ?如何將圖檔加入android studio專案中?

A: install plugins "Android Drawable Importer".
    1. File->Settings->Plugins search "Android Drawable Importer" and install.
    2. To use: Right clicks on "Drawable" folder->New->, you can see four options.
        Select what you want.







沒有留言:

張貼留言