Compilation failed; see the compiler error output for details.
使用 gradlew compileDebugSources 查看錯誤
1.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.Open File
錯誤原因:引用項目的路徑中包含中文难捌,把項目路徑換成英文就沒有這個問題了根吁。
解決方法:重新新建一個項目合蔽,項目的路徑為英文。2:把現(xiàn)有的項目的路徑修改為不包含英文的沃斤。
解決思路見:http://stackoverflow.com/questions/32171968/your-project-path-contains-non-ascii-characters-android-studio
翻譯這個答案:I have the same problem.then I create a new project and the path only use English alphabet,the problem is resolved.
2.eclipse運行Android程序時出現(xiàn):com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version
解決辦法:找到Windows-->Preferences-->Java-->Compiler衡瓶,修改jdk為1.7