I have an existing Java plus C (i.e. NDK) Android app. The build fails on my new Mac M1, with no useful error information. I can't tell if this is due to some M1 specific issue, or because I have installed the latest Android Studio, NDK and friends, or what.
I tried creating a new, minimal Java + NDK app using Android Studio, and it worked. I compared build.gradle files, bringing the old ones into concordance with the new as much as is possible. That does not help.
I am hoping someone can help me find out why it is failing, with no error message, or suggest a way to get this working.
The build fails at Gradle task:
Task :app:compileDebugJavaWithJavac
The only error message is in the event log:
3:15 PM Gradle build failed with 1 error(s) in 9 s 154 ms
Files below:
Build Log
Executing tasks: [:app:assembleDebug] in project /Volumes/SSD1/PERM/tvs/android-intellij/projects/Radar_Main
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:checkDebugAarMetadata UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :app:processDebugMainManifest UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:processDebugManifestForPackage UP-TO-DATE
> Task :app:processDebugResources UP-TO-DATE
> Task :app:compileDebugJavaWithJavac
Top Level build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
app/build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "30.0.3" //port
defaultConfig {
applicationId "com.tinyvital.wxr"
minSdkVersion 18
targetSdkVersion 29
externalNativeBuild {
cmake {
cppFlags ""
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
version "3.10.2" //port
}
}
}
dependencies {
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.android.volley:volley:1.1.1'
implementation "ch.acra:acra-http:5.3.0"
implementation "ch.acra:acra-toast:5.3.0"
implementation "ch.acra:acra-limiter:5.3.0"
def acraVersion = '5.7.0'
implementation "ch.acra:acra-http:$acraVersion"
implementation "ch.acra:acra-toast:$acraVersion"
implementation "ch.acra:acra-limiter:$acraVersion"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
}