原因是 compileSdkVersion 26 targetSdkVersion 26 和 compile 'com.android.support:appcompat-v7:26+'不一致 改成一致的就行了