1,还是git,git回退
建立新分支,把旧分支回退
先查看有没有没提交的
SENRSL:Candy senrsl$ git statusOn branch whiteYour branch is up to date with 'origin/white'.nothing to commit, working tree cleanSENRSL:Candy senrsl$ git branch blueSENRSL:Candy senrsl$ git checkout blueSwitched to branch 'blue'SENRSL:Candy senrsl$ git branch* bluemasterwhiteSENRSL:Candy senrsl$ git log
新建分支,检出,确认
回旧分支
SENRSL:Candy senrsl$ git checkout whiteSwitched to branch 'white'Your branch is up to date with 'origin/white'.SENRSL:Candy senrsl$ git branchbluemaster* whiteSENRSL:Candy senrsl$
开始回退本地
SENRSL:Candy senrsl$ git reset --hard 03cff454003e9d94d6cd0ddea513b9c84127eb0eHEAD is now at 03cff454 Merge branch 'white' of github.com:senrsl/candy-clan-android into whiteSENRSL:Candy senrsl$ git rev-parse HEAD03cff454003e9d94d6cd0ddea513b9c84127eb0eSENRSL:Candy senrsl$ git log
本地回退后,强制推送到服务器
SENRSL:Candy senrsl$ git push -fTotal 0 (delta 0), reused 0 (delta 0)To github.com:senrsl/candy-clan-android.git+ e2d6696d...03cff454 white -> white (forced update)SENRSL:Candy senrsl$ git branch
2,git恢复服务器删除的文件
正用的被其他人删了,恢复回来
第一步,查看删除
第二步,恢复指定文件,commit id 后面有个~1 要加
SENRSL:Candy senrsl$ git log --diff-filter=D —summary
SENRSL:Candy senrsl$ git checkout 85b*************~1 app/src/main/res/drawable/bitmap_welcome.xmlSENRSL:Candy senrsl$ git status
3,android混淆后崩溃
SENRSL:df-release senrsl$ sh /Users/senrsl/android/sdk/tools/proguard/bin/retrace.sh app-df-release-mapping.txt file
09-27 16:56:19.759 4297-4297/? W/TEST: 2018-09-27 08:56:19java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.senrsl.a.a.g$a$a.a()' on a null object reference
at com.senrsl.candy.fragment.LearnFragment$5.onProfile(Unknown Source)
err
at com.senrsl.ting.manager.TopicManager$1.onSuss(Unknown Source)
at com.senrsl.ting.manager.callback.BaseTingCallback.onResponse(Unknown Source)
processServerErr
at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
09-27 16:56:19.766 4297-4701/? W/TEST: 程序异常,正在重启.
SENRSL:df-release senrsl$
4,Caused by: java.lang.IllegalStateException: Failed to find target with hash string 'android-27' in: /Users/senrsl/android/sdk
之前在两台电脑上都跑的好好地一个库,换了这个电脑死活就是 build failed.
我只是 一个简单的 ./gradlew clean --info --stacktrace
昨晚上 折腾一晚上,今天折腾一上午,草
这本来是一个基于eclipse 环境的 gradle,走的eclipse 那套 android sdk.
然后,刚刚把项目 导到 Intellij里,配置走 as那套环境,运行了gradle refresh按钮自动同步,之后,竟然好了。。。。
人呐,干嘛非要跟自己较劲。。。。
5,MacOS升级mojava之后,邮件的资料全都丢了。。。。。
草稿箱里的东西全都丢了,签名也没了。。。。
好吧,签名没丢,就是没法用到具体邮件上了,只能新建一个一样的。。。。
6,Intellij格式化android xml
在eclipse里格式化很好使的
到了Intellij没反应了
Preferences—>Editor—>Code Style—>注意这里选Project还是Default全局,二者互不影响—>Set from…—>Predefined Style—>Android.
这时候就会发现这里面的Arrangement里多了很多的配置了。
然后,去xml文件里,格式化Ctrl+Shift+F还是没反应
这时候,选菜单栏,Code—>Show Reformat Code Dialog,右边那俩,一个是格式化包引入,一个是格式化代码
只勾Rearrang Code,再去Ctrl+Shift+F Xml就能格式化了。。。。
终于找到了。。。。
7,Intellij导包顺序
在android studio上是这样的
Import 99,
Package with *是空
Import Layout顺序如图:
android,line,com,line,junit,line,net,line,org,line,java,line,javax,line,all other,line,start other,line.
然后,eclipse就比较简单了
java,javax,org,com.
Intellij是5跟3,下面随便改啦
Intellij这个布局,Default 跟Project,Project就在项目的idea/codeStyles/Project.xml里
8,java.lang.NoSuchMethodException: <init> [class android.view.View] at java.lang.Class.getConstructor(Class.java:528)
混淆后 反射构造参数找不到。。。。
测试没问题,正式版一直报错,一项一项排除,终于,打包26次,终于定位到问题了。。。。。
虽然错误描述很清晰,但是,架不住水啊。。。。
上午上班开始找,到下午3多,才找到,然后 搜到了 blog.csdn.net/sfshine/article/details/44980703跟stackoverflow.com/questions/4447145/proguard-and-reflection-in-android,用后面这个链接的第一个方法不管用,但是第二个管用。。。。
-keepclassmembers class * { public void *(android.view.View);}
混淆加上这个就好了,但是 这个看起来是作用于方法啊,为什么构造函数会起作用。。。。
9,java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.HorizontalScrollView$SavedState
不用找那么乱起八糟的方法,其实就是在这个界面里,有布局的id是重复的
activity的布局里定义一个 layout_tab,然后这个item_tab的跟布局id也是 layout_tab….
10, docker 基本玩法
从官网下docker www.docker.com/products/docker-desktop
安装完之后 校验
SENRSL:~ senrsl$ docker --versionDocker version 18.09.0, build 4d60db4SENRSL:~ senrsl$ docker infoContainers: 0Running: 0Paused: 0Stopped: 0Images: 0Server Version: 18.09.0Storage Driver: overlay2Backing Filesystem: extfsSupports d_type: trueNative Overlay Diff: trueLogging Driver: json-fileCgroup Driver: cgroupfsPlugins:Volume: localNetwork: bridge host macvlan null overlayLog: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslogSwarm: inactiveRuntimes: runcDefault Runtime: runcInit Binary: docker-initcontainerd version: 468a545b9edcd5932818eb9de8e72413e616e86erunc version: 69663f0bd4b60df09991c08812a60108003fa340init version: fec3683Security Options:seccompProfile: defaultKernel Version: 4.9.125-linuxkitOperating System: Docker for MacOSType: linuxArchitecture: x86_64CPUs: 6Total Memory: 1.952GiBName: linuxkit-025000000001ID: 42AN:S7PX:6Y2Q:7OWF:JWGV:BJSA:5Y6D:C6LY:EQIF:Q3WS:HQOM:OWWNDocker Root Dir: /var/lib/dockerDebug Mode (client): falseDebug Mode (server): trueFile Descriptors: 24Goroutines: 50System Time: 2018-12-12T10:24:04.981006687ZEventsListeners: 2HTTP Proxy: gateway.docker.internal:3128HTTPS Proxy: gateway.docker.internal:3129Registry: https://index.docker.io/v1/Labels:Experimental: falseInsecure Registries:127.0.0.0/8Live Restore Enabled: falseProduct License: Community EngineSENRSL:~ senrsl$
然后 下个Ubuntu来hello world.
SENRSL:~ senrsl$ docker run ubuntu:18.04 /bin/echo "Hello Docker"Unable to find image 'ubuntu:18.04' locally18.04: Pulling from library/ubuntu32802c0cfa4d: Pull completeda1315cffa03: Pull completefa83472a3562: Pull completef85999a86bef: Pull completeDigest: sha256:6d0e0c26489e33f5a6f0020edface2727db9489744ecc9b4f50c7fa671f23c49Status: Downloaded newer image for ubuntu:18.04Hello DockerSENRSL:~ senrsl$ docker run ubuntu:18.04 /bin/echo "Hello Docker"Hello DockerSENRSL:~ senrsl$
大概这就是算是入门了
docker 里面,容器跟 镜像 是两个概念。。。。
SENRSL:docker senrsl$ docker ps -a -q //列出所有容器 -a -q 同 -aq5ed91afb0333bd4532404ac395498e9ff1faSENRSL:docker senrsl$ docker stop 5ed91afb0333 //停止指定容器5ed91afb0333SENRSL:docker senrsl$ docker rm 5ed91afb0333 //删除指定容器5ed91afb0333SENRSL:docker senrsl$ docker ps -a -qbd4532404ac395498e9ff1faSENRSL:docker senrsl$ docker images //当前镜像列表REPOSITORY TAG IMAGE ID CREATED SIZEeosio/eos latest e97bcfe78909 7 days ago 223MBubuntu 18.04 93fd78260bd1 3 weeks ago 86.2MBSENRSL:docker senrsl$ docker rmi e97bcfe78909 //删除指定镜像Untagged: eosio/eos:latestUntagged: eosio/eos@sha256:41431cde930f723920773f04059e05e0c9c398ca2670596b4c6054658436454dDeleted: sha256:e97bcfe78909fcca7c8da928a7f4b15061a6f7ff4c9df93b5bc4e81bcbb97cefDeleted: sha256:c9b64dbfa10eab2b280ca29ef86d018434af10f1f5a6af7f81e0d3601ea45b48Deleted: sha256:9b3495bf418ce6587a770a6f3d00257278b04ce9ba299ed8531ee0474de5aa0fDeleted: sha256:34b9c148456561f0892b0d8f2a5c4f6f1cc9fffec7880325d3a63549105e6698Deleted: sha256:67025d99405a96bdc6c226ddf7f1a554f554d6276f656daa6424888125318b62Deleted: sha256:6b13d71735fa2bb9e23dabd117413c0d94a6012ee7c33746a9497da9b69df28bDeleted: sha256:d6786f211cc16675885d1de44008f5109cab158acbb408c7524bf3c4a343b8c6Deleted: sha256:8d4568699dd5e4a903dff8c62a2769a3b87b48a3c7cf63ab3962cb1618f089a7Deleted: sha256:c3c2fc82d3b2b53f7fd048c1fc826700725f805b32c0e786785a7c9164128498Deleted: sha256:a9fa410a3f1704cd9061a802b6ca6e50a0df183cb10644a3ec4cac9f6421677aDeleted: sha256:b21f75f60422609fa79f241bf80044e6e133dd0662851afb12dacd22d199233aDeleted: sha256:038d2d2aa4fb988c06f04e3af208cc0c1dbd9703aa04905ade206d783e7bc06aDeleted: sha256:b904d425ea85240d6af5a6c6f145e05d5e0127f547f8eb4f68552962df846e81Deleted: sha256:db9476e6d963ed2b6042abef1c354223148cdcdbd6c7416c71a019ebcaea0edbSENRSL:docker senrsl$
不过好像有很多种写法。。。。
本地新建分支推送到远端
SENRSL:Candy senrsl$ git branch blue-feat-rtmpSENRSL:Candy senrsl$ git push origin blue-feat-rtmp:blue-feat-rtmpSENRSL:Candy senrsl$
删除本地及远端分支
SENRSL:Candy senrsl$ git branch -d blue-feat-rtmp
Deleted branch blue-feat-rtmp (was 658e8702).SENRSL:Candy senrsl$ git push origin --delete blue-feat-rtmpSENRSL:Candy senrsl$
11,Mac 邮件每次升级都会丢草稿。。。。已经第二次了,,,,
换客户端吧。。。。
2019年01月17日10:10:50
----
senRsl
2018年09月14日18:08:04
senRsl
2018年09月14日18:08:04
没有评论 :
发表评论