GitPedia

SAF

(Deprecated) SAF(Simple Android Framework)是一个简单的android框架,它为开发Android app提供了基础性组件。

From fengzhizi715·Updated May 2, 2026·View on GitHub·

SAF(Simple Android Framework)最早的定位是一个简单的Android框架,现在它可以为Android App开发提供一系列基础性的组件。这个项目第一次提交到google code是2012年的3月26号,我已经断断续续做了5年多了。 The project is written primarily in Java, first published in 2014. Key topics include: android-framework, rxjava2, saf.

SAF

@Tony沈哲 on weibo
Build Status
Codacy Badge
License

SAF(Simple Android Framework)最早的定位是一个简单的Android框架,现在它可以为Android App开发提供一系列基础性的组件。这个项目第一次提交到google code是2012年的3月26号,我已经断断续续做了5年多了。

SAF曾经在多个项目中使用,包括今夜酒店特价app、锦江之星app、京东内部的多个app(京东众包、京明管家、众包商户端、众包运作主管)等等。
目前google code上的工程早已暂停维护,全部迁移到github上。SAF目前文档版本是1.1.19,下一个版本会是1.2.0。1.2.0发布在即,会有很多新的变化和特性。

遇到任何问题欢迎跟我联系,玩得开心:)

除了SAF自带的demo app外,魔窗的android demo app也使用了SAF,而且也是开源的

主要功能

SAF子项目

SAF已经拆分成多个子项目,每个子项目都可以单独使用,没有任何的依赖关系。

  • 日志框架:https://github.com/fengzhizi715/SAF-Kotlin-log

    下载:

    groovy
    compile 'com.safframework.log:saf-log:1.5.5'
  • Activity路由框架:https://github.com/fengzhizi715/SAF-Kotlin-Router

    下载:

    groovy
    dependencies { implementation 'com.safframework.router:saf-router:1.2.1' implementation 'com.safframework.router:saf-router-annotation:1.2.0' annotationProcessor 'com.safframework.router:saf-router-compiler:1.2.0' ... }
  • 依赖注入框架:https://github.com/fengzhizi715/SAF-Kotlin-InjectView

    下载:

    groovy
    dependencies { implementation 'com.safframework.injectview:saf-injectview:1.1.1' implementation 'com.safframework.injectview:saf-injectview-annotation:1.1.1' annotationProcessor 'com.safframework.injectview:saf-injectview-compiler:1.1.1' ... }
  • AOP框架:https://github.com/fengzhizi715/SAF-AOP

    下载:

    groovy
    compile 'com.safframework:saf-aop:1.3.0'
  • 缓存框架:在saf项目中,并未单独拆分成独立的项目

    下载:

    groovy
    compile 'com.safframework:saf-cache:1.1.1'
  • 消息队列框架:在saf项目中,并未单独拆分成独立的项目

    下载:

    groovy
    compile 'com.safframework:saf-queue:1.0.1'
  • 权限框架:在saf项目中,并未单独拆分成独立的项目

    下载:

    groovy
    compile 'com.safframework:saf-permission:1.1.0'
  • RxLifecycle:在saf项目中,并未单独拆分成独立的项目

    下载:

    groovy
    compile 'com.safframework:saf-rxlifecycle:1.1.2'

ChangeLog

版本更新记录

Author

联系方式

Blog: http://www.jianshu.com/users/4f2c483c12d8/

Github: https://github.com/fengzhizi715

E-mail:fengzhizi715@126.com

Wechat:fengzhizi715

Contributors

  1. frankswu 完善老版本的Inject框架和Router框架
  2. ymcao 增加AsyncTask替换android系统的AsyncTask
  3. aaron 修改build.gradle,支持多个module合并到一个jar包。

TODO

  1. Utils 全部用Kotlin重写
  2. 优化Router框架

License

Copyright (C) 2012 - present, Tony Shen.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Contributors

Showing top 4 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from fengzhizi715/SAF via the GitHub API.Last fetched: 6/23/2026