在Android系统中,我们的项目工程都是以Android.mk的形式存在的。
不能用Android Studio直接打开。
解决方法1:
用Eclipse打开Android.mk工程,导出为gradle项目,在用Android Studio打开就可以了。
解决方法2:
在项目根目录,手动编写一个build.gradle文件。(需要根据Android.mk来编写)
build.gradle
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
minSdkVersion 28
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('p