Android总结汇总

开源APP

1、混合开发项目AHP

地址:https://github.com/Witnin/AHP

简介:Kotlin+Java

常用配置:

  1. AndroidManifest配置:

1.1明文传输:

在application中添加配置

android:usesCleartextTraffic="true"

2、权限:

2.1介绍:

Android 权限(一):权限大全_broadview_java的博客-CSDN博客

3、配置

3.1禁用返回键:

禁用左滑或者返回键_@Within的博客-CSDN博客

界面布局

  1. LinearLayout线性布局:

  1. RelativeLayout相对布局:

RelativeLayout相对布局_@Within的博客-CSDN博客

  1. TableLayout表格布局:

  1. FrameLayout帧布局:

  1. ConstraintLayout约束布局:

资源创建

  1. .9.png图片创建:AndroidStudio根据png图片创建.9.png_android生成.9文件_@Within的博客-CSDN博客

  1. XML矢量图创建:使用Android studio将svg生成xml矢量图_android studio svg转xml_@Within的博客-CSDN博客

常用框架

汇总

ARouter、Atlas、CC
Koin、Hilt/dagger2
EasyPermission
Vacsonic、AgentWeb
Gson
Glide、picasso、Fresco
Retrofit/okhttp/okGo
Lottile
LeakCanery、DoKit
Zxing/Zbar
Sophix、TinkerPatch
Jetpack
Logger、Timber、Hugo
vLayout,tangram
Luban
banner

导航

1、集成ARouter导航框架

官网地址(停止维护):https://github.com/alibaba/ARouter/blob/master/README_CN.md

jadepeakpoethttps://github.com/jadepeakpoet/ARouter/blob/develop/README_CN.md

地址:Android集成ARouter_@Within的博客-CSDN博客

2、集成Jetpack navigation

官网地址:Navigation  |  Jetpack  |  Android Developers

demo地址(xml配置改造为json读取):https://github.com/Witnin/Navigation_example

2.1、Navigation配置icon文字同时显示

配置icon文字同时显示BottomNavigationView加入app:labelVisibilityMode="labeled"

        <com.google.android.material.bottomnavigation.BottomNavigationView
            android:id="@+id/nav_view"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="0dp"
            android:layout_marginEnd="0dp"
            android:background="?android:attr/windowBackground"
            app:labelVisibilityMode="labeled"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:menu="@menu/bottom_nav_menu" />

打包:

  1. 普通打包:

Android Studio打包apk_@Within的博客-CSDN博客

  1. VasDolly多渠道打包:

VasDolly实现多渠道打包_@Within的博客-CSDN博客

BUG汇总

1.ARouter:

1.1集成ARouter报错:

Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionEx_@Within的博客-CSDN博客

2、Retrofit:

2.1 @Field parameters can only be used with form encoding:

@Field parameters can only be used with form encoding_@Within的博客-CSDN博客

3、AndroidStudio:

3.1 No version of NDK matched the requested version

No version of NDK matched the requested version 21.0.6113669. Versions available locally: 22.1.71716_@Within的博客-CSDN博客

JetPack Compose

1、上拉刷新、下拉加载:

Jetpack Compose实现下拉刷新、上拉加载_compose 下拉刷新_@Within的博客-CSDN博客

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值