0

I am having an issue with the exception in the title. I have a running app in which I wanted to include Bluetooth GATT profile. Therefore I need at least SDK 18, so I changed it in the manifest. Now my app crashes everytime I start it, throwing the exception: "cannot combine custom titles with other title features". I followed this solution and deleted the line

requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);

but now my app simply crashes without throwing an exception. When I use debug mode to find where it crashes exactly I see the toast "Source code does not match binarycode". I also tried to put android:windowNoTitle="false" like this

<style name="Theme.PageIndicatorDefaults" parent="android:Theme">
    <item name="vpiIconPageIndicatorStyle">@style/Widget.IconPageIndicator</item>
    <item name="vpiTabPageIndicatorStyle">@style/Widget.TabPageIndicator</item>
    <item name="android:windowNoTitle">false</item>
</style>

in my styles.xml, but this

10/07 09:48:19: Launching app
$ adb push H:\Vibrotac_Android\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.sensodrive.vibrotac
$ adb shell pm install -r "/data/local/tmp/com.sensodrive.vibrotac"
    pkg: /data/local/tmp/com.sensodrive.vibrotac
Success


$ adb shell am start -n "com.sensodrive.vibrotac/com.sensodrive.vibrotac.app.activity.VibroTacStartActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Connected to process 7629 on device motorola-xt1032-TA92910MK8
W/VibroTacIncidentManager: outputTextView is not set - nothing will be shown
D/VibroTacBluetoothCommunicationManager: Acquiring lock for requestStatusOfRemoteDeviceAndReportIncidents
D/VibroTacBluetoothCommunicationManager: Acquiring lock for requestStatusOfRemoteDeviceAndReportIncidents
D/VibroTacConfigurationDataManager: getConfigurationData: key=EXECUTION_RUNNING, value=null
D/VibroTacBluetoothCommunicationManager: Acquiring lock for requestStatusOfRemoteDeviceAndReportIncidents
D/VibroTacConfigurationDataManager: getConfigurationData: key=EXECUTION_RUNNING, value=null
W/VibroTacIncidentManager: outputTextView is not set - nothing will be shown
D/VibroTacBluetoothCommunicationManager: Acquiring lock for requestStatusOfRemoteDeviceAndReportIncidents
D/VibroTacConfigurationDataManager: getConfigurationData: key=EXECUTION_RUNNING, value=null
D/VibroTacBluetoothCommunicationManager: Acquiring lock for requestStatusOfRemoteDeviceAndReportIncidents
D/VibroTacConfigurationDataManager: getConfigurationData: key=EXECUTION_RUNNING, value=null
W/VibroTacIncidentManager: outputTextView is not set - nothing will be shown
D/VibroTacBluetoothCommunicationManager: Acquiring lock for requestStatusOfRemoteDeviceAndReportIncidents
D/VibroTacConfigurationDataManager: getConfigurationData: key=EXECUTION_RUNNING, value=null
D/VibroTacBluetoothCommunicationManager: Acquiring lock for requestStatusOfRemoteDeviceAndReportIncidents
D/VibroTacConfigurationDataManager: getConfigurationData: key=EXECUTION_RUNNING, value=null
W/VibroTacIncidentManager: outputTextView is not set - nothing will be shown
D/VibroTacBluetoothCommunicationManager: Acquiring lock for requestStatusOfRemoteDeviceAndReportIncidents
D/VibroTacConfigurationDataManager: getConfigurationData: key=EXECUTION_RUNNING, value=null
D/VibroTacBluetoothCommunicationManager: Acquiring lock for requestStatusOfRemoteDeviceAndReportIncidents
D/VibroTacConfigurationDataManager: getConfigurationData: key=EXECUTION_RUNNING, value=null
W/VibroTacIncidentManager: outputTextView is not set - nothing will be shown
D/VibroTacBluetoothCommunicationManager: Acquiring lock for requestStatusOfRemoteDeviceAndReportIncidents
D/VibroTacConfigurationDataManager: getConfigurationData: key=EXECUTION_RUNNING, value=null
D/VibroTacBluetoothCommunicationManager: Acquiring lock for requestStatusOfRemoteDeviceAndReportIncidents
D/VibroTacConfigurationDataManager: getConfigurationData: key=EXECUTION_RUNNING, value=null

is what happens...The app closes somewhere in between, but I don't see an exception thrown.

I would have asked in the former thread as a comment but I am not yet allowed to comment. Thanks for your help.

Edit: After downgrading Android Studio to v2.1.3 and undoing the made changes, I now get as it seems random exceptions thrown. With target, compiled and minSDK18 I get the known cannot combine custom titles with other title features, using SDK14 the programm tells me

    H:\Vibrotac_Android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml
Error:(64) No resource identifier found for attribute 'parentActivityName' in package 'android'
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\huebner\AppData\Local\Android\Sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1

in debug\AndroidManifest (which I never saw before)... I don't have any idea what the heck is going on and I slowly can understand people who create websites like this.

Community
  • 1
  • 1
Lehue
  • 425
  • 8
  • 26

1 Answers1

0

So, after trying a lot of things I found...not really a good answer but a workaround for the problem. At least the code is running...

I reset the project to the last running version, using Android Studion v2.1.3 instead of v2.2. The build.gradle looks like this:

    dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    compile 'com.google.code.gson:gson:2.3.1'
}


android {
    compileSdkVersion 18
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.sensodrive.vibrotac"
        minSdkVersion 10
        targetSdkVersion 10
    }

and I handled the GATT SDK problem simply using if(Build.VERSION.SDK_INT>18) around everything using GATT. So if you have a similar problem try if it is possible not to increase the minSDK version in the AndroidManifest.xml but instead just handle the SDK problem at the places where it occurs. May not be the most elegant solution but at least it works...

Oh and another thing: If you don't have to update to v2.2 don't do it. There is some kind of problem with the line assembleDebug.finalizedBy(copyAPK) in build.gradle and even though there is a workaround for this, I wasn't able to apply it. I guess it is better for your nerves to just stay with the older version until there is an official fix for this problem.

Community
  • 1
  • 1
Lehue
  • 425
  • 8
  • 26