■ Android 集成环信android.support.v4.view不存在

最近公司要做个IM 即时通信的项目,我今天便集成了一下环信SDK 时间太紧直接拿环信封装好的Easeui库。
当我集成的时候问题就出现了

因为我使用Android studio 是3.4 默认安装的 compileSdkVersion 是29,所使用的便是AndroidX, 为了适配环信我特意把AndroidX 改为了support包。

 implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:support-annotations:28.0.0'
    implementation 'android.arch.lifecycle:extensions:1.1.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

当项目运行的时候 就提示我android.support.v4.view不存在

坑了一会,忽然回想起 gradle.properties 文件中两个属性没有注释!

# android.useAndroidX=true
# android.enableJetifier=true

注释之后完美运行。

猜你喜欢

转载自blog.csdn.net/MacaoPark/article/details/105600476