前面遇到的很多編譯問題沒有保存,從現在開始,遇到的問題將在這裏記錄。
1、Error:Could not find org.jetbrains.trove4j:trove4j:20160824
這個處理方法是把 jcenter() 放在了最上面,然後解決了。
buildscript {
repositories {
jcenter()
google()
}
如果你沒有解決,可以嘗試放下面的代碼替換jcenter(),應該可以解決,兩種方法都試過。
buildscript {
repositories {
mavenCentral()
google()
// jcenter()
maven{ url'http://maven.aliyun.com/nexus/content/groups/public/' }
maven{ url'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
}
}
2、ParseError at [row,col]:[13,9] Message: expected start or end tag
這個問題緊接着上面的問題,我在activity中添加了<action android:name="android.intent.action.VIEW" />,然後通過,沒有問題。
<activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
出現:Annotation processors must be explicitly declared nowdefaultConfig {
...
javaCompileOptions {
// 顯式聲明支持註解
annotationProcessorOptions {
includeCompileClasspath true
}
}
}