gpt4 book ai didi

android - "cannot combine custom titles with other title features"和 "Source code does not match binarycode"

转载 作者:行者123 更新时间:2023-12-02 05:41:23 27 4
gpt4 key购买 nike

我对标题中的异常有疑问。我有一个正在运行的应用程序,我想在其中包含蓝牙 GATT 配置文件。因此我至少需要 SDK 18,所以我在 list 中更改了它。现在,我的应用程序每次启动时都会崩溃,并抛出异常:“无法将自定义标题与其他标题功能结合起来”。我关注了this解决方案并删除该行

requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);

但现在我的应用程序只是崩溃而没有抛出异常。当我使用 Debug模式来准确查找崩溃的位置时,我看到了 toast“源代码与二进制代码不匹配”。我也尝试把android:windowNoTitle="false" 像这样

<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>

在我的 styles.xml 中,但是这个

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

发生了什么...应用程序在两者之间关闭,但我没有看到抛出异常。

我本想在前一个帖子中提出评论,但目前还不允许我发表评论。感谢您的帮助。

编辑:将 Android Studio 降级到 v2.1.3 并撤消所做的更改后,我现在得到的似乎是随机抛出的异常。通过目标、编译和 minSDK18,我得到已知的无法将自定义标题与其他标题功能结合起来,使用 SDK14 程序告诉我

    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

在 debug\AndroidManifest (我以前从未见过)...我不知道到底发生了什么,我慢慢地可以理解创建像this这样的网站的人了。 .

最佳答案

所以,在尝试了很多事情之后,我发现......这并不是一个很好的答案,而是解决问题的方法。至少代码正在运行......

我使用 Android Studion v2.1.3 而不是 v2.2 将项目重置为上次运行的版本。 build.gradle 看起来像这样:

    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
}

我在使用 GATT 的所有内容中仅使用 if(Build.VERSION.SDK_INT>18) 处理了 GATT SDK 问题。因此,如果您遇到类似的问题,请尝试是否可以不增加 AndroidManifest.xml 中的 minSDK 版本,而只是在出现问题的地方处理 SDK 问题。可能不是最优雅的解决方案,但至少它有效......

哦,还有一件事:如果您不需要更新到 v2.2,请不要这样做。 build.gradle 中的 assembleDebug.finalizedBy(copyAPK) 行存在某种问题,即使有 workaround为此,我无法应用它。我想在官方修复这个问题之前,最好还是继续使用旧版本。

关于android - "cannot combine custom titles with other title features"和 "Source code does not match binarycode",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39912265/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com