我有BottomSheetFragmentActivity
这导致在Android 8.0设备此崩溃.我正在寻找一种解决方法,而不是将targetSDK设置回26.
我解释了这里所描述的:但这反过来导致了
SurfaceFlinger:无法在图层父级(无父级)中找到图层BottomSheetFragmentActivity#0.
有解决方案吗?
我有一个Android应用程序,它抛出BUILD进程跟随错误:
/home/Ralf/Projekte/University/android-sampleapp/sampleapp/build/intermediates/bundles/debug/res/values-de/values-de.xml错误:(88,5)以非位置格式指定的多个替换; 你的意思是添加formatted ="false"属性?错误:(88,5)意外的结束标记字符串
/home/Ralf/Projekte/University/android-sampleapp/sampleapp/build/intermediates/bundles/debug/res/values/values.xml错误:(106,5)以非位置格式指定的多个替换; 你的意思是添加formatted ="false"属性?错误:(106,5)意外的结束标记字符串
/home/Ralf/Projekte/University/android-sampleapp/demo/build/intermediates/res/merged/debug/values-de/values-de.xml错误:(131)以非位置格式指定的多个替换; 你的意思是添加formatted ="false"属性?错误:(131)意外的结束标记字符串
/home/Ralf/Projekte/University/android-sampleapp/demo/build/intermediates/res/merged/debug/values/values.xml错误:(1258)以非位置格式指定的多个替换; 你的意思是添加formatted ="false"属性?错误:(1258)意外的结束标记字符串错误:java.util.concurrent.ExecutionException:com.android.ide.common.process.ProcessException:执行进程/opt/sdk/build-tools/26.0.2/aapt时出错参数{package -f --no-crunch -I /opt/sdk/platforms/android-27/android.jar -M/home/Ralf/Projekte/University/android-sampleapp/demo/build/intermediates/manifests/full /debug/AndroidManifest.xml -S/home/Ralf/Projekte/University/android-sampleapp/demo/build/intermediates/res/merged/debug -m -J/home/Ralf/Projekte/University/android-sampleapp/demo/build/generated/source/r/debug -F /home/Ralf/Projekte/University/android-sampleapp/demo/build/intermediates/res/debug/resources-debug.ap_ -D/home/Ralf/Projekte/University /android-sampleapp/demo/build/intermediates/multi-dex/debug/manifest_keep.txt --custom-package com.ralfi.demo -0 apk --output-text-symbols/home/Ralf/Projekte/University/android -sampleapp/demo/build/intermediates/symbols/debug --no-version-vectors}错误:com.android.ide.comm on.process.ProcessException:使用参数执行进程/opt/sdk/build-tools/26.0.2/aapt时出错{package -f --no-crunch -I/opt/sdk/platforms/android-27/android. jar -M /home/Ralf/Projekte/University/android-sampleapp/demo/build/intermediates/manifests/full/debug/AndroidManifest.xml -S/home/Ralf/Projekte/University/android-sampleapp/demo/build /中间体/ res/merged/debug -m -J/home/Ralf/Projekte /大学/ android-sampleapp/demo/build/generated/source/r/debug -F/home/Ralf/Projekte/University/android-sampleapp/demo/build/intermediates/res/debug/resources-debug.ap_ -D /home/Ralf/Projekte/University/android-sampleapp/demo/build/intermediates/multi-dex/debug/manifest_keep.txt --custom-package com.ralfi.demo -0 apk --output-text-symbols/home/Ralf/Projekte/University/android-sampleapp/demo/build/intermediates/symbols/debug --no-version-vectors}错误:org.gradle .process.internal.ExecException:进程'命令'/opt/sdk/build-tools/26.0.2/aapt''以非零退出va结束 lue 1
当我点击字符串resrouces中的错误时,它指向:隐藏%02d:%02d min
但我需要翻译这些资源,为什么我得到这个?
我最近安装了Qt 5.5及其MaintenanceTool(MaintenanceTool.exe).默认存储库正在运行,但是一天之后,我的MaintenanceTool突然报告没有设置存储库?
我可以暂时在MaintenanceTool中输入单个存储库,但我想获取默认的存储库集.
他们为什么走了?如何重新设置默认存储库?
提前致谢
如何滑入键盘?我试过:
val keyboardController: SoftwareKeyboardController? = LocalSoftwareKeyboardController.current
keyboardController?.show()
Run Code Online (Sandbox Code Playgroud)
但这不起作用。我缺少什么?也许一些清单标志?
android-windowmanager android-window android-jetpack android-jetpack-compose
在我的应用程序中,我在CustomTabsIntent或WebView中显示外部HTML站点:
if (customTabsIntent != null) customTabsIntent.launchUrl(this, Uri.parse("http://some.where.com/site.html"));
else startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://some.where.com/site.html")));
Run Code Online (Sandbox Code Playgroud)
但该HTML的风格已经更新,但我的智能手机显示旧样式(旧字体等).
在*.html文件中有一个*.css引用:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href='https://my.site.com/assets/css/style.css' rel='stylesheet' type='text/css'>
</head>
Run Code Online (Sandbox Code Playgroud)
在那个*.css文件中,引用了一个单独的字体; 例如:
@font-face {
font-family: 'MyFontRegular';
src: url('https://www.openfont.org/assets/mail/fonts/MyFontWeb-Regular.woff') format('woff'),
url('https://www.openfont.org/assets/mail/fonts/MyFontWeb-Regular.eot') format('embedded-opentype');
}
Run Code Online (Sandbox Code Playgroud)
正如我所说,智能手机中的Chrome浏览器不显示引用的字体,因为它会关闭http://或https://.当我手动将该方案添加到地址栏中时,将显示正确的样式.
当我的Android应用程序调用它时,如何在我的android浏览器的地址字段中强制https://方案?
android webview android-webview chrome-custom-tabs android-customtabs
当我在我的Android Studio项目中右键单击(在Android视图中)时,我曾经有一个"Git"子菜单.我可以拉,推等
但是,'Git'菜单现在已经不见了.结果,我既不能推也不能拉.我在哪里可以再次启用它?
我已经建立了QMenu MainMenu
我的上顶MainWindow
在我的应用程序.每个人都习惯了,我有以下QMenu
主菜单:
文件 - 编辑 - SuperHeavyExpertMenus - 设置 - 帮助
我想SuperHeaverExpertMenus
在程序启动时最初隐藏子树,因为它会包含很多设置,这可能会使初学者用户感到困惑.
例如,我想SuperHeavyExpertMenu
在"设置"中的复选框为真时显示该子树.
我可以隐藏孩子QActions
的的QMenu
上述S,争夺QAction:setVisible(false)
.但我能做到这一点QMenu
吗?
有没有办法隐藏QMenu
?
我在 Jetpack Compose 中有一个可组合项,可以说它是一个按钮。我想对其进行时间限制,以便在这段时间过后,可组合项(此处的按钮)消失。
有没有简单的方法可以使用可组合项来实现这一点?
或者这是一个更复杂的实现?
我有一个应用程序范围的实用程序类AppUtils,我可以在任何速度发布应用程序相关信息:
例如当mesaages作为Snackbar时,我需要跟踪当前显示的View容器以使用它Snackbar.make(view, text, length);
当我想通过发布该消息时NotificationManager.notify(int, Builder);
,我需要这里的Class签名
Intent resultIntent = new Intent(this, ResultActivity.class);
Run Code Online (Sandbox Code Playgroud)
因此我在我的AppUtils中:
public static void setCurrentViewAndClass(View v, Class<?> c)
{
view = v; // view is static
cls = c; // cls is static
}
Run Code Online (Sandbox Code Playgroud)
在我的项目中,我可以记住当前视图(对于Snackbar参数)和cls(对于Notification Intent).
接下来,我清除这些参数,例如当我将应用程序留在后台时:
public static void clearCurrentViewAndClass()
{
view = null;
cls = null;
}
Run Code Online (Sandbox Code Playgroud)
答:当这些参数非空时,我知道我的应用程序具有相应视图的焦点,我可以将相关消息显示为Snackbar.B.当这些参数为空时,我知道我的应用程序在后台,我想将相关消息显示为通知
因此,无论何时创建或恢复片段/活动,我setClassAndview()
都会在每个片段中调用它onResume()
来记住参数.
是否有更优雅的方式来跟踪当前显示的活动或活动类?
在我使用Google登录和Firebase云消息传递的Adrdoi应用中,我收到以下错误消息:
AGPBI: {"kind":"error","text":"Program type already present: com.google.android.gms.auth.api.signin.internal.zzg","sources":[{}]}
Run Code Online (Sandbox Code Playgroud)
这是否意味着google auth lib已经在其他地方使用过?那是什么?
android firebase firebase-authentication firebase-cloud-messaging