igorski / MWEngine

Audio engine and DSP library for Android, written in C++ providing low latency performance within a musical context, while providing a Java/Kotlin API. Supports both OpenSL and AAudio.
MIT License
257 stars 45 forks source link

Bumblebee sting ModelCache.safeGet(androidProjectResult.androidProject::getNdkVersion, "") must not be null #149

Closed scar20 closed 2 years ago

scar20 commented 2 years ago

A new feature of the latest version... It seem we have to set ndk explicitly in gradle.build as quick fix. Searching for answer give not very much, a few StackOverflow mostly self-answering issues with of course deprecated solutions and of course no clear indication from Google. So, setting a particular ndk in gradle.build is ok. Add ndk path in android.ndkPath seem ok for generic ndk:

android {
  ndkPath "driveLetter:/path/to/Sdk/ndk-bundle"
}

Unfortunately both those solution are not gitignoreable. Setting ndk path in local.properties is deprecated - that is unfortunate since this file is git ignored. Lastly, probably the best solution is: gradle will pick the latest ndk by default if it is the latest gradle version. I could test this opening a new empty native C++ project.

So the latest gradle must be set in gradle-wrapper.properties: distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip The new project also add those in the project build.gradle file which was empty in previous version:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id 'com.android.application' version '7.1.1' apply false
    id 'com.android.library' version '7.1.1' apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

So for what I understand, it mean the code base need to be "retouched" to accomodate Bumblebee. By then I can still make the changes in a branch, or wait. Let me know the way you indent to address this.

igorski commented 2 years ago

I remember in the old days one would only fear updating the actual dev kits, but now each update of the IDE is to be met with equal fear 🙈

I'll update to Bumblebee and see what is the right course of action.

igorski commented 2 years ago

Addressed in 87fda7d25e4ec8651ffd5e6ac182185d76a6e851