Android Studio 3.1.1导入ApiDemo错误处理

Import Project,选择ApiDemo源码目录,等待导入完成,处理编译错误

1.The File must end with .xml

解决方式:res/xml/目录下,preference_switch增加后缀名,改为preference_switch.xml

2. android.support.v4包找不到,

解决方式: File->Project Structure->app->Dependencies


+选择 Library dependency,搜索support-v4,添加到依赖中


3. com.google.android.mms包找不到

解决方式: copy 源码编译目录out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/classes.jar到ApiDemo的/libs/目录下

4. Invoke-customs are only supported starting with Android O (--min-api 26)

解决方式: 修改    app->build.gradle, minSdkVersion 23改为minSdkVersion 26

猜你喜欢

转载自blog.csdn.net/Neuuranus/article/details/80523234
今日推荐