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

Android Studio 3.1.1导入ApiDemo错误处理

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

Android Studio 3.1.1导入ApiDemo错误处理

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

相关文章:

  • 2021-07-08
  • 2021-09-09
  • 2021-10-18
  • 2021-10-13
  • 2022-12-23
  • 2021-10-15
  • 2021-09-12
猜你喜欢
  • 2021-12-28
  • 2021-12-30
  • 2022-03-06
  • 2021-11-24
  • 2021-08-13
  • 2022-12-23
  • 2021-04-13
相关资源
相似解决方案