1.5 Troubleshooting
This page provides information about common problems and potential solutions. You can always contact our technical support at NIMMSTA. We're happy to help you!
If you are having trouble integrating the NIMMSTA Core Library, please check the following steps:
- Clean the build folder, empty caches and restart Android Studio
- Check if minimum Gradle version is met
- Check for updates of the NIMMSTA Core Library
- When having issues with Maven: Please check back after several minutes, sometimes mavenCentral has problems.
What if Android Studio doesn't download the latest library version?
- Right click on Gradle Project -> Reimport
- Empty Caches and Restart
bindServiceToActivity: Service / Activity not found
If your project does not have manifest merging enabled, the services and activites from the NIMMSTA App are not found. Please enable manifest merging or add the following code to your manifest manually:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.nimmsta.android">
<!-- Needed for background operation -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!-- used to activate bluetooth -->
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<!-- used to access BLE and scan for devices -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<!-- used for firmware updates -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application>
<!-- your application configuration -->
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
<activity android:name="com.nimmsta.core.android.device.DeviceConnectActivity"
android:screenOrientation="portrait"
android:launchMode="singleTop"
android:configChanges="orientation|keyboardHidden">
</activity>
<activity android:name="com.nimmsta.core.android.firmwareupgrade.SoftwareUpgradeActivity"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden">
</activity>
<activity android:name="com.nimmsta.core.android.device.DeviceListActivity"
android:screenOrientation="portrait"
android:launchMode="singleTop"
android:configChanges="orientation|keyboardHidden"/>
<activity
android:name="com.nimmsta.core.android.about.AboutActivity"
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity
android:name="com.nimmsta.core.android.about.LicenseActivity"
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<receiver android:name="com.nimmsta.core.android.framework.NIMMSTANotificationService$DisconnectReceiver"/>
<receiver android:name="com.nimmsta.core.android.framework.NIMMSTANotificationService$ConnectReceiver"/>
<service android:name="com.nimmsta.core.android.framework.NIMMSTAConnectionManagerService"/>
</application>
</manifest>
Could not resolve XXX. However we cannot choose between the following variants...
This means the Kotlin Gradle Plugin is missing in your project and / or app module. Add the following lines to your project's build.gradle:
val kotlinVersion = '1.4.32' // You can use the latest version
buildscript {
/* ... */
dependencies {
/* ... */
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
}
```
And then apply the kotlin-android plugin to the module the NIMMSTA Core Library is imported:
Android does not find the layout resource
Under certain circumstances Android is removing files in the res/raw folder. To keep all of them, follow this guideline from the Android documentation: https://developer.android.com/studio/build/shrink-code#keep-resources