I have a basic application that renders a 3d model. Now I need to connect to the Shimmer Inertial Measurement Units via bluetooth. I have added the ShimmerAndroidInstrumentDriver folder to my libs folder in the root directory of my project and added the following to my build.gradel file and my settings. gradle file.
build.gradle (:app)
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.example.modelrenderinga4'
compileSdk 33
defaultConfig {
applicationId "com.example.modelrenderinga4"
minSdk 24
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.3.2'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.8.0'
implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0')
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.activity:activity-compose:1.5.1'
implementation platform('androidx.compose:compose-bom:2022.10.00')
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-graphics'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.compose.material3:material3'
//Filament for rendering model
implementation 'com.google.android.filament:filament-android:1.14.0'
implementation 'com.google.android.filament:gltfio-android:1.14.0'
implementation 'com.google.android.filament:filament-utils-android:1.14.0'
//For shimmer
implementation files('libs/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver.aar')
implementation (group: 'com.shimmersensing', name: 'ShimmerBluetoothManager', version:'0.9.42beta') {
exclude group: 'io.netty'
exclude group: 'com.google.protobuf'
exclude group: 'org.apache.commons.math'
}
implementation (group: 'com.shimmersensing', name: 'ShimmerDriver', version:'0.9.138beta') {
exclude group: 'io.netty'
exclude group: 'com.google.protobuf'
exclude group: 'org.apache.commons.math'
}
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation platform('androidx.compose:compose-bom:2022.10.00')
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
debugImplementation 'androidx.compose.ui:ui-tooling'
debugImplementation 'androidx.compose.ui:ui-test-manifest'
}
settings.gradle (Project Level)
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
//shimmmer
flatDir {
dirs 'libs'
}
jcenter()
maven {
url 'https://shimmersensing.jfrog.io/artifactory/ShimmerAPI'
}
}
}
rootProject.name = "ModelRenderingA4"
include ':app'
I tried using Java 17 and Java 12, and im running into the following error when syncing gradle: No variants found for ':app'. Ive added a screenshot of my project structure
The dependencies related to shimmer were obtained through online searching. Is there any compatibility issues or anything i'm missing which is causing this error. Any help would be much appriciated.