- 博客(10)
- 收藏
- 关注
原创 【Android Studio】将一个Module直接复制到另一个Project中需要改动哪些文件呢
一个奇怪的需求,硬拷贝根目录/settings.gradleinclude ':app'include ':ThirdPartyDemo' // 按照样式新增本行 这样在【Run/Debug Configurations】中就会有该Module的配置根目录/.idea/gradle.xml <set> <option v...
2018-09-30 11:06:00 1578
原创 【Git及其冲突】Git commit与pull的先后顺序【记一次奇怪的历程】
先git add .再git commit -m "本地第A次提交"之后git pull origin master之后有冲突:Auto-merging WheelPicker/build.gradleCONFLICT (content): Merge conflict in WheelPicker/build.gradleAuto-merging Imag...
2018-09-29 16:52:23 4857
原创 【Debug-启动Activity】启动外部应用的指定Activity不成功
可使用如下方法启动外部应用的指定Activity: String packageName = "com.example.abc"; String launcherClassName = "com.example.abc.TestActivity"; try { Intent intent = new Intent();...
2018-09-27 11:28:38 1033
原创 【Debug-aapt2】error: style attribute '@android:attr/windowEnterAnimation' not found
虫子描述Git下来的项目Build报错:具体为:error: style attribute '@android:attr/windowEnterAnimation' not found.Message{kind=ERROR, text=error: style attribute '@android:attr/windowEnterAnimation' not found.,...
2018-09-20 18:33:36 3586 11
原创 【Debug-Ripple】Android Ripple水波纹设置之后无效
遇到的问题使用静态方式定义水波效果在项目中无效。解决方案情况①:未在XML文件中设置控件可点击参考:https://www.jianshu.com/p/c29cfd89cb52需要添加android:clickable="true"情况②:水纹效果被遮挡这个情况真的很狗血,测试的都没有问题,一上项目就无效果,折腾了俩小时。后来发现是因为被一层图片遮挡,这可如何是...
2018-09-20 12:50:13 1697 1
原创 【Debug-git】error:. local changes to the following files would be overwritten by merge:.idea/misc.xml
公司、个人编译环境可能是有某些不为人知的差异,每次用git命令pull的时候,总会遇到一些奇葩问题,比如:...done.Resolving deltas: 100% (55/55), completed with 29 local objects.From https://git.xxxx.xxx/xxxxxxxx/xxxxxx * branch master ...
2018-09-16 00:18:13 2120
原创 【Debug-NullPointerException】findViewById(): Attempt to invoke ...on a null object reference
空指针异常很常见,也很好找,今天重构代码的时候,愣是报了一个很神奇的NullPointerExceptionjava.lang.RuntimeException: Unable to start activity ComponentInfo{com...Activity}: java.lang.NullPointerException: Attempt to invoke virt...
2018-09-10 15:53:03 437
原创 【Debug-dependency 】Unable to resolve dependency for ':app@release/compileClasspath':
git下项目之后build报错:Unable to resolve dependency for ':app@release/compileClasspath':Could not resolve com.xxx.之后发现是module下的build.gradle文件的依赖中的:implementation 'com.squareup.okhttp3:okhttp:3.11.0'...
2018-09-09 01:24:57 1120
原创 【XML-ConstraintLayout】写一个类似九宫格的桌面图标集
本想用新出的ConstraintLayout布局来代替一层一层的嵌套LinearLayout或者RelativeLayout或者GridLayout来实现一个类似九宫格或16宫格的手机桌面图标集,在写第一行四个图标均匀分布的时候,用一下代码,总发现有两个图标被挤没了: <Button android:id="@+id/btn_main_1_1" a...
2018-09-03 16:35:53 423
原创 【Debug-xml】'.' is not a valid file-based resource name character:only lowercase a-z, 0-9, or under..
昨天对古老代码重构时遇到的2B问题,报错:activity_canvas.main.xml: Error: '.' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore这个错误用心看错误提...
2018-09-03 09:49:47 2363
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人