草庐IT

translate_non_alphanumerics

全部标签

Android Room 将 Null 作为 Non-Null 类型返回

我有Dao来返回简单的对象。如果对象不存在,Room返回null,但Android应用程序没有崩溃。此外,如果我将该值分配给非空变量,则应用程序不会崩溃。道:@Query("SELECT*FROMusersWHEREidLIKE:idLIMIT1")abstractfungetById(id:Long):User不崩溃的代码:doAsync{valuser:User=userDao.getById(999)//user999notexist,userDaoreturnsnulluiThread{if(user==null){Timber.d("useris$user")//"useri

java - 运行 exec() 时出错。命令 : Working Directory: null Environment: null - how to execute a binary in Android correctly on a non-rooted device?

我想在非root的android设备上运行可执行文件。在java中使用以下命令Runtime.getRuntime().exec("/bin/chmod744/data/data/com.example.myapp/myBin");Runtime.getRuntime().exec("/data/data/com.example.myapp/myBin");结果Errorrunningexec().Command:[/data/data/com.example.myapp/myBin]WorkingDirectory:nullEnvironment:null我发现了很多关于此的问题,但

android - error "Process ' command './node_modules/expokit/detach-scripts/run-exp.sh' ' finished with non-zero exit value 1"whie getting android apk file

我有一个带有expokit工具的reactNative项目。现在我想从androidstudio获取一个apk输出文件。但我收到了这个错误:Process'command'./node_modules/expokit/detach-scripts/run-exp.sh''finishedwithnon-zeroexitvalue1如有任何帮助,我们将不胜感激。 最佳答案 运行“exppublish”并重试。希望这会有所帮助:) 关于android-error"Process'comman

Android Span or Non-Breaking Space Causing line break and text duplication (4.0 ICS)

我正在使用多个大量使用span的TextView。问题:有时在我的应用程序中(特别是在IceCreamSandwich上)我会看到文本字符串中没有的换行符以及文本重复。有关示例,请参见下图。请注意第三个句子是如何开始的,然后是换行符,然后文本被复制,句子结束。代码:tv=(TextView)inflater.inflate(R.layout.fragment_reader_list_item,parent,false);SpannableStringBuilderssb=ssbList.get(position);tv.setText(ssb,BufferType.SPANNABLE)

android - 错误 : "Cannot make a static reference to the non-static method findViewById(int) from the type Activity"

我是Java的新手,正在尝试使用EditText创建一个Activity。创建时,它加载当前日期,当用户选择EditText时,它显示一个DatePicker。用户选择日期后,我需要将结果放入EditText。但是,我目前收到以下错误:Cannotmakeastaticreferencetothenon-staticmethodfindViewById(int)fromthetypeActivity我知道我不能对非静态方法进行静态引用。我试图删除所有静态引用,但这给了我其他错误。我的代码如下。您能帮我提供一些示例代码,说明我如何才能完成这项工作吗?错误出在我尝试将结果放入EditTex

android - react-native android assembleDebug日志: Unknown source file : warning: string 'catalyst_debugjs' has no default translation

测试一个新的react-native项目:react-nativeinitreact-native运行-android日志:...:app:bundleDebugJsAndAssetsSKIPPED:app:processDebugManifest:app:processDebugResourcesUnknownsourcefile:warning:string'catalyst_debugjs'hasnodefaulttranslation.Unknownsourcefile:warning:string'catalyst_element_inspector'hasnodefault

android - Android 2.2 上的 CSS3 动画闪烁(webkit-transform :translate(. .) scale(..) 同时)

我在Android上做了一些关于CSS3动画的研究(使用webkit-transition进行转换)。CSS3动画仍然是Webkit中的实验性功能。如果您尝试同时进行平移和缩放,您会在CSS动画中发现一些故障和/或错误(例如,请参阅http://www.youtube.com/watch?v=vZdBVzN1B8Y)。换句话说,在许多版本的Android中,属性-webkit-transform:matrix(...)无法正常工作。同时获得缩放和平移的唯一正确方法是设置“-webkit-transform:scale(...)translate(...)”按此顺序强>.我将在这篇文章的

android - Gradle 不会将 gdbserver 打包成 apk。 ndk-gdb 结果为 "ERROR: Non-debuggable application installed on the target device"

在AndroidStudio0.6中,我创建了一个android测试项目,其中包含一个用JNI封装的非常简单的C函数。我在AndroidManifest.xml中设置了android:debuggable="true"。我运行了ndk-buildNDK_DEBUG=1。这会在正确的位置生成一个gdbserver和一个gdb.setup文件。但是,当我在AndroidStudio中构建项目并运行ndk-gdb--debug时,我得到了以下输出:AndroidNDKinstallationpath:/usr/local/android-ndk-r9dUsingdefaultadbcomma

安卓工作室 : Unexpected top level exception (finished with non-zero exit value 2. 。)

当我尝试调试我的Android应用程序时,我收到以下错误消息:Error:Executionfailedfortask':app:transformClassesWithDexForDebug'.com.android.build.transform.api.TransformException:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process'command'/Library/Java/JavaVirtualMachines/jdk1.8.

安卓工作室 : Translation Editor not showing Default Value and translation

我的AndroidStudio的翻译编辑器无法正常工作。如果我打开翻译编辑器确实列出了字符串的正确键,但是找不到默认值和翻译。所有键都有一个默认值,其中大多数也有一个翻译。我重新启动了AndroidStudio,执行了清理和重建,但是翻译编辑器不起作用。有什么想法或建议可以解决这个问题吗? 最佳答案 尝试文件-->使缓存无效/重新启动..它解决了我同样的问题.. 关于安卓工作室:TranslationEditornotshowingDefaultValueandtranslation,我