Android SDK接入问题总结(一)

给你一囗甜甜゛ 提交于 2020-03-07 10:22:41

Android Studio 3.5版本引入旧工程

1】Could not find method jackOptions() for arguments xxxxxx
解决:在build.gradle中只有用即可,注掉jackOptions

defaultConfig {
//        jackOptions {
//            enabled false
//        }
}

compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
         targetCompatibility JavaVersion.VERSION_1_8
    }

2】“No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android”
原因:新版本的NDK与3.0及以前旧版的Android Gradle plugin插件不兼容
解决:注掉build.gradle中低于3.0的gradle版本

dependencies {
//		classpath 'com.android.tools.build:gradle:2.3.2'
	}

3】“Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add ‘tools:replace=“android:appComponentFactory”’ to element at AndroidManifest.xml:5:5-20:19 to override

<application
         ...
 		android:appComponentFactory=""
 		//如果提示tools找不到,alt+回车自己会添加
        tools:replace="android:appComponentFactory">

同遇问题,转载自:https://blog.csdn.net/zxwd2015/article/details/86651216
4】"> More than one file was found with OS independent path 'META-INF/proguard/androidx-annotations.pro"

在build.gradle(project)添加:
packagingOptions {             
	exclude 'META-INF/proguard/androidx-annotations.pro'         
	}
	//同一类问题,看报错提示的是什么就exclude什么
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!