-
Notifications
You must be signed in to change notification settings - Fork 0
/
local-search.xml
160 lines (75 loc) · 49.8 KB
/
local-search.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title></title>
<link href="/2023/03/04/android%E4%B8%AD%E7%9A%84gradle/"/>
<url>/2023/03/04/android%E4%B8%AD%E7%9A%84gradle/</url>
<content type="html"><![CDATA[<h1 id="Android中的gradle"><a href="#Android中的gradle" class="headerlink" title="Android中的gradle"></a>Android中的gradle</h1><p>(浅尝辄止,欢迎补充)</p><h2 id="gradle是什么"><a href="#gradle是什么" class="headerlink" title="gradle是什么"></a>gradle是什么</h2><p>编译打包Android工程的构建工具</p><h2 id="项目视图"><a href="#项目视图" class="headerlink" title="项目视图"></a>项目视图</h2><p>project视图<br>Android视图(AS生成,方便使用)</p><h2 id="project与module"><a href="#project与module" class="headerlink" title="project与module"></a>project与module</h2><p>一个project里有多个module(app、library…)</p><p>$$ project\left{<br>\begin{matrix}<br> app\library1\library2\…<br>\end{matrix}<br>\right.$$</p><p>$$12+12=24$$</p><h2 id="project级别-gradle与gradle-plugin的对应"><a href="#project级别-gradle与gradle-plugin的对应" class="headerlink" title="(project级别)gradle与gradle plugin的对应"></a>(project级别)gradle与gradle plugin的对应</h2><ol><li>文件查看<br>gradle版本:<br>gradle-wrapper.properties<br>gradle plugin版本:<br>project:build.gradle</li><li>AS快捷查看:<br>File -> ProjectStructure</li></ol><p><a href="https://developer.android.google.cn/studio/releases/gradle-plugin#updating-gradle">Android Gradle 插件版本说明 | Android 开发者 | Android Developers (google.cn)</a></p><h2 id="Gradle-plugin和AndroidStudio兼容性"><a href="#Gradle-plugin和AndroidStudio兼容性" class="headerlink" title="Gradle plugin和AndroidStudio兼容性"></a>Gradle plugin和AndroidStudio兼容性</h2><p>AndroidStudio版本查看:<br> help -> about</p><p><a href="https://developer.android.google.cn/studio/releases/gradle-plugin?hl=zh-cn#android_gradle_plugin_and_android_studio_compatibility">https://developer.android.google.cn/studio/releases/gradle-plugin?hl=zh-cn#android_gradle_plugin_and_android_studio_compatibility</a></p><h2 id="SDK"><a href="#SDK" class="headerlink" title="SDK"></a>SDK</h2><p>compileSdk 编译版本<br>minSdk 最小支持版本<br>targetSdk 目标版本</p><p>min <= target <= compile</p><p>现在的手机可以玩二十年前的原神<br>二十年前的手机玩不了现在的原神</p><h2 id="实例解析-app-build-gradle"><a href="#实例解析-app-build-gradle" class="headerlink" title="实例解析(app:build.gradle)"></a>实例解析(app:build.gradle)</h2><blockquote><figure class="highlight groovy"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br></pre></td><td class="code"><pre><code class="hljs groovy"><span class="hljs-comment">//插件类型 app、library</span><br>plugins {<br> id <span class="hljs-string">'com.android.application'</span><br>}<br><br>android {<br> compileSdk <span class="hljs-number">31</span><br><br> defaultConfig {<br> applicationId <span class="hljs-string">"com.example.team"</span><br> minSdk <span class="hljs-number">24</span><br> targetSdk <span class="hljs-number">31</span><br> <span class="hljs-comment">//软件版本</span><br> versionCode <span class="hljs-number">1</span><br> versionName <span class="hljs-string">"1.0"</span><br><br> testInstrumentationRunner <span class="hljs-string">"android.support.test.runner.AndroidJUnitRunner"</span><br> }<br><br> <span class="hljs-comment">//生成安装文件的配置 含release和debug</span><br> buildTypes {<br> release {<br> minifyEnabled <span class="hljs-literal">false</span><br> <span class="hljs-comment">//代码混淆</span><br> proguardFiles getDefaultProguardFile(<span class="hljs-string">'proguard-android-optimize.txt'</span>), <span class="hljs-string">'proguard-rules.pro'</span><br> }<br> }<br> <span class="hljs-comment">//java版本</span><br> compileOptions {<br> sourceCompatibility JavaVersion.VERSION_1_8<br> targetCompatibility JavaVersion.VERSION_1_8<br> }<br>}<br><br><span class="hljs-comment">//依赖</span><br>dependencies {<br> implementation fileTree(<span class="hljs-attr">dir:</span> <span class="hljs-string">'libs'</span>, <span class="hljs-attr">include:</span> [<span class="hljs-string">'*.jar'</span>])<br> testImplementation <span class="hljs-string">'junit:junit:4.13.2'</span><br> implementation <span class="hljs-string">'com.tbruyelle.rxpermissions2:rxpermissions:0.9.4@aar'</span><br> implementation <span class="hljs-string">'io.reactivex.rxjava2:rxandroid:2.0.2'</span><br> implementation <span class="hljs-string">"io.reactivex.rxjava2:rxjava:2.0.0"</span><br> implementation <span class="hljs-string">'com.github.bumptech.glide:glide:4.11.0'</span><br> annotationProcessor <span class="hljs-string">'com.github.bumptech.glide:compiler:4.11.0'</span><br> implementation <span class="hljs-string">'com.squareup.retrofit2:retrofit:2.5.0'</span><br> implementation <span class="hljs-string">'com.squareup.retrofit2:converter-gson:2.5.0'</span><br> implementation <span class="hljs-string">'com.squareup.retrofit2:adapter-rxjava:2.1.0'</span><br> implementation <span class="hljs-string">'androidx.appcompat:appcompat:1.4.1'</span><br> implementation <span class="hljs-string">'com.google.android.material:material:1.5.0'</span><br> implementation <span class="hljs-string">'androidx.constraintlayout:constraintlayout:2.1.3'</span><br> androidTestImplementation <span class="hljs-string">'androidx.test.ext:junit:1.1.3'</span><br> androidTestImplementation <span class="hljs-string">'androidx.test.espresso:espresso-core:3.4.0'</span><br>}<br></code></pre></td></tr></table></figure></blockquote><h2 id="support-appcompat使用"><a href="#support-appcompat使用" class="headerlink" title="support.appcompat使用"></a>support.appcompat使用</h2><p>com.android.support只支持到api28</p><figure class="highlight apache"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs apache"><span class="hljs-attribute">implementation</span> 'com.android.support:appcompat-v7:<span class="hljs-number">28</span>.<span class="hljs-number">0</span>.<span class="hljs-number">0</span>'<br></code></pre></td></tr></table></figure><p>api28之后使用androidx(对support:appcompat的升级)</p><figure class="highlight apache"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs apache"><span class="hljs-attribute">implementation</span> 'androidx.appcompat:appcompat:<span class="hljs-number">1</span>.<span class="hljs-number">4</span>.<span class="hljs-number">1</span>'<br></code></pre></td></tr></table></figure><p>ps:</p><ol><li><p>appcompat版本还是android版本</p><p>android11 android12 </p></li><li><p>latex</p></li></ol>]]></content>
</entry>
<entry>
<title>语言遇到的问题</title>
<link href="/2022/10/21/%E5%90%84%E7%A7%8D%E8%AF%AD%E8%A8%80%E7%9A%84%E9%97%AE%E9%A2%98/"/>
<url>/2022/10/21/%E5%90%84%E7%A7%8D%E8%AF%AD%E8%A8%80%E7%9A%84%E9%97%AE%E9%A2%98/</url>
<content type="html"><![CDATA[<h1 id="初衷"><a href="#初衷" class="headerlink" title="初衷"></a>初衷</h1><p>将各种语言遇到的问题记录在一起,毕竟是一通百通的东西</p><h1 id="C-x2F-C"><a href="#C-x2F-C" class="headerlink" title="C/C++"></a>C/C++</h1><h2 id=""><a href="#" class="headerlink" title=""></a></h2><h2 id="指针作为参数使用"><a href="#指针作为参数使用" class="headerlink" title="指针作为参数使用"></a>指针作为参数使用</h2><h3 id="问题背景"><a href="#问题背景" class="headerlink" title="问题背景"></a>问题背景</h3><p>Create没有成功创建</p><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><code class="hljs c++"><span class="hljs-keyword">struct</span> <span class="hljs-title class_">Node</span>{};<br><span class="hljs-function"><span class="hljs-type">void</span> <span class="hljs-title">Create</span><span class="hljs-params">(Node* head)</span></span><br><span class="hljs-function"></span>{<br> head = (Node*)<span class="hljs-built_in">malloc</span>(<span class="hljs-built_in">sizeof</span>(Node));<br>}<br><span class="hljs-function"><span class="hljs-type">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span><br><span class="hljs-function"></span>{<br> Node* a;<br> <span class="hljs-built_in">Create</span>(a);<br>}<br></code></pre></td></tr></table></figure><h3 id="错误原因"><a href="#错误原因" class="headerlink" title="错误原因"></a>错误原因</h3><ol><li>对malloc的机制</li><li>函数是值传递</li></ol><h4 id="malloc的作用"><a href="#malloc的作用" class="headerlink" title="malloc的作用"></a>malloc的作用</h4><p>malloc()函数其实就在内存中找一片指定大小的空间,然后将这个空间的首地址范围给一个指针变量</p><h3 id="错误解析"><a href="#错误解析" class="headerlink" title="错误解析"></a>错误解析</h3><p>将指针<code>head</code>传入<code>Create()</code>,由于函数是值传递,实际上在函数里是将<code>head</code>复制了,比如<code>temp = head</code>,<code>temp</code>和<code>head</code>指向同一个地方,但是在函数里只会对<code>temp</code>进行操作<br>这时候<code>malloc</code>创建的空间首地址只是给了<code>temp</code>,出了函数之后创建的空间就随着<code>temp</code>消失而找不到了</p><h3 id="错误解决"><a href="#错误解决" class="headerlink" title="错误解决"></a>错误解决</h3><p>修改后:</p><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><code class="hljs c++"><span class="hljs-keyword">struct</span> <span class="hljs-title class_">Node</span>{};<br><span class="hljs-function"><span class="hljs-type">void</span> <span class="hljs-title">Create</span><span class="hljs-params">(Node** head)</span><span class="hljs-comment">//修改</span></span><br><span class="hljs-function"></span>{<br> *head = (Node*)<span class="hljs-built_in">malloc</span>(<span class="hljs-built_in">sizeof</span>(Node));<span class="hljs-comment">//修改</span><br>}<br><span class="hljs-function"><span class="hljs-type">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span><br><span class="hljs-function"></span>{<br> Node* a;<br> Node ** b = &a;<span class="hljs-comment">//添加</span><br> <span class="hljs-built_in">Create</span>(b);<span class="hljs-comment">//修改</span><br>}<br></code></pre></td></tr></table></figure><p>修改前:</p><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><code class="hljs c++"><span class="hljs-keyword">struct</span> <span class="hljs-title class_">Node</span>{};<br><span class="hljs-function"><span class="hljs-type">void</span> <span class="hljs-title">Create</span><span class="hljs-params">(Node* head)</span></span><br><span class="hljs-function"></span>{<br> head = (Node*)<span class="hljs-built_in">malloc</span>(<span class="hljs-built_in">sizeof</span>(Node));<br>}<br><span class="hljs-function"><span class="hljs-type">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span><br><span class="hljs-function"></span>{<br> Node* a;<br> <span class="hljs-built_in">Create</span>(a);<br>}<br></code></pre></td></tr></table></figure><h3 id="参考:"><a href="#参考:" class="headerlink" title="参考:"></a>参考:</h3><p><a href="https://blog.csdn.net/xw13106209/article/details/4962479">malloc函数详解_xw13106209的博客-CSDN博客_malloc</a></p><h1 id="Java"><a href="#Java" class="headerlink" title="Java"></a>Java</h1><h2 id="链表指向下一个值"><a href="#链表指向下一个值" class="headerlink" title="链表指向下一个值"></a>链表指向下一个值</h2><h3 id="问题背景-1"><a href="#问题背景-1" class="headerlink" title="问题背景"></a>问题背景</h3><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><code class="hljs java"><span class="hljs-comment">//错误代码</span><br><span class="hljs-keyword">if</span> (cur.next != <span class="hljs-literal">null</span>)<br>cur = cur.next;<br><br><span class="hljs-comment">//正确代码</span><br><span class="hljs-keyword">if</span> (cur != <span class="hljs-literal">null</span>)<br>cur = cur.next;<br></code></pre></td></tr></table></figure><p>错误代码会报空指针 正确代码不会</p><h2 id="错误解析-1"><a href="#错误解析-1" class="headerlink" title="错误解析"></a>错误解析</h2><p>不详</p>]]></content>
<tags>
<tag>languages</tag>
</tags>
</entry>
<entry>
<title>ubantu使用</title>
<link href="/2022/10/18/ubantu%E4%BD%BF%E7%94%A8/"/>
<url>/2022/10/18/ubantu%E4%BD%BF%E7%94%A8/</url>
<content type="html"><![CDATA[<h1 id="下载与安装"><a href="#下载与安装" class="headerlink" title="下载与安装"></a>下载与安装</h1><p>windows使用Linux有两种方式:下载系统 or 安装虚拟机<br>我选择安装虚拟机 虚拟机软件选择VMware</p><p>参考教程<br> <a href="https://zhuanlan.zhihu.com/p/477725832">VMware虚拟机安装Ubuntu详解 - 知乎 (zhihu.com)</a></p><p>VMware有个人用的免费版<br> <a href="https://customerconnect.vmware.com/en/downloads/info/slug/desktop_end_user_computing/vmware_workstation_player/16_0">VMware Workstation Player - VMware Customer Connect</a></p><p>ubantu下载<br> <a href="https://ubuntu.com/download/desktop">Download Ubuntu Desktop | Download | Ubuntu</a></p>]]></content>
<tags>
<tag>ubantu</tag>
</tags>
</entry>
<entry>
<title>view的事件分发</title>
<link href="/2022/10/17/view%E7%9A%84%E4%BA%8B%E4%BB%B6%E5%88%86%E5%8F%91/"/>
<url>/2022/10/17/view%E7%9A%84%E4%BA%8B%E4%BB%B6%E5%88%86%E5%8F%91/</url>
<content type="html"><![CDATA[<blockquote><p>看源码的准备 :键盘快捷键 源码观看方法<br><a href="https://nutcra-yu.github.io/2022/10/12/AndroidStudio%E4%BD%BF%E7%94%A8/">AndroidStudio遇到的问题</a></p></blockquote><p>事件有三种: <code>DOWN,MOVE,UP</code><br>一次触摸的流程为:<br> DOWN , MOVE , MOVE , MOVE …… UP</p><p>界面的事件会先传送给Activity<br>三种事件都会让Activity调用<code>Activity.dispatchTouchEvent()</code>函数<br>Activity经过一系列调用 最后到了<code>ViewGroup.dispatchTouchEvent()</code></p><p>ViewGroup 的 dispatchTouchEvent()</p><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br></pre></td><td class="code"><pre><code class="hljs java"><span class="hljs-keyword">class</span> <span class="hljs-title class_">ViewGroup</span>:<br><span class="hljs-keyword">public</span> <span class="hljs-type">boolean</span> <span class="hljs-title function_">dispatchTouchEvent</span><span class="hljs-params">(MotionEvent ev)</span> {<br> <br> <span class="hljs-comment">//不懂</span><br> <span class="hljs-keyword">if</span> (mInputEventConsistencyVerifier != <span class="hljs-literal">null</span>) <br> ... ;<br> <br> <span class="hljs-comment">//Accessibility不用看</span><br> <span class="hljs-keyword">if</span> (ev.isTargetAccessibilityFocus() && isAccessibilityFocusedViewOrHost()) <br> ... ;<br> <br> <span class="hljs-comment">//开始判断安全性Security </span><br> <span class="hljs-comment">// 证明要做事情了</span><br> <span class="hljs-type">boolean</span> <span class="hljs-variable">handled</span> <span class="hljs-operator">=</span> <span class="hljs-literal">false</span>;<br> <span class="hljs-keyword">if</span> (onFilterTouchEventForSecurity(ev)) {<br> <br> <span class="hljs-keyword">final</span> <span class="hljs-type">int</span> <span class="hljs-variable">action</span> <span class="hljs-operator">=</span> ev.getAction();<br> <span class="hljs-keyword">final</span> <span class="hljs-type">int</span> <span class="hljs-variable">actionMasked</span> <span class="hljs-operator">=</span> action & MotionEvent.ACTION_MASK;<br> <br> <span class="hljs-comment">//进行初始化</span><br> <span class="hljs-keyword">if</span> (actionMasked == MotionEvent.ACTION_DOWN) {<br> <span class="hljs-comment">/*在ACTION_DOWN事件触发时,重置ViewGroup状态,且mFirstTouchTarget会被置空。*/</span><br> <span class="hljs-comment">/* mFirstTouchTarget = null */</span><br> cancelAndClearTouchTargets(ev);<br> resetTouchState();<br> }<br> <br><br> <span class="hljs-comment">//判断是否拦截</span><br> <span class="hljs-keyword">final</span> <span class="hljs-type">boolean</span> intercepted;<br> <span class="hljs-keyword">if</span> (actionMasked == MotionEvent.ACTION_DOWN<br> || mFirstTouchTarget != <span class="hljs-literal">null</span>) {<br> <span class="hljs-keyword">final</span> <span class="hljs-type">boolean</span> <span class="hljs-variable">disallowIntercept</span> <span class="hljs-operator">=</span> (mGroupFlags & FLAG_DISALLOW_INTERCEPT) != <span class="hljs-number">0</span>;<br> <span class="hljs-keyword">if</span> (!disallowIntercept) {<br> intercepted = onInterceptTouchEvent(ev);<br> ev.setAction(action);<br> } <span class="hljs-keyword">else</span> {<br> intercepted = <span class="hljs-literal">false</span>;<br> }<br> } <span class="hljs-keyword">else</span> {<br> intercepted = <span class="hljs-literal">true</span>;<br> }<br> <br> <span class="hljs-comment">//分发事件</span><br> <span class="hljs-keyword">if</span> (!canceled && !intercepted) {<br> }<br> <br> <span class="hljs-comment">//执行事件</span><br> <span class="hljs-comment">/*if成立 当前View处理事件*/</span><br> <span class="hljs-keyword">if</span> (mFirstTouchTarget == <span class="hljs-literal">null</span>) {<br> handled = dispatchTransformedTouchEvent(ev, canceled, <span class="hljs-literal">null</span>,<br> TouchTarget.ALL_POINTER_IDS);<br> }<br> <span class="hljs-comment">/*if不成立 子View处理事件*/</span><br> <span class="hljs-keyword">else</span> {<br> }<br> }<br></code></pre></td></tr></table></figure>]]></content>
<tags>
<tag>android</tag>
</tags>
</entry>
<entry>
<title>android学习记录</title>
<link href="/2022/10/17/android%E5%AD%A6%E4%B9%A0%E8%AE%B0%E5%BD%95/"/>
<url>/2022/10/17/android%E5%AD%A6%E4%B9%A0%E8%AE%B0%E5%BD%95/</url>
<content type="html"><![CDATA[<h1 id="自定义view"><a href="#自定义view" class="headerlink" title="自定义view"></a>自定义view</h1><h2 id="view事件分发"><a href="#view事件分发" class="headerlink" title="view事件分发"></a>view事件分发</h2><p>(学习这一部分之前要先将源码装好,详见《android使用时遇到的问题》)</p><p><a href="https://www.jianshu.com/p/238d1b753e64">一文读懂Android View事件分发机制 - 简书 (jianshu.com)</a></p><blockquote><p><strong>onTouch->onTouchEvent->onClick</strong>优先级</p></blockquote><h1 id="ListView使用"><a href="#ListView使用" class="headerlink" title="ListView使用"></a>ListView使用</h1><h1 id="学习时候遇到可以拓展的知识"><a href="#学习时候遇到可以拓展的知识" class="headerlink" title="学习时候遇到可以拓展的知识"></a>学习时候遇到可以拓展的知识</h1><h2 id="activity与appcompatactivity不同"><a href="#activity与appcompatactivity不同" class="headerlink" title="activity与appcompatactivity不同"></a>activity与appcompatactivity不同</h2><p><a href="https://www.jianshu.com/p/9d590c478828?u_atoken=443e78e6-985e-4ff3-a0ab-5d6df78cc784&u_asession=01zaDP2vuVpsIN27zB21SM-q0XcWTzyhT7W9BWfpv8PMio01-mErr2jSVljyLCFYqMX0KNBwm7Lovlpxjd_P_q4JsKWYrT3W_NKPr8w6oU7K_J_qiM19HovmjqT7E5se6ep0TkEaMSMNP4umocQhrjq2BkFo3NEHBv0PZUm6pbxQU&u_asig=05T7GiKxNhs3y2llzrHSslEslWjdJfF5LIas5XBwu-50uh4zJ8XKuGg6P3QoJXy8gnKqxniFpPWembhZMhtv4ENJnArOcj-bxU-qtykMKRXTgLq7hB3-gndl3Z_TDs8_0CtZWYJSW-2ZX4DpN2sy1c_u0mJxSKZHL51D3MZRTEUi79JS7q8ZD7Xtz2Ly-b0kmuyAKRFSVJkkdwVUnyHAIJzXVLNV8FfCGYpnWZLxil7ouOxmletJH8zWHcZGMz6YzVG3pf5vm7LeeSuJ_913VgsO3h9VXwMyh6PgyDIVSG1W-D9Jtwj9SYNzrpcXR-_rCeT51wE0Icu3q48fpuzWNti9jMEKkg6IIsaGnk_rdGZZ63lD8POipNLssFir9TO61fmWspDxyAEEo4kbsryBKb9Q&u_aref=2PTr3qn35sjirerkpsV9feMj1zs=">Activity、FragmentActivity和AppCompatActivity的区别 - 简书 (jianshu.com)</a></p><h2 id="actionbar与toolbar"><a href="#actionbar与toolbar" class="headerlink" title="actionbar与toolbar"></a>actionbar与toolbar</h2><p><a href="https://www.jianshu.com/p/4df8709a76fa">Android中的工具栏(ActionBar和ToolBar) - 简书 (jianshu.com)</a></p>]]></content>
<tags>
<tag>android</tag>
</tags>
</entry>
<entry>
<title>git的使用</title>
<link href="/2022/10/16/git%E7%9A%84%E4%BD%BF%E7%94%A8/"/>
<url>/2022/10/16/git%E7%9A%84%E4%BD%BF%E7%94%A8/</url>
<content type="html"><![CDATA[<h1 id="基本使用"><a href="#基本使用" class="headerlink" title="基本使用"></a>基本使用</h1><h2 id="推代码"><a href="#推代码" class="headerlink" title="推代码"></a>推代码</h2><p>三件套</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs git">git add .<br>git commit -m "A commit"<br>git push<br></code></pre></td></tr></table></figure><h2 id="拉代码"><a href="#拉代码" class="headerlink" title="拉代码"></a>拉代码</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs git">git pull<br></code></pre></td></tr></table></figure><h2 id="本地分支改名"><a href="#本地分支改名" class="headerlink" title="本地分支改名"></a>本地分支改名</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs git">git branch -m 想要的名字<br></code></pre></td></tr></table></figure><h1 id="本地关联新建仓库"><a href="#本地关联新建仓库" class="headerlink" title="本地关联新建仓库"></a>本地关联新建仓库</h1><p>第一步:(初始化git仓库)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs git">git init<br></code></pre></td></tr></table></figure><p>第二步:(设置远程remote地址)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs git">git remote add origin 地址<br></code></pre></td></tr></table></figure><p>第三步:三件套</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs git">git add .<br>git commit -m "A commit"<br>git push<br></code></pre></td></tr></table></figure><p>第四步:会报提示<br>复制粘贴就可以</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs git">git push --set-upstream origin master<br></code></pre></td></tr></table></figure><h1 id="远程仓库有文件-关联本地仓库"><a href="#远程仓库有文件-关联本地仓库" class="headerlink" title="远程仓库有文件 关联本地仓库"></a>远程仓库有文件 关联本地仓库</h1><blockquote><p>参考文档:<a href="https://blog.csdn.net/sinat_39049092/article/details/113417142">git 本地仓库关联到远程仓库_Mr.Hu.的博客-CSDN博客</a><br>合并时出现的问题:<a href="https://blog.csdn.net/junruitian/article/details/88361895"> refusing to merge unrelated histories的解决方案(本地/远程)综合</a></p></blockquote><p>远程仓库有文件<br>第一步:(初始化git仓库)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs git">git init<br></code></pre></td></tr></table></figure><p>第二步:(设置远程remote地址)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs git">git remote add origin 地址<br></code></pre></td></tr></table></figure><p>第三步:(拉取远程仓库master的文件)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs git">git pull origin master<br></code></pre></td></tr></table></figure><p>第四步:(将本地master设置为远程master分支)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs git">git branch --set-upstream-to=origin/master master<br></code></pre></td></tr></table></figure><p>第五步:(将所有变更提交到本地仓库)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs git">git add .<br></code></pre></td></tr></table></figure><p>第六步:(合并两个独立启动仓库的历史)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs git">git merge --allow-unrelated-histories<br></code></pre></td></tr></table></figure><p> 第七步:(注释)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs git">git commit -m '' <br></code></pre></td></tr></table></figure><h1 id="合并分支"><a href="#合并分支" class="headerlink" title="合并分支"></a>合并分支</h1><p>A和B两个人写一个项目,A现在要合并代码</p><p>A:<br>(A branchA在自己的分支上)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs git">git add .<br>git commit -m "A commit"<br>git push<br></code></pre></td></tr></table></figure><p>(切换到main分支上)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs git">git checkout main<br>git pull<br>git merge A<br></code></pre></td></tr></table></figure><p>这时候可能会有冲突 就是main上面的代码和A的代码有不一样的地方 查看</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs git">git status<br>//或者<br>git diff <br></code></pre></td></tr></table></figure><p>(现在知道了哪里有冲突,可以打开IDE来编辑代码冲突,一般有冲突的地方 打开软件后都会显示)</p><h1 id="不上传特定后缀文件"><a href="#不上传特定后缀文件" class="headerlink" title="不上传特定后缀文件"></a>不上传特定后缀文件</h1><p>编辑<code>.gitignore</code>文件</p><h1 id="删除特定后缀文件名"><a href="#删除特定后缀文件名" class="headerlink" title="删除特定后缀文件名"></a>删除特定后缀文件名</h1><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs git">find . -name "*.后缀" | xargs rm -f<br></code></pre></td></tr></table></figure><h1 id="撤销误删的文件"><a href="#撤销误删的文件" class="headerlink" title="撤销误删的文件"></a>撤销误删的文件</h1><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs git">git reset .<br>git checkout .<br></code></pre></td></tr></table></figure>]]></content>
<tags>
<tag>git</tag>
</tags>
</entry>
<entry>
<title>AndroidStudio遇到的问题‘</title>
<link href="/2022/10/12/AndroidStudio%E4%BD%BF%E7%94%A8/"/>
<url>/2022/10/12/AndroidStudio%E4%BD%BF%E7%94%A8/</url>
<content type="html"><![CDATA[<h1 id="Gradle版本与Gradle插件版本的对应-以及-Gradle插件和AndroidStudio兼容性"><a href="#Gradle版本与Gradle插件版本的对应-以及-Gradle插件和AndroidStudio兼容性" class="headerlink" title="Gradle版本与Gradle插件版本的对应 以及 Gradle插件和AndroidStudio兼容性"></a>Gradle版本与Gradle插件版本的对应 以及 Gradle插件和AndroidStudio兼容性</h1><p>查询相关版本是否兼容:</p><ol><li>Gradle版本与Gradle插件版本的对应</li><li>Gradle插件和AndroidStudio</li></ol><p>设置方法:<br> 进入file -> ProjectStructure 设置插件版本与Gradle</p><p>官网:<br> <a href="https://developer.android.google.cn/studio/releases/gradle-plugin#updating-gradle">Android Gradle 插件版本说明 | Android 开发者 | Android Developers (google.cn)</a><br>直达链接:<br> 版本对应:<a href="https://developer.android.google.cn/studio/releases/gradle-plugin?hl=zh-cn#updating-gradle">https://developer.android.google.cn/studio/releases/gradle-plugin?hl=zh-cn#updating-gradle</a><br> 版本兼容:<a href="https://developer.android.google.cn/studio/releases/gradle-plugin?hl=zh-cn#android_gradle_plugin_and_android_studio_compatibility">https://developer.android.google.cn/studio/releases/gradle-plugin?hl=zh-cn#android_gradle_plugin_and_android_studio_compatibility</a></p><blockquote><p><strong>一次修复经历(自己改报错的流水账,不用看)</strong></p><p>报错: Could not find method android() for arguments [] on project ‘:app’ of type org.gradle.api.Project.</p><figure class="highlight gradle"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><code class="hljs gradle">><span class="hljs-keyword">dependencies</span> {<br> <span class="hljs-keyword">classpath</span> <span class="hljs-string">'com.android.tools.build:gradle:3.3.0'</span><br>>}<br>><span class="hljs-comment">/*失败*/</span><br></code></pre></td></tr></table></figure><figure class="highlight scss"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><code class="hljs scss">>allprojects {<br> repositories {<br> <span class="hljs-built_in">google</span>()<br> <span class="hljs-built_in">jcenter</span>()<br> }<br>>}<br>><span class="hljs-comment">/*失败*/</span><br></code></pre></td></tr></table></figure><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><code class="hljs shell"><span class="hljs-meta prompt_">></span><span class="language-bash">plugins {</span><br> id 'com.android.application' <br><span class="hljs-meta prompt_">></span><span class="language-bash">}</span><br><span class="hljs-meta prompt_">></span><span class="language-bash">加上版本号</span><br><span class="hljs-meta prompt_">></span><span class="language-bash">plugins {</span><br> id 'com.android.application' version'7.2.2'<br><span class="hljs-meta prompt_">></span><span class="language-bash">}</span><br><span class="hljs-meta prompt_">></span><span class="language-bash">/*报错消失 变为新报错*/</span><br></code></pre></td></tr></table></figure><p>报错: Build was configured to prefer settings repositories over project repositories but repository ‘Google’ was added by build file ‘app\build.gradle’</p><p><a href="https://juejin.cn/post/6997396071055900680#heading-15">【Gradle7.0】依赖统一管理的全新方式,了解一下~ - 掘金 (juejin.cn)</a></p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><code class="hljs shell"><span class="hljs-meta prompt_">></span><span class="language-bash">allprojects {</span><br> repositories {<br> google()<br> jcenter()<br> }<br><span class="hljs-meta prompt_">></span><span class="language-bash">}</span><br><span class="hljs-meta prompt_">></span><span class="language-bash">放错位置</span> <br><span class="hljs-meta prompt_">></span><span class="language-bash">不应该在build.gradle中</span><br><span class="hljs-meta prompt_">></span><span class="language-bash">而是在setting.gradle中</span><br><span class="hljs-meta prompt_">></span><span class="language-bash">/*报错更改*/</span><br></code></pre></td></tr></table></figure><p>报错: Could not find method classpath() for arguments [com.android.tools.build:gradle:3.3.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.</p><figure class="highlight gradle"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><code class="hljs gradle">><span class="hljs-keyword">dependencies</span> {<br> <span class="hljs-keyword">classpath</span> <span class="hljs-string">'com.android.tools.build:gradle:3.3.0'</span><br>>}<br>>把之前加上的去了<br></code></pre></td></tr></table></figure><p>报错: This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 2021.2.1 or newer.</p><p><a href="https://developer.android.google.cn/studio/releases/gradle-plugin?hl=zh-cn#android_gradle_plugin_and_android_studio_compatibility">https://developer.android.google.cn/studio/releases/gradle-plugin?hl=zh-cn#android_gradle_plugin_and_android_studio_compatibility</a></p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell"><span class="hljs-meta prompt_">></span><span class="language-bash">AndroidStudio对应不同版本Gradle</span><br></code></pre></td></tr></table></figure><p><strong>成功</strong></p></blockquote><h1 id="源码标红"><a href="#源码标红" class="headerlink" title="源码标红"></a>源码标红</h1><p><a href="https://www.jianshu.com/p/7e46552a7910">AndroidStudio下阅读源码的正确姿势 - 简书 (jianshu.com)</a><br><a href="https://drive.google.com/drive/folders/17oMwQ0xBcSGn159mgbqxcXXEcneUmnph">Android Hidden APIs - Google 云端硬盘</a></p><p>下载对应android.jar后移动到sdk里<br>之后会sync不了 只能当学习用途 </p><h1 id="源码无法跳转"><a href="#源码无法跳转" class="headerlink" title="源码无法跳转"></a>源码无法跳转</h1><p>右上角设置</p><p>加入 <em>Implementing Methods</em></p><h1 id="键盘快捷键"><a href="#键盘快捷键" class="headerlink" title="键盘快捷键"></a>键盘快捷键</h1><p><a href="https://developer.android.google.cn/studio/intro/keyboard-shortcuts?hl=zh-cn">键盘快捷键 | Android 开发者 | Android Developers (google.cn)</a></p><table><thead><tr><th align="center">说明</th><th align="center">Windows/Linux</th><th align="center">Mac</th></tr></thead><tbody><tr><td align="center">搜索全部内容(包括代码和菜单)</td><td align="center">按两次 Shift</td><td align="center">按两次 Shift</td></tr><tr><td align="center">在当前类里搜索</td><td align="center">Ctrl+F12</td><td align="center">Command+F12</td></tr></tbody></table><h1 id="导入appcompat-v7标红"><a href="#导入appcompat-v7标红" class="headerlink" title="导入appcompat-v7标红"></a>导入appcompat-v7标红</h1><p>提示</p><blockquote><p>Version 28 (intended for Android Pie and below) is the last version of the legacy support library, so we recommend that you migrate to AndroidX libraries when using Android Q and moving forward. The IDE can help with this: Refactor > Migrate to AndroidX…</p></blockquote><p>原因:<br>sdk版本大于等于29时,AS要求使用AndroidX包</p><p>修改:</p><ol><li>仍然使用support包<ol><li>切换<code>project视图</code>打开<code>app:build.gradle</code></li><li>修改<code>compileSdk</code>和<code>targetSdk</code>为28或以下</li><li>删除<code>dependencies</code>中所有 <code>AndroidX</code>相关的依赖</li></ol></li><li></li></ol><h1 id="The-specified-Gradle-installation-directory"><a href="#The-specified-Gradle-installation-directory" class="headerlink" title="The specified Gradle installation directory"></a>The specified Gradle installation directory</h1><p>打开老项目 build失败</p><p>解决:</p><p>打开顶部菜单:File -> Setting -> Build,Execution,Deployment -> BuildTools -> Gradle<br>找到Gradle projects 下面的Gradle -> Use Gradle from -> 下来选择修改为:’gradle-wrapper.properties’ file </p>]]></content>
</entry>
<entry>
<title>搭建博客时遇到的问题</title>
<link href="/2022/10/09/%E6%90%AD%E5%BB%BA%E5%8D%9A%E5%AE%A2/"/>
<url>/2022/10/09/%E6%90%AD%E5%BB%BA%E5%8D%9A%E5%AE%A2/</url>
<content type="html"><![CDATA[<h1 id="搭建博客时遇到的问题"><a href="#搭建博客时遇到的问题" class="headerlink" title="搭建博客时遇到的问题"></a>搭建博客时遇到的问题</h1><h1 id="连接git失效"><a href="#连接git失效" class="headerlink" title="连接git失效"></a>连接git失效</h1><h2 id="ssh失效"><a href="#ssh失效" class="headerlink" title="ssh失效"></a>ssh失效</h2><figure class="highlight gauss"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><code class="hljs gauss"><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@</span><br><span class="hljs-comment">@</span> WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! <span class="hljs-comment">@</span><br><span class="hljs-comment">@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><span class="hljs-comment">@@</span><br>IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!<br>Someone could be eavesdropping on you right <span class="hljs-built_in">now</span> (man-in-the-middle attack)!<br>It is also possible that a host <span class="hljs-built_in">key</span> has just been changed.<br>The fingerprint <span class="hljs-keyword">for</span> the RSA key sent by the remote host is<br>SHA256:rEmlJenVMSL5GVemSY0Gk8WGw6B4ege4J85M+vup8R0.<br>Please contact your system administrator.<br>Add correct host key in /c/Users/Lenovo/.ssh/known_hosts to get rid of this message.<br>Offending ECDSA key in /c/Users/Lenovo/.ssh/known_hosts:3<br>Host key <span class="hljs-keyword">for</span> github.com has changed and you have requested strict checking.<br>Host key verification failed.<br>fatal: Could not read from remote repository.<br></code></pre></td></tr></table></figure><p><strong>解决:</strong><br>浏览器搜索 重新配置SSH</p><h2 id="Permission-denied-please-try-again"><a href="#Permission-denied-please-try-again" class="headerlink" title="Permission denied, please try again"></a>Permission denied, please try again</h2><p>防火墙拒绝s’sh</p><p><strong>解决:</strong><br><a href="https://blog.csdn.net/yuzhiqiang_1993/article/details/127032178">github 配置了公钥依旧提示[email protected]‘s password: Permission denied, please try again. 的解决办法_XeonYu的博客-CSDN博客</a></p><h1 id="编辑博客"><a href="#编辑博客" class="headerlink" title="编辑博客"></a>编辑博客</h1><h2 id="Cannot-GET-x2F"><a href="#Cannot-GET-x2F" class="headerlink" title="Cannot GET/"></a>Cannot GET/</h2><p><strong>解决:</strong><br>post文件夹中至少有一篇文章</p><h2 id="YAML语法"><a href="#YAML语法" class="headerlink" title="YAML语法"></a>YAML语法</h2><p>冒号后跟上一个空格</p><h2 id="hexo-d-部署成功但没有效果"><a href="#hexo-d-部署成功但没有效果" class="headerlink" title="hexo d 部署成功但没有效果"></a>hexo d 部署成功但没有效果</h2><p><strong>解决:</strong></p><figure class="highlight ebnf"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs ebnf"><span class="hljs-attribute">hexo clean</span><br><span class="hljs-attribute">hexo d</span><br></code></pre></td></tr></table></figure>]]></content>
<tags>
<tag>blog</tag>
</tags>
</entry>
<entry>
<title>test</title>
<link href="/2022/10/09/test/"/>
<url>/2022/10/09/test/</url>
<content type="html"><![CDATA[<img src="/2022/10/09/test/sakura.png" class="">]]></content>
</entry>
</search>