開發工具總結(2)之全面總結Android Studio2.X的填坑指南

前言:好多 Android 開發者都在說Android Studio太坑了,老是出錯,導致開發進度變慢,出錯了又不知道怎么辦,網上去查各種解決方案五花八門,有些可以解決問題,有些就是轉來轉去的寫的很粗糙,讓人看了云里霧里。我就很不爽這種做法,要么就不寫,要寫就寫出讓人一目了然的東西,所以在這里我就詳細了總結了一下Android Studio2.X的那些坑。

【tips】如果這里沒有你遇到的難題,歡迎留言提出來,我能解決的就一定幫你搞定。

下一篇講解Android Studio3.0填坑指南


本文同步在github發布,有興趣的可以去看看。https://github.com/AweiLoveAndroid/The-pit-of-the-Android-Studio

這篇博客大體上分為以下幾個方面的內容:

1)關于sdk  點擊此處鏈接: 12)關于jdk  點擊此處鏈接: 7、8、26、27、283)關于加速器(Intel HAXM)和啟動問題   點擊此處鏈接: 2、 3、 4、 5、 294)關于gradle  點擊此處鏈接:9、 15、 19、 23、255)關于混淆打包編譯  點擊此處鏈接:10、 226)關于依賴庫和插件  點擊此處鏈接:6、 11、 12、 13、 187)關于配置和源碼關聯  點擊此處鏈接:14、 16、 20、 21、 248)關于模擬器  點擊此處鏈接:17

1. Android Studio第一次啟動時出現 unable to access android sdk add-on list

出現原因:電腦沒有sdk,studio也沒有自帶sdk;

解決辦法:在安裝studio的目錄下找到bin\idea.properties,打開這個文件,在末尾加上一行disable.android.first.run=true就行了,如果打不開這個文件就用editplus或者sublime text打開

2. 在安裝了新的 Android Studio 之后,AVD 新建并啟動模擬器的時候報以下錯誤:

emulator:ERROR:x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX kernel module is not installed!

出現原因:原來新的 Android SDK 在運行虛擬機的時候,需要安裝 Intel HAXM:一個硬件加速器,為的是在x86平臺上加快安卓虛擬機的運行。

解決方法:
(1) 在安裝之前首先到 SDK 的安裝目錄下打開SDK Manager:找到 Inter....(中間的很多單詞就不寫了,重點看到 Inter 和 HAXM 就可以了點擊下載) HAXM 點擊install
(2) 然后進入到你SDK的目錄下,再進入extras —> intel —> Hardware_Accelerated_Execution_Manager,可以看到HAXM的安裝文件:interhaxm-android.exe
(3) 但是在安裝之前還有一個步驟,就是重啟計算機,進入開機界面前按F2進入到計算機的BIOS下,切換到 Configuration 找到下面的 Intel Virtual Technology。設置為Enable狀態(即允許虛擬機技術),然后再雙擊interhaxm-android.exe安裝,一直next就可以了

3. Intel 加速器 HAXM ,安裝過程中可以會出現如下錯誤:

"Failed to configure driver: unknown error. Failed to open driver"

有以下幾個步驟可以解決該問題:
(1) 下載haxm_extra_workaround.zip 附件
(2) 解壓后提取hax_extract.cmd 文件到 HAXM 的解壓文件路徑中
(3) hax_extract.cmd 右鍵用管理員權限運行。
執行以上步驟后,基本可以解決以上提示的安裝異常問題。

4. 因為電腦卡死,結束了qemu-system-i386.exe這個倒霉的進程,導致我開啟模擬器的時候一直提示我沒有安裝Intel HAXM,只好再安裝一遍,然后出現了以下問題:

This computer meets the requirements for HAXM,but IntelVirtualization Technology(VT-x) is not turned on.
HAXM can be installed,but will not work until VT-x is enabled.
Please refer to the Inter HAXM documentation for more infomation.

解決辦法:

如果在安裝過程中出現Intel virtualization technology (vt,vt-x) is not enabled的錯誤,需要進
入的電腦的BIOS中修改,重啟電腦,進入BIOS頁面(一般在開機時按Del或F2,根據電腦不同,進入方式不
同),找到Advanced Mode –> Advanced –> CPU Configuration –> Intel Virtual Technology設置為
Enabled(表示開啟虛擬化)就可以了。重啟Android studio就可以了。

5. 關于intelhaxm-android.exe安裝的坑:不管是雙擊還是右鍵以管理員身份運行都沒用,怎么解決?

解決辦法:

在SDK\extras\intel\Hardware_Accelerated_Execution_Manager中
找到intelhaxm-android.exe,右鍵解壓,雙擊setup.exe安裝就好了

6. Failed to resolve: junit:junit:4.12

出現原因:項目中引用了junit庫中的代碼,但是卻沒有相關的junit的依賴庫

解決辦法:添加相關的依賴庫引用,在項目的Module的build.gradle中添加如下代碼就OK了

repositories {maven { url 'http://repo1.maven.org/maven2' }}

7. 只要是API24以上的Android Studio,如果JDK低于1.8都會出現這個問題,比如我列舉兩個:

(1)Error:Execution failed for task':app:compileOrangeDevDebugJavaWithJavac'.compileSdkVersion 'android-24' requires JDK 1.8 or later to compile.

(2)Android N requires the IDE to be running with Java 1.8 or later

解決辦法:把1.8以前的jdk都卸載掉,然后把環境變量配置成1.8的,就可以了.

8. Error:(1, 1) A problem occurred evaluating project ':app'.com/android/jack/api/ConfigNotSupportedException :Unsupported major.minor version 52.0

解決辦法:

(1)把1.8以前的jdk都卸載掉,使用1.8版本的jdk
(2)File - Project Structure - SDK Location - JDK location,這里面有個選項,可以選擇"use embedded JDK(recommended)",使用AS內置的JDK。(不推薦這樣做)

9. Unknown host 'downloads.gradle.org' 這個問題的解決:

使用android studio的gradle新建項目時候出現:
Error:Unknown host 'downloads.gradle.org'.Enable Gradle 'offline mode' and sync project.
Learn about configuring HTTP proxies in Gradle
或者出現 Error:No cached version listing for com.android.tools.build:gradle:0.12.+ av

解決方法如下:

不是第一次的話以后就可以點這里的clean了。

或者更直接點,打開cmd,找到你的項目根目錄,輸入gradle clean(前提是下載gradle,并且設置環境變量)

如果還是下載不了的話,請看下文介紹:

具體的android studio 配置
安裝步驟:
1.先下載as,下載地址:https://developer.android.google.cn/studio/index.html 下載完直接安裝,安裝完打開它,然后會出現下載gradle-XXX-bin.zip,根據Android Studio版本下載對應的Gradle版本,下載這個一般都會卡死,不過不要緊,把as關掉。
2.下載gradle-XXX-bin.zip,下載地址:http://services.gradle.org/distributions/,下載完之后,找到目錄: C:\Users\用戶名.gradle\wrapper\dists\gradle-XXX-bin\vruqmccc8532n7gr46qavsii8\ 把下載的gradle-XXX-bin.zip放到該目錄下,并且把gradle-XXX-bin.zip解壓到該目錄(解壓得到的文件為gradle-XXX)。
3.最關鍵的來了,把該目錄下的gradle-XXX-bin.zip.part文件刪除,然后復制gradle-XXX-bin.zip.lck,把它改為gradle-XXX-bin.zip
4.到此你就可以運行Android Studio開發了。

另附: Android Studio和gradle版本對照圖請參考我的github Android Studio版本、Gradle版本、Build Tools版本三者之間對照詳細解答

10. 關于混淆出現的問題:

(詳細請看 http://www.open-open.com/lib/view/open1490252413493.html)

問題一:出現 Unknown verification type [95] in stack map frame 錯誤
Error:Execution failed for task
‘:app:transformClassesWithMultidexlistForNiannianDebug’.Java .io.IOException:
Can’t read [
E:SVNbroondontrunkcodebroodon_androidappbuildintermediatestransformsjarMergingnianniandebugjars11fcombined.jar]
(Can’t process class [com/tencent/wxop/stat/al.class] (Unknown verification type [95] in stack map frame))

原因分析:引用的第三方庫已經混淆過,再在本地進行編譯混淆的時候就會報出這個錯誤。

解決辦法: 則修改混淆器,重新進行編譯,將新的混淆器覆蓋原來的混淆器,則可以解決。

問題二:
Error:Execution failed for task ‘:app:transformClassesWithMultidexlistForNiannianDebug’.
proguard.KeepClassSpecification.(ZZZZZZLproguard/ClassSpecification;)V

原因分析:升級 Android studio 以后,使用的混淆器版本不一致

解決辦法: 根據 Android studio版本選擇與之對應的混淆器版本

11. 這是什么原因?是因為65535問題?還是因為v7包重復了? 【待解決。。。】

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

com.android.build.api.transform.TransformException: java.lang.RuntimeException:
java.lang.RuntimeException: com.android.ide.common.process.ProcessException:java.util.concurrent.ExecutionException:
com.android.ide.common.process.ProcessException: Return code 1 for dex process

12. non-zero exit value 1; 和 non-zero exit value 2; 和 non-zero exit value 3 問題的解決:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'
com.Android.build.api.transform.TransformException: 
com.android.ide.common.process.ProcessException: 
org.gradle.process.internal.ExecException:Process 'command 'F:\Program Files (x86)\Java\jdk1.8.0_31\bin\java.exe'' finished with non-zero exit value 1

問題一: non-zero exit value 1原因分析:

原因分析:這個是因為依賴包重復了 (像v4和nineoldandroids),app中實現了對easeUI的依賴,但是app和easeUI都添加了對v4這個包的依賴。

解決辦法:把v4包注釋修改之后,clean,rebuild一下,OK

問題二: non-zero exit value 2

解決辦法:這個錯誤在app的build.gradle里面添加下面這句就好了。android {defaultConfig {...multiDexEnabled true}}

問題三: non-zero exit value 3

解決辦法:這個錯誤就在app的bulid.gradle里面加上這句,再rebuild ,之后再運行就行了。4g可以看電腦配置修改(2g,3g,6g,8g)。dexOptions {javaMaxHeapSize "4g"}

13. 打開Android Studio報錯

Plugin Error: required plugin “Android Support” is disabled

更詳細的錯誤信息如下:
Problems found loading plugins:
Plugin "Google Analytics Uploader" was not loaded: required plugin "Android Support" is disabled.
Plugin "SDK Updater" was not loaded: required plugin "Android Support" is disabled.
Plugin "Android NDK Support" was not loaded: required plugin "Android Support" is disabled.
Plugin "Google App Indexing" was not loaded: required plugin "Android Support" is disabled.
Plugin "Google Cloud Tools For Android Studio" was not loaded: required plugin "Android Support" is disabled.
Plugin "Google Cloud Testing" was not loaded: required plugin "Android Support" is disabled.
Plugin "Google Services" was not loaded: required plugin "Android Support" is disabled.

解決辦法:

  打開File-Settings-Plugins,把報紅色的插件全部取消勾選,在把Android Support勾選,然后Apply-Save,重啟下studio 就可以了。

14. 自定義android studio的配置文件目錄后,無法正常安裝和卸載插件(貌似2.0版本之后的插件安裝卸載就有問題了)是何原因?詳情看知乎 https://www.zhihu.com/question/38604486

解決方法:

方法(1):將idea.system.path/plugins下的文件移動到{idea.config.path}/plugins下(如果是壓縮包,則需要先解壓)。 然后重啟一下AS就可以了。刪除也是,貌似也得手動去文件夾下刪除)方法(2):修改AS安裝目錄下的idea.properties文件:idea.config.path=D:/.AndroidStudio2.0/config idea.system.path=D:/.AndroidStudio2.0/system idea.plugins.path=${idea.system.path}/plugins

15. 導入android studio項目,出現的問題:

Error:Failed to open zip file.
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
Re-download dependencies and sync project (requires network)

Android遇到的問題15對應的圖片1.png

這個錯誤提示意思是:Gradle's dependency cache may be corrupt:(Gradle的依賴緩存可能是損壞的。)

  • 原因分析:我們要導入別人寫好的工程時,一般不需要更改什么,as智能判斷會提示我們是否需要對build gradle setting之類的文件進行修改。針對gradle個版本工具來說,如果不選擇更新直接原來的Gradle Version中的Gradle工具,再加上.gradle庫中沒用該版本時,as會創建這樣的庫,有時候這樣的庫會下載不完整,導致上面的問題。

  • 解決辦法:

      1.下載 gradle
    

    下載地址很簡單,以 下載gradle-3.5-all.zip為例子。不要去網上找這樣那樣的網站下載gradle工具了。瀏覽器輸入以下鏈接快速下載:
    services.gradle.org/distributions/gradle-3.5-all.zip

      2.復制替換
    

    下載完成后替換 C:\Users\Administrator.gradle\wrapper\dists\gradle-3.3-all
    exhrs6ca08n232b14ue48lbye中對應的gradle-3.5-all.zip文件。
    正確解壓后的的文件如下圖所示:

Android遇到的問題15對應的圖片2.png
    3.重新打開項目,對工程中做一些配置如下,重新編譯一下,就沒問題了:
Android遇到的問題15對應的圖片3.png

16. Android studio 源碼無法關聯,提示Souces for android api 25 platform not found:

解決方法:

1)找到jdk.table.xml這個文件jdk.table.xml文件路徑:(以win7為例,Administrator是電腦的用戶名,我當前開發工具版本號是Android Studio2.3)
C:\Users\Administrator\.AndroidStudio2.3\config\options\jdk.table.xml2)在<sourcePath>節點下添加這一句<root type="simple" url="file://E:/android/sdk/sources/android-25" />修改后的部分配置文件如下:注意紅色方框部分,找到對應的編譯版本,再添加對應的源碼位置

17. com.android.ddmlib.SyncException: No space left on device

解決方法:

把模擬器里沒用的應用或者demo卸載卸載。如果還不行,就重啟或者重新創建一個模擬器

18. app:transformClassesWithJarMergingForDebug

原因:重復依賴導致的.

解決辦法:

找到報錯的那個提示,看上面報錯的是哪個類,雙擊shift搜索一下,看這個報錯的類在哪個依賴庫里面用到了。
在AS中,選擇以project顯示項目,找到最下面的External Libraries,然后繼續找,找到相對應的類庫。
點開之后發現了一個pom.xml,這里面就是關于這個jar的一些配置文件,往下找,發現了一個依賴庫的引用,
復制里面groupId,到你的app的build.gradle里,找到那個依賴,添加{exclude group: 'XXX'} XXX換成剛才復制的groupId,這樣就
把這個groudId的引用去除掉。

19. processdebugresources

原因:build.gradle的兼容包和compileSdkVersion配置不對引起的

解決辦法:讓兼容包和compileSdkVersion匹配就OK了。關于這個版本匹配,請查看上面的第9點那張表格。

20. Android Studio配置androidannotations出現 Error:Execution failed for task ':app:compileDebugJavaWithJavac'

原因: androidannotations配置環境對SDKtools, Build Tools, Platform Tools 以及 SDK Platform有要求,不匹配的話就會報錯

解決辦法:打開SDK Manager,更新SDKtools, Build Tools, Platform Tools 以及 SDK Platform到最新版本

21. Error:com.android.builder.internal.aapt.AaptException: Failed to crunch

原因: 項目路徑太長,導致有的資源文件整個路徑長度超過了240個字符。這是Android Studio的一個坑。

解決辦法:

(1)重命名項目名,重新運行一下。
(2)如果以上方法不行,就縮短路徑深度,減少路徑層級,每一級路徑名字盡可能的縮短。

22. Android Studio編輯時發生的錯誤

Error:warning: Ignoring InnerClasses attribute for an anonymous inner class

原因:有3種情況可以導致這種錯誤發生:

  • (1)導了重復jar包,或者導入了不同版本的同名jar包。

  • (2)AndroidStudio打簽名包時android.keystore 的密碼輸入錯了

  • (3)有可能是Dex的方法數超過上限導致的。

解決辦法:

  • (1)把重復的jar包刪除掉,Rebuild Project,就OK了,如果,還有其他問題,那證明你的app下的build.gradle依賴配置就有問題。

  • (2)重新打包一個正式包,重新輸入簽名賬號密碼。

  • (3)在項目的build.gradle文件中添加multiDexEnabled true 搞定。

示例:

之前是在win7電腦的工程運行在mac電腦,打開就出了這樣的錯誤。解決這個問題的方式,給大家分析一下:

1.第一考慮是不是可以直接忽略第三方的屬性的錯誤警告.找到項目下對應的proguard-rules.pro文件,在proguard-rules.pro文件中添加如下代碼-keepattributes EnclosingMethod2.查看第三方jar有沒有重復利用的,發現并沒有。繼續下一步。3.看看是不是Dex越界引起的問題。在項目的build.gradle文件中添加以下代碼:multiDexEnabled true

重新編譯之后,項目成功移植了。

23. Android Studio版本更新后Gradle版本不匹配問題

Error:(1, 0) The android gradle plugin version 2.3.0-beta1 is too old, please update to the latest version.
To override this check from the command line please set the ANDROID_DAILY_OVERRIDE environment variable to "xxxxxxx"

問題截圖如下:

解決辦法:升級Gradle到合適版本,具體操作如下:

【特別說明】Android Studio版本和gradle版本是相匹配的,不是隨意匹配的,版本不匹配就會出錯。具體的Android Studio和gradle版本對照請看 Android Studio和gradle版本對照

  • (1)訪問 Gradle官網下載地址 來下載與之匹配的Gradle版本或者最新的Gradle工具包;

  • (2)解壓到Android Studio的gradle目錄下;

  • (3)File->Setting->Build,Exection,Deployment->Gradle->Use local gradle distribution,修改Gradle home為AS安裝
    目錄下最新的gradle版本;

  • (4)修改對應Project的build.gradle中的com.android.tools.build:gradle:版本號為提示版本(如修改classpath 'com.android.tools.build:gradle:2.3.0-beta1'為classpath 'com.android.tools.build:gradle:2.3.0-beta3');

  • (5)修改gradle-wrapper.properties中distributionUrl上的版本號與當前Gradle版本號一致(如修改distributionUrl=https\://services.gradle.org/distributions/gradle-3.2-all.zipdistributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip)

  • (6)重新同步。

圖解如下所示:


Android遇到的問題23解決辦法.png

24.AppConfig.java文件中文亂碼,log也亂碼問題的解決。

文件亂碼

解決辦法:找到對應的module或者lib,打開里面的build.gradle,輸入以下代碼:

新版gradle用這個:
tasks.withType(JavaCompile) {options.encoding = "UTF-8"
}
舊版gradle用這個:
tasks.withType(JavaCompile) {options.encoding = "UTF-8"
}

【另外】:上述方法如果不管用,試著點擊Android studio右下角的文件編碼按鈕,圖中紅色區域,然后選擇UTF-8改選為GBK。

切換編譯語言格式

此時會彈出窗口提示是否重載文件,選擇“Reload”,基本也可以搞定。

如果設置之后還是不行,建議clean一下,重啟一下Android Studio。


25. failed to complete gradle execution問題

使用Android Studio創建新項目后,一直出現 “Failed to complete Gradle execution. Cause: A fatal exception has occurred. Program will exit”這個問題。

failed to complete gradle execution問題

解決方法有2個(2種方式實質上還是一樣的)

  • 方法1:打開工程的gradle.properties文件,添加如下配置項,這個問題應該就不會出現了。

      org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=512m
    

如下圖所示:

  • 方法2:在Android Studio中,選擇File -> Settings -> Compiler -> 在VM options選項中填寫:

      -Xmx512m -XX:MaxPermSize=512m
    

如下圖所示:

26. 控制臺亂碼的解決方式:

舊版本的gradle

tasks.withType(Compile) {options.encoding = "UTF-8"
}

新版本的gradle

tasks.withType(JavaCompile) {options.encoding = "UTF-8"
}

27. AS 2.X如何支持java8?

AS 2.X最高是支持java7的環境,要想支持java8,可以做以下設置:

如果是安卓的module,可以做以下配置:

android {compileSdkVersion 25buildToolsVersion "25.0.3"defaultConfig {applicationId "com.lzw.java8demo"minSdkVersion 25targetSdkVersion 25versionCode 1versionName "1.0"testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"// 這個別忘記加上去jackOptions {enabled true}}buildTypes {release {minifyEnabled falseproguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'}}// 指定java8編譯compileOptions {sourceCompatibility JavaVersion.VERSION_1_8targetCompatibility JavaVersion.VERSION_1_8}}

如果是創建的java的module,在gradle最后加上以下配置:

 sourceCompatibility = "1.8"targetCompatibility = "1.8"

28. Error:Execution failed for task':apptransformClassesWithDesugarForDebug'

我看報錯那里說的是注解報的錯,我懷疑是jdk不一致導致的。我是打開IDE報的錯,我把as的配置導入到了IDE,打開項目就報錯了,as用的是jdk1.8,不知道這個IDE是不是要用jdk1.7?
目前還沒找到原因。。

29.AS打開速度慢如何解決?

在Android Studio的bin目錄里,打開idea.prooperties文件,添加

disable.android.first.run=true 

這里沒提到的可以參考: https://my.oschina.net/Jieth/blog/489014,以后會逐漸補充進去。


最后,推薦一本書給大家看看,希望對大家有幫助。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/391720.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/391720.shtml
英文地址,請注明出處:http://en.pswp.cn/news/391720.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

無聊的一天_一人互聯網公司背后的無聊技術

無聊的一天Listen Notes is a podcast search engine and database. The technology behind Listen Notes is actually very very boring. No AI, no deep learning, no blockchain. “Any man who must say I am using AI is not using True AI” :)Listen Notes是一個播客搜索…

如何在Pandas中使用Excel文件

From what I have seen so far, CSV seems to be the most popular format to store data among data scientists. And that’s understandable, it gets the job done and it’s a quite simple format; in Python, even without any library, one can build a simple CSV par…

Js實現div隨鼠標移動的方法

HTML: <div id"odiv" style" COLOR: #666; padding: 2px 8px; FONT-SIZE: 12px; MARGIN-RIGHT: 5px; position: absolute; background: #fff; display: block; border: 1px solid #666; top: 50px; left: 10px;"> Move_Me</div>第一種&…

leetcode 867. 轉置矩陣

給你一個二維整數數組 matrix&#xff0c; 返回 matrix 的 轉置矩陣 。 矩陣的 轉置 是指將矩陣的主對角線翻轉&#xff0c;交換矩陣的行索引與列索引。 示例 1&#xff1a; 輸入&#xff1a;matrix [[1,2,3],[4,5,6],[7,8,9]] 輸出&#xff1a;[[1,4,7],[2,5,8],[3,6,9]] …

數據特征分析-對比分析

對比分析是對兩個互相聯系的指標進行比較。 絕對數比較(相減)&#xff1a;指標在量級上不能差別過大&#xff0c;常用折線圖、柱狀圖 相對數比較(相除)&#xff1a;結構分析、比例分析、空間比較分析、動態對比分析 df pd.DataFrame(np.random.rand(30,2)*1000,columns[A_sale…

Linux基線合規檢查中各文件的作用及配置腳本

1./etc/motd 操作&#xff1a;echo " Authorized users only. All activity may be monitored and reported " > /etc/motd 效果&#xff1a;telnet和ssh登錄后的輸出信息 2. /etc/issue和/etc/issue.net 操作&#xff1a;echo " Authorized users only. All…

tableau使用_使用Tableau升級Kaplan-Meier曲線

tableau使用In a previous article, I showed how we can create the Kaplan-Meier curves using Python. As much as I love Python and writing code, there might be some alternative approaches with their unique set of benefits. Enter Tableau!在上一篇文章中 &#x…

踩坑 net core

webclient 可以替換為 HttpClient 下載獲取url的內容&#xff1a; 證書&#xff1a; https://stackoverflow.com/questions/40014047/add-client-certificate-to-net-core-httpclient 轉載于:https://www.cnblogs.com/zxs-onestar/p/7340386.html

我從參加#PerfMatters會議中學到的東西

by Stacey Tay通過史黛西泰 我從參加#PerfMatters會議中學到的東西 (What I learned from attending the #PerfMatters conference) 從前端的網絡運行情況發布會上的注意事項 (Notes from a front-end web performance conference) This week I had the privilege of attendin…

修改innodb_flush_log_at_trx_commit參數提升insert性能

最近&#xff0c;在一個系統的慢查詢日志里發現有個insert操作很慢&#xff0c;達到秒級&#xff0c;并且是比較簡單的SQL語句&#xff0c;把語句拿出來到mysql中直接執行&#xff0c;速度卻很快。 這種問題一般不是SQL語句本身的問題&#xff0c;而是在具體的應用環境中&#…

leetcode 1178. 猜字謎(位運算)

外國友人仿照中國字謎設計了一個英文版猜字謎小游戲&#xff0c;請你來猜猜看吧。 字謎的迷面 puzzle 按字符串形式給出&#xff0c;如果一個單詞 word 符合下面兩個條件&#xff0c;那么它就可以算作謎底&#xff1a; 單詞 word 中包含謎面 puzzle 的第一個字母。 單詞 word…

Nexus3.x.x上傳第三方jar

exus3.x.x上傳第三方jar&#xff1a; 1. create repository 選擇maven2(hosted)&#xff0c;說明&#xff1a; proxy&#xff1a;即你可以設置代理&#xff0c;設置了代理之后&#xff0c;在你的nexus中找不到的依賴就會去配置的代理的地址中找hosted&#xff1a;你可以上傳你自…

責備的近義詞_考試結果危機:我們應該責備算法嗎?

責備的近義詞I’ve been considering writing on the topic of algorithms for a little while, but with the Exam Results Fiasco dominating the headline news in the UK during the past week, I felt that now is the time to look more closely into the subject.我一直…

電腦如何設置終端設置代理_如何設置一個嚴肅的Kubernetes終端

電腦如何設置終端設置代理by Chris Cooney克里斯庫尼(Chris Cooney) 如何設置一個嚴肅的Kubernetes終端 (How to set up a serious Kubernetes terminal) 所有k8s書呆子需要的CLI工具 (All the CLI tools a growing k8s nerd needs) Kubernetes comes pre-packaged with an ou…

spring cloud(二)

1. Feign應用 Feign的作用&#xff1b;使用Feign實現consumer-demo代碼中調用服務 導入啟動器依賴&#xff1b;開啟Feign功能&#xff1b;編寫Feign客戶端&#xff1b;編寫一個處理器ConsumerFeignController&#xff0c;注入Feign客戶端并使用&#xff1b;測試 <dependen…

c/c++編譯器的安裝

MinGW(Minimalist GNU For Windows)是個精簡的Windows平臺C/C、ADA及Fortran編譯器&#xff0c;相比Cygwin而言&#xff0c;體積要小很多&#xff0c;使用較為方便。 MinGW最大的特點就是編譯出來的可執行文件能夠獨立在Windows上運行。 MinGW的組成&#xff1a; 編譯器(支持C、…

滲透工具

滲透工具 https://blog.csdn.net/Fly_hps/article/details/89306104 查詢工具 https://blog.csdn.net/Fly_hps/article/details/89070552 轉載于:https://www.cnblogs.com/liuYGoo/p/11347693.html

numpy 線性代數_數據科學家的線性代數—用NumPy解釋

numpy 線性代數Machine learning and deep learning models are data-hungry. The performance of them is highly dependent on the amount of data. Thus, we tend to collect as much data as possible in order to build a robust and accurate model. Data is collected i…

spring 注解方式配置Bean

概要&#xff1a; 再classpath中掃描組件 組件掃描&#xff08;component scanning&#xff09;&#xff1a;Spring可以從classpath下自己主動掃描。偵測和實例化具有特定注解的組件特定組件包含&#xff1a; Component&#xff1a;基本注解。標示了一個受Spring管理的組件&…

主成分分析 獨立成分分析_主成分分析概述

主成分分析 獨立成分分析by Moshe Binieli由Moshe Binieli 主成分分析概述 (An overview of Principal Component Analysis) This article will explain you what Principal Component Analysis (PCA) is, why we need it and how we use it. I will try to make it as simple…