安卓项目太旧报错

1.我用了一个两年前github上的一个项目demo,但是编译时报错。
https://blog.csdn.net/qq734048504/article/details/84066343
提示:
注: 某些输入文件使用或覆盖了已过时的 API。 注: 有关详细信息, 请使用 -Xlint:deprecation······
这个是开发警告,可以在build.gradle代码中加入,这个用于查询具体警告信息。

apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'

android {
    compileSdkVersion 28
    allprojects{
        gradle.projectsEvaluated{
            tasks.withType(JavaCompile){
               options.compilerArgs<<"-Xlint:unchecked"<<"-Xlint:deprecation"
               }
            }
        }
}

2.然后报Error: “privacy” is not translated in “en” (English), “sw” (Swahili) [MissingTranslation],这个是resource的错,可以增加如下修改

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
    tools:ignore="MissingTranslation">
    </resources>

3.其他报错可以尝试,增加编译版本到28

 compileSdkVersion 28
    allprojects{
        gradle.projectsEvaluated{
            tasks.withType(JavaCompile){
               options.compilerArgs<<"-Xlint:unchecked"<<"-Xlint:deprecation"
               }
            }
        }

    buildToolsVersion "28.0.3"
    aaptOptions.cruncherEnabled = false
    aaptOptions.useNewCruncher = false
    defaultConfig {
        applicationId "com.lqr.wechat"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值