title: How to set up the SuperPowered SDK on Android
body: <p>Reading through the README on the <a href="https://github.com/superpoweredSDK/Low-Latency-Android-Audio-iOS-Audio-Engine" rel="nofollow noreferrer">SuperPowered SDK GitHub</a> page, I notice that for having it working on Android you need to:</p>
  
  <blockquote>
    <p>Create the jni folder inside the project's folder: app/src/main/jni
    Copy the contents of the following files from one of the example
    projects: gradle/wrapper/gradle-wrapper.properties, local.properties,
    build.gradle, app/build.gradle, app/src/main/jni/CMakeLists.txt Open
    build.gradle (Module: app), and change the applicationId</p>
  </blockquote>
  
  <p>I've done all of that, still when I'm trying to sync my project with gradle, I get the following error message:</p>
  
  <blockquote>
    <p>Error:(34, 0) Could not find method arguments() for arguments [-DANDROID_PLATFORM=android-16, -DANDROID_TOOLCHAIN=clang, -DANDROID_ARM_NEON=TRUE, -DANDROID_STL=gnustl_static, -DPATH_TO_SUPERPOWERED:STRING=null] on object of type com.android.build.gradle.internal.dsl.CmakeOptions.
    Open File</p>
  </blockquote>
  
  <p>This is how my app/build.gradle looks like:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  Properties properties = new Properties()
  properties.load(project.rootProject.file('local.properties').newDataInputStream())
  def superpowered_sdk_path = properties.getProperty('superpowered.dir')
  
  android {
      signingConfigs {
          dancam_dev_key {
              keyAlias ######
              keyPassword ######
              storeFile file('/Users/daniele/Desktop/Chords/#####')
              storePassword ########
          }
      }
      compileSdkVersion 26
      buildToolsVersion "26.0.1"
      defaultConfig {
          applicationId #####
          minSdkVersion 21
          targetSdkVersion 26
          versionCode 17
          versionName "2.1"
          signingConfig #######
          multiDexEnabled true
  
          ndk {
              abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' // these platforms cover 99% percent of all Android devices
          }
      }
  
      externalNativeBuild {
          cmake {
              arguments '-DANDROID_PLATFORM=android-16', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_ARM_NEON=TRUE', '-DANDROID_STL=gnustl_static', "-DPATH_TO_SUPERPOWERED:STRING=${superpowered_sdk_path}"
              cFlags '-O3', '-fsigned-char' // full optimization, char data type is signed
              cppFlags '-fsigned-char', "-I${superpowered_sdk_path}"
          }
      }
  
      buildTypes {
          release {
              shrinkResources true
              minifyEnabled true
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
      productFlavors {
      }
  
      dataBinding {
          enabled = true
      }
  }
  
  sourceSets {
      main {
          jniLibs.srcDirs = ['src/main/jni']
      }
  }
  
  externalNativeBuild {
      cmake {
          path 'src/main/jni/CMakeLists.txt'
      }
  }
  
  dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
      ....
  }
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>Here is the <code>cmake.txt</code> file</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.4.1)
  
  set(
      PATH_TO_SUPERPOWERED
      CACHE STRING ""
  )
  
  message(${ANDROID_ABI})
  
  file(GLOB CPP_FILES "*.cpp")
  
  add_library(
      SuperpoweredExample
      SHARED
      ${CPP_FILES}
      ${PATH_TO_SUPERPOWERED}/AndroidIO/SuperpoweredAndroidAudioIO.cpp
  )
  
  include_directories(src/main/jni)
  include_directories(${PATH_TO_SUPERPOWERED})
  
  target_link_libraries(
      SuperpoweredExample
      log
      android
      OpenSLES
      ${PATH_TO_SUPERPOWERED}/libSuperpoweredAndroid${ANDROID_ABI}.a
  )
  </code></pre>