1. 程式人生 > >Android出現:Your project path contains non-ASCII characters報錯、Could not find com.android.support.報錯

Android出現:Your project path contains non-ASCII characters報錯、Could not find com.android.support.報錯

        安卓在匯入或者建立專案時,專案名字是不可以含有中文的,只要有中文就會報錯,下面是本人在匯入android專案時由於忘記這個常識而犯的錯誤,還有就是另一個錯誤新增依賴時程式報的錯誤,現在利用網上的大牛們的部落格整合起來寫了這個部落格,用來以後提醒自己:

第一個錯誤(專案名字含有中文):

報錯內容:Error:(1, 0) Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by using the command line flag -Dcom.android.build.gradle.overridePathCheck=true, or adding the line ‘com.android.build.gradle.overridePathCheck=true’ to gradle.properties file in the project directory. ---------------------  作者:lovejjfg  來源:CSDN  原文:https://blog.csdn.net/lovejjfg/article/details/50574140?utm_source=copy  版權宣告:本文為博主原創文章,轉載請附上博文連結!

第二錯誤:依賴ConstraintLayout報錯:Could not find com.android.support.constraint:constraint-layout:1.0.0報錯

報錯內容:Error:(27, 13) Failed to resolve: com.android.support.constraint:constraint-layout:1.0.0 <a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:D:/androidproject/BXG02/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>