從廠商那邊拿到一個序列槽調試的Demo代碼,用Android Studio打開,build報錯:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'base-extension'. One of '{codename, tag}' is expected.
網上查了好久,終于找到一個可行的方法:
打開一個其他不報錯的項目, File > Project Structure > Project中,檢查:
Android Gradle Plugin Verion和Gradle Version,
然後在報錯的項目中将這兩項更新成相同的版本:
重新build,問題解決。
參考:Invalid content was found starting with element 'base-extension' · Issue #136 · googlesamples/android-testdpc (github.com)