- 博客(44)
- 资源 (6)
- 收藏
- 关注

原创 空包加签
一些应用市场找回应用时可能需要对空包进行加签名需要使用一下方式:jarsigner -verbose -keystore [game.keystore] -signedjar [D:\signed.apk] [D:\unsign.apk] [game.keystore.Alias] -digestalg SHA1参数说明:[game.keystore] game.keystore ...
2019-03-30 16:51:03
99
原创 internal.KaptWithoutKotlincTask$KaptExecutionWorkAction 问题 ---Room数据库
解决办法在project层级的build.gradle中的allprojects模块加入配置。目前发现使用的开发工具是MAC M3芯片的配置会出现这个问题。M1就应该有这个问题。其中3.46.1.3版本可自行查看版本。
2024-10-02 12:13:02
602
1
原创 requestLegacyExternalStorage
工程 采用的sdk 为 29 , 第三方库 sdk为 28 , 测试机为android12适配androidQ或者改低库sdk到28关于分区存储,在Android10就已经推行了, 是应用对于文件的读写只能在沙盒环境,也就是属于自己应用的目录里面读写。其他媒体文件可以通过MediaStore进行访问。但是在android10的时候,Google还是为开发者考虑。在targetSdkVersion = 29应用中,设置android:requestLegacyExternalStorage=.
2022-02-14 17:08:18
14359
1
原创 flutter环境配置
一、flutter 中文网https://flutterchina.club/setup-macos/mac配置环境1.打开终端输入 :sudo vi ~/.bash_profile 进入配置文件2.添加镜像,按a编辑,编辑完之后,按ESC键,输入:wq保存退出//第一个路径中/Users/zixiao/Downloads/flutter填入自己flutter路径export PATH=/Users/zixiao/Downloads/flutter/bin:$PATHexpor..
2021-11-29 17:38:11
1758
原创 recyclerview加载后自动滑动
使用一个布局里面有recyclerView时,首次打开页面-加载数据-展示列表。这时 recyclerView会自动往下滑一段。这是因为recyclerview获取到了焦点。在父布局增加android:descendantFocusability="blocksDescendants"可解决<RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" andr...
2021-11-23 16:15:00
1952
原创 一个简单的mvp
Activity 实现Precenter中的接口来处理数据,new 一个Precenter对象并将自身传递给Precenter通过Precenter对象 向Precenter发出指令//mvppublic class MainActivity extends AppCompatActivity implements Precenter.viewInter{ private Precenter mprecenter; @Override protected vo.
2021-09-24 21:57:50
138
原创 双重锁封装定位
//定位工具类public class LocationUtil { //声明mlocationClient对象 public static LocationUtil mLocationUtil; public AMapLocationClient mlocationClient; Context mContext; LocationLister mLocationLister; private LocationUtil(Context mCon.
2021-09-10 11:22:53
103
原创 阿里百川、友盟app:transformClassesWithDexForDebug
相信大家在Android的开发过程中都免不了要集成第三方的项目、最近我就集成了阿里百川的SDK、其中就遇到了各种问题、今天终于集成成功了、困扰我最久的问题就是transformClassesWithDexForDebug、详细的Log如下Error:Execution failed for task ´:app:transformClassesWithDexForDebug´.> c...
2021-08-29 18:10:16
312
原创 retrofit 简单封装 支持多域名
retrofit 简单封装public class RetrofitUtils { private static ApiService apiService; public Handler mHandler = new Handler(Looper.getMainLooper()); private static final class Holder { private static final RetrofitUtils INSTANCE = new Re
2021-04-20 19:10:01
920
3
原创 python 安装 PIL (Pillow)
PIL已修改为 Pillow如果没安装 pip先安装 pippipsudo easy_install pip一、使用 pip 下载获取 Pillowpip install pillow二 、手动下载:https://pypi.python.org/simple/pillow/Pillow-2.5.1-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl安装whl文件使用:$...
2021-02-18 15:12:00
1191
原创 pip安装python包出错 pip install pyCrypto
pip安装pyCrypto时报错Could not find a version that satisfies the requirement pyCrypto (from versions: ):可能网络的问题,可以使用镜像源加速改为豆瓣源:pip install pyCrypto-i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com或者pip3 install pyCrypto-i htt...
2021-02-18 11:38:39
770
1
原创 android 文字高亮,不去区分大小写
String titlebig=data.getNickname().toUpperCase();String keywordbig=keywords.toUpperCase();int indexOf = titlebig.indexOf(keywordbig);builder.setSpan(new ForegroundColorSpan(Color.parseColor("#E10000")), indexOf, indexOf + keywords.length(), SPAN_EXCLUS.
2021-01-27 12:26:19
336
1
原创 BUILD SUCCESSFUL有警告无法运行,需忽略警告
1.在app 的build.gradle中 添加lintOptions {checkReleaseBuilds falseabortOnError false}2. 在project的build.gradle中 添加allprojects {//忽略警告gradle.projectsEvaluated {tasks.withType(JavaCompile) {options.compilerArgs << "-Xlint:unchecked"..
2021-01-09 14:29:01
1672
原创 mac显示隐藏文件夹
在这里隐藏文件所在的目录按键盘上面的shift+cmmand+. ,接着看到隐藏文件夹内凡是前面带有小点的隐藏文件,或者是显示淡蓝色的文件都是隐藏文件。通过这个方式就可以查看隐藏的目录。要恢复隐藏文件的话再次按shift+cmmand+. ,即可恢复文件的隐藏状态 。...
2020-06-19 14:23:16
257
原创 获取友盟渠道号
//获取代码中的渠道号AnalyticsConfig.getChannel(context);//获取清单文件中渠道号/*** 获取友盟渠道名* @param context 此处习惯性的设置为activity,实际上context就可以* @return 如果没有获取成功,那么返回值为空*/public static String getChannelName(Context context, String defChannel) {if (conte...
2020-06-19 14:21:35
1043
原创 android 权限判断
1.SplashActivity@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);if (Build.VERSION.SDK_INT >= 23) {//...
2020-03-27 11:12:36
2604
原创 极光一键登录返回6001 极光认证返回6001 LoginToken 获取失败
极光认证 6001 代表无法获取LoginToken今天测试测出来一个问题 修改系统时间后无法调起sdk 提示6001 但是极光不提示原因 ,废了会儿工夫。。。。。...
2020-02-21 14:35:24
3501
1
原创 使用CoordinatorLayout+AppBarLayout+NestedScrollView悬浮停靠 再使用SmartSwipeRefresh下拉刷新造成滑动冲突
问题 :使用CoordinatorLayout+AppBarLayout+NestedScrollView悬浮停靠 再使用SmartSwipeRefresh下拉刷新造成滑动冲突(拉到任何位置都能刷新)解决方案:监听AppBarLayout 当滑动到头部位置开启刷新 其余的不刷新abLayout.addOnOffsetChangedListener(new AppBarLayo...
2019-11-01 16:26:52
1572
转载 Android实现滑动到顶部悬停的效果
多写一个和需要悬浮的部分一模一样的layout,先把浮动区域的可见性设置为gone。当浮动区域滑动到顶部的时候,就把浮动区域B的可见性设置为VISIBLE。这样看起来就像悬浮在顶部不动了。这里介绍的是另外一种方式:使用design包中的控件? 1 2 3 4 5 6 7 8 9 10 11 ...
2019-10-23 18:49:00
1083
原创 .gitignore
# Built application files*.apk*.ap_# Files for the Dalvik VM*.dex# Java class files*.class# Generated filesbin/gen/out/# Gradle files.gradle/build/# Local configuration file (sdk p...
2019-07-03 09:27:35
108
原创 百度地图 libBaiduMapSDK_base_v4_2_1.so" is 32-bit instead of 64-bit错误
百度地图 libBaiduMapSDK_base_v4_2_1.so" is 32-bit instead of 64-bit错误有的手机默认支持64位,启动的时候会尝试加载64位的so。不过包却不一定对64位做出支持。当系统无法加载到理想的包,就会抛出以下异常。libBaiduMapSDK_base_v4_2_1.so" is 32-bit instead of 64-bit不过,An...
2019-04-23 18:11:23
1386
1
原创 使用HttpURLConnection获取数据部分乱码
问题是因为HttpURLConnection接收数据的时候 字符集默认的是GBK 要转码UTF-8public static String sendPostNew(String url, String param ) { String result = ""; try { URL httpurl = new URL(url); HttpURLC...
2019-04-16 17:32:08
979
原创 apicloud模块开发时候找不到引用的jar中的控件
使用apicloud 模块开发 android studio打包时候找不到引用的jar中的控件,例如 Recycleview,需要在打压缩包的时候将recyclerview-v7-26.0.0.aar包和module一起打包
2019-03-30 16:49:13
380
转载 android 融云 获取token
import android.util.Log;import com.alibaba.fastjson.JSON;import com.jieting.shangmen.bean.UserRespone;import org.apache.http.HttpResponse;import org.apache.http.NameValuePair;import org.apa...
2019-02-24 22:45:01
1218
2
原创 android中使用hbuilder混合开发中提示未添加plugintest模块 请参考283
1.未添加xxxx模块 一般都会让去http://ask.dcloud.net.cn/article/283按照上面添加可以解决一部分问题2.但是有些是需要android这边配置,比如plugintest模块需要在android 的assets文件夹中的dcloud_properties文件中配置 <feature name="plugintest" valu...
2019-01-15 09:48:46
2690
原创 android 中使用webview 加载本地 web页面
1.在src/amin目录下创建assets目录2.在assets目录中创建web(名字可以自己起)文件夹(据说如果不创建这层目录就无法拿到assets中的文件)3.将css、js、html文件放入web文件夹中4.将html文件中的引用css、js的路径改为file:///android_asset/web/xx.css(如果不更改就不会被找到)例如:<link re...
2019-01-15 09:23:49
7461
转载 解决Android P弹窗问题
Android 9 弹出提示框 在application中 调用private void closeAndroidPDialog(){ try { Class aClass = Class.forName("android.content.pm.PackageParser$Package"); Constructor declaredCo...
2018-12-30 10:33:04
2962
原创 ScrollView嵌套recycle滑动卡顿
package cn.benben.hoola.untils;import android.content.Context;import android.util.AttributeSet;import android.util.Log;import android.view.MotionEvent;import android.view.ViewConfiguration;imp...
2018-12-26 13:48:32
285
转载 关于CoordinatorLayout和ListView滑动冲突的解决
关于CoordinatorLayout和ListView滑动冲突的解决 public class MyListView extends ListView implements NestedScrollingChild{ private final NestedScrollingChildHelper mScrollingChildHelper; public MyListVi...
2018-12-26 11:44:48
1019
1
原创 CoordinatorLayout 实现悬浮停靠
<android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@+id/rv_title"> <android.suppo...
2018-12-26 11:04:16
1325
原创 Radingbar 星星控件
布局文件 xml<RatingBar android:id="@+id/iv_shop_pf_shanghupingfen" style="@style/RadingStyle" android:layout_width="wrap_content" android:layout_height="10dp" android:layout_marg...
2018-12-26 10:57:27
143
原创 StringUtil工具类
/* * 文件名: StringUtil.java * * 描 述: 字符串操作工具类 */import android.util.Log;import java.math.BigDecimal;import java.math.RoundingMode;import java.text.DecimalFormat;import java.text.SimpleD...
2018-12-22 16:34:50
602
原创 圆角矩形
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"> <!-- 内部颜色 --> <solid android:color="#FF5A5F&q
2018-12-20 14:27:49
726
转载 MapUtil 地图坐标转换
public class MapUtil { //百度转高德 private static double[] bdToGaoDe(double bd_lat, double bd_lon) { double[] gd_lat_lon = new double[2]; double PI = 3.14159265358979324 * 3000....
2018-12-11 11:48:19
428
原创 混淆代码
# 代码混淆压缩比,在0~7之间,默认为5,一般不下需要修改-optimizationpasses 5# 混淆时不使用大小写混合,混淆后的类名为小写# windows下的同学还是加入这个选项吧(windows大小写不敏感)-dontusemixedcaseclassnames# 指定不去忽略非公共的库的类# 默认跳过,有些情况下编写的代码与类库中的类在同一个包下,并且持有包中内容...
2018-11-16 11:44:36
499
原创 Android recycleview 瀑布流 横纵向间距
这个使用后左右间距需要设置recycleview margin值. 例如等于 margin5//activity中使用。//使用工具类recyclerView.addItemDecoration(new StaggeredDividerItemDecoration(SoppiingDetailActivity.this, 10)); //工具类public class Sta...
2018-11-06 20:02:54
1159
转载 mac上完整卸载删除:android studio方案
如果你是mac ,你删除as ,删不干净也正常,你会发现安装的时候,前面的东西也在.配置文件在,会导致你以前的错误不想要的东西都在.废话不多说,复制粘贴!!~~~~~~~~ 第一步: 复制粘贴!!~~~~~~~~ 复制到命令行里面,直接回车就OK rm -Rf /Applications/Android\ Studio.apprm -Rf ~/Library/Preferences/Andr...
2018-06-03 16:40:46
4304
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人