早幾天因爲學車,弄了幾天時間和精力過去,今天終於考過了(科目二,還是補考的...)嗯..不管這麼多了..今天又開始我的android 學習之旅!!

筆記:

platform-tools目錄下的文件:

adb.exe : android debug bridge(android調試橋)

  devices 列出所有連接設備

  kill-server 殺掉 adb

  start-server 啓動 adb

dx.bat : 打包生成dex文件

tools目錄下的文件:

emulator.exe : 模擬器

項目文件目錄下:

.setting 保存配置信息(eclipse)

assets 資產目錄(存放文件,會打包到APK.例:圖片,數據庫...

bin 編譯後的文件目錄

gen (Generated Java File)(自動生成的文件目錄)

  BuildConfig.java 適配信息

  R.java 存放資源id的引用

Android x.x.x (x.x.x版本號)

  android.jar(SDK)好吧,前面說的"夾包"是jar包...終於懂了..

project.properties 編譯版本

  target=android-x (x版本號)

libs 支持的jar,會被添加到android depend目錄下

  android-support-v4.jar (補錄API)

res 資源目錄

  drawable-xxxx(hdpi,ldpi,mdpi,xhdpi,xxhdpi...) 存放應用程序圖標 會自動生成id到R.java文件

  layout

    activity_main.xml (MVC中的View)   

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"tools:context=".MainActivity" ><TextView android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_centerHorizontal="true"android:layout_centerVertical="true"android:text="@string/hello_world" /></RelativeLayout>
View Code

      RelativeLayout(相對佈局)

      xmlns(命名空間)

      Layout_width,Layout_height(控件的寬高) match_parent(填充)

      wrap_content(包裹內容)

      centerHorizontal(水平居中)

      centerVertical(垂直居中)

      @(代表res,res又會編譯成R.java) string(內部類)會在 res/values*/strings.xml 中有對應定義的字符串

  AndroidMainfest.xml (當前應用程序的清單文件,程序的配置信息={"啓動圖標","應用程序名稱","包名","版本號","..."})

<?xml version="1.0" encode="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android"package="com.itheima.helloworld"android:versionCode="1"android:versionName="1.0" ><uses-sdk    android:minSdkVersion="8"    android:targetSdkVersion="17" /><application    android:allowBackup="true"    android:icon="@drawable/ic_launcher"    android:label="@strings/app_name"    android:theme="@style/AppTheme" ><activity    android:name="com.itheima.helloworld.MainActivity"    android:label="@string/app_name" ><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter></activity></application></manifest>
View Code

    package="com.itheima.helloworld" (手機應用依靠包名標識)

    android:versionCode="1",android:versionName="1.0" (應用版本號)

    android:minSdkVersion="8" (系統要求最低版本) android:targetSdkVersion="17" (系統最高版本?)

    android:icon="@drawable/ic_launcher" (圖標)

    android:label="@string/app_name" (應用程序名稱)

    android:theme="@style/AppTheme" (應用程序樣式)

    <activity>應用程序界面

    (在桌面生成圖標...)<intent-filter>額外的配置<action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" />

    這裏我自己百度了一..

第一种情况:有MAIN,无LAUNCHER,程序列表中无图标 原因:android.intent.category.LAUNCHER决定应用程序是否显示在程序列表里 第二种情况:无MAIN,有LAUNCHER,程序列表中无图标 原因:android.intent.action.MAIN决定应用程序最先启动的Activity,如果没有Main,则不知启动哪个Activity,故也不会有图标出现 引自

  今天就這樣先吧..好多關鍵字都不懂啊..有點吃力

更多相关文章

  1. Android应用程序目录结构分析
  2. Android(安卓)权限管理 — 只防君子不防小人
  3. Error:In declare-styleable FontFamilyFont, unable to find at
  4. Android和Linux kernel发展史
  5. Android(安卓)Studio更新升级方法
  6. Android(安卓)skia 和open skia的比较
  7. android 7和android8在user版本下能应用获得root
  8. -如何将Eclipse中的项目迁移到Android(安卓)Studio 中
  9. ADB 工具

随机推荐

  1. Android(安卓)L新控件RecyclerView简介
  2. Android微件(续)
  3. 详解 Android(安卓)的 Activity 组件
  4. 《Android构建MVVM》系列(一) 之 MVVM架
  5. Android(安卓)应用程序基础
  6. Android实训案例(二)——Android下的CMD
  7. 《Android(安卓)4 高级编程》试读
  8. Android(安卓)属性动画(一):Animator属性动
  9. 吹毛求疵android画图板(1)
  10. Android:apk文件结构