怎样才能导入别人的android项目不再报错
- 直接run别人的项目
- 手动导入
1.去到要导入项目的目录下把.idea,*.iml,local.properties删除(*表示所有)

2.进入app文件夹同理把build, *.iml删除

3.打开已经run成功的项目的build.graid把classpath:这整句复制,去要导入的项目中打开build.graid进行替换。

4.打开gradle\wrapper\gradle-wrapper.properties复制最后一句,去到要导入的项目进行替换。

5.改version

6.导入项目

确认下

7.出现Could not find com.android.tools.build:gradle:3.2.0.

点击

8.若出现解决Configuration ‘compile' is obsolete and has been replaced with implementation
改成implementation
1.把compile 改成implementation
2.把androidTestCompile改成androidTestImplementation
3.把testCompile改成testImplementation

如果还有警告,看下运行按钮,可以运行了

上一篇:Android自定义view仿QQ的Tab按钮动画效果(示例代码)
栏 目:Android代码
下一篇:android实现扑克卡片翻转
本文地址:http://www.codeinn.net/misctech/225341.html






