Android Studio : 签名

1.

开Terminal,使用keytool获取. 本人使用ubuntu14.04 作为开发机, 具体方法如下:

$ cd ~/.android

$ keytool -list -v -keystore debug.keystore

测试的默认口令为:android 或者 直接回车

参考:http://1024coder.com/2014/07/06/2014-07-06_Android_Studio_Gradle_SigningAPK/

android studio : so 库

1. 我们只需要把so文件放到libs文件夹里的对应cpu文件夹里,最后在module的build.gradle里加上jni的sourceSets配置:jniLibs.srcDirs = ['libs'],如下图

Android-Studio-jar、so、library项目依赖_4

 

 

apply plugin: 'com.android.application'
android {
    compileSdkVersion 21
    buildToolsVersion "21.1.1"
    defaultConfig {
        applicationId "com.example.mrzheng.as"
        minSdkVersion 10
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile fileTree(dir: 'D:\\repositories\\libs\\java', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.2'
    compile project(':module_2')
}

参考:http://zhengxiaopeng.com/2014/12/13/Android-Studio-jar%E3%80%81so%E3%80%81library%E9%A1%B9%E7%9B%AE%E4%BE%9D%E8%B5%96/

android studio : rename package name

1. 重命名 包名

  1. In your Project pane, click on the little gear icon ( Gears icon )
  2. Uncheck / De-select the Compact Empty Middle Packages option

Compact Empty Middle Packages

  1. Your package directory will now be broken up in individual directories
  2. Individually select each directory you want to rename, and:
    • Right-click it
    • Select Refactor
    • Click on Rename
    • In the Pop-up dialog, click on Rename Package instead of Rename Directory
    • Enter the new name and hit Refactor
    • Allow a minute to let Android Studio update all changes
    • Note: When renaming com in Android Studio, it might give a warning. In such case, selectRename All

enter image description here

  1. Now open your Gradle Build File (build.gradle – Usually app or mobile). Update the applicationId to your new Package Name and Sync Gradle, if it hasn’t already been updated automatically:

Refactor Directories

  1. Done! Anyways, Android Studio needs to make this process a little simpler.

 

Selection_034

 

参考:http://stackoverflow.com/questions/16804093/android-studio-rename-package

android studio : 快捷键

1. android studio 的快捷键用的很不习惯,还是习惯eclipse
2. android studio 里有个选项可以选择eclipse的快捷键风格
3. 减少学习成本,快速上手

keymap

 

4. 自动提示doc
20140614163235750

 

5.  自动提示,忽略大小写

20140614162709687

 

参考:http://stormzhang.com/devtools/2014/12/09/android-studio-tutorial3/

http://blog.csdn.net/eclipsexys/article/details/30748339