Troubleshooting SDK (Android)

Troubleshooting SDK (Android)

App not starting on  Android 5.1 Devices

Please note since Android 5.1 an additional permission is required. If this permission is not added then the app will crash. You can check for this particular reason in the logs of the application:

E/AndroidRuntime? FATAL EXCEPTION: main
Process: com.applause.android.internal, PID: 12300
android.view.WindowManager$InvalidDisplayException: Unable to add window android.view.ViewRootImpl$W@2bb301b6 – the specified window type is not valid
at android.view.ViewRootImpl.setView(ViewRootImpl.java:594)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
at com.applause.android.dialog.ApplauseDialog.attach(ApplauseDialog.java:167)
at com.applause.android.dialog.ApplauseDialog.show(ApplauseDialog.java:152)
at com.applause.android.dialog.LoginDialog.show(LoginDialog.java:53)
at com.applause.android.dialog.PasswordLoginDialog.show(PasswordLoginDialog.java:31)
at com.applause.android.dialog.BetaPasswordLoginDialog.show(BetaPasswordLoginDialog.java:44)
at com.applause.android.dialog.LoginDialogWrapper.show(LoginDialogWrapper.java:18)
at com.applause.android.logic.IdentifyFinishedListener.displayLoginActivity(IdentifyFinishedListener.java:41)
at com.applause.android.logic.IdentifyFinishedListener.onIdentifyFinished(IdentifyFinishedListener.java:27)
at com.applause.android.logic.QaIdentifyHandler$1.run(QaIdentifyHandler.java:56)
at android.os.Handler.handleCallback(Handler.java:739)

see: Android 5.1 information

Compiler error upon integration (missing Material Theme)

The Applause Android SDK uses Android Material Design  hence the version of the compiler must be set to at least version 21.

In case there is a compiler error post integration with an output similar to below then:

Execution failed for task ':app:processApplauseReleaseResources'..
Error Code:
1
Output:
/Users/USERNAME/dev/projects/PROJECT/app/build/intermediates/bundles/applause/release/res/values-v21/values.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:style/Widget.Material.Button

API version check:

Please check the version of the compiler you’re using it should be at least 21 (you can check in the build.gradle file)

android {
    compileSdkVersion 21
}