android - Titanium:今天决定不在 Android 上显示文本

标签 android android-ndk titanium appcelerator

所以我已经为 Android 和 iOS 开发应用程序很长一段时间了。今天应该是投稿日!我一直在运行 Android 4.4.2 的 Samsung Galaxy S4 上进行所有 Android 测试。

在整个过程中我一直在使用Ti SDK 3.2.1。我注意到过去一两周有一个更新想要更新钛,但我一直忽略它,直到我发布这个版本。

所以今天我正在进行最后的测试,我的登录屏幕现在没有显示任何文字。我可以输入输入并使用所有按钮,只是看不到任何文本。

控制台还抛出一些今天才开始显示的新错误:

[WARN] :   linker: libstlport_shared.so has text relocations. This is wasting memory and is a security risk. Please fix.
[WARN] :   linker: libkroll-v8.so has text relocations. This is wasting memory and is a security risk. Please fix.
[WARN] :   linker: libtiverify.so has text relocations. This is wasting memory and is a security risk. Please fix.
[WARN] :   ApplicationPackageManager: getCSCPackageItemText()
[WARN] :   V8Object: Runtime disposed, cannot set property 'userAgent'
[ERROR] :  ViewSystem: ViewRootImpl #2 Surface is not valid.

那些奇怪的“链接器”错误。这只是今天开始显示。因此,我尝试通过更新到新的 Ti SDK 3.2.2 来解决这个问题。我解决了这个问题,更新了所有 android SDK,更新了 android NDK,仍然是同样的事情。

我已经清理了该项目,将其从手机中完全删除,重新启动了手机、我的电脑等等。

但是,我可以在我拥有的旧 Android 设备上看到文本。它是 n samsung galaxy stellar,当我编译时我没有得到这些错误。

谁能想到这里发生了什么以及为什么它在没有 SDK 更新后今天才开始发生?

我可以毫无问题地输入这两个字段。我看不到任何文字。另外,我按钮上的文字神奇地消失了。

yay android...

编辑 2 我认为这与 tiapp.xml

中的屏幕密度设置有关

如果我改变:

<android xmlns:android="http://schemas.android.com/apk/res/android">
    <manifest>
        <uses-sdk android:targetSdkVersion="11"/>
        <supports-screens android:anyDensity="false"
            android:largeScreens="true" android:normalScreens="true"
            android:smallScreens="true" android:xlargeScreens="true"/>
    </manifest>
</android>

为此:

<android xmlns:android="http://schemas.android.com/apk/res/android">
    <manifest>
        <uses-sdk android:targetSdkVersion="11"/>
        <supports-screens android:anyDensity="true"
            android:largeScreens="true" android:normalScreens="true"
            android:smallScreens="true" android:xlargeScreens="true"/>
    </manifest>
</android>

我的文字再次出现。屏幕上的其他元素现在看起来更小了..yay android...

最佳答案

你能发布一些你的文本字段代码吗?仅通过错误消息和 tiapp.xml 无法帮助您排除故障。

此外,我会尝试删除您工作区中的构建文件夹。然后为了更好的衡量,只需执行“项目”->“清理”命令并再次运行。

关于android - Titanium:今天决定不在 Android 上显示文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22546443/

相关文章:

android,可绘制资源加载到内存?

android - 上传多张图片等待完成后再返回,android和firebase

android - C++库交叉编译

javascript - 正则表达式的逆 (JavaScript/Titanium)

javascript - 如何设置 Android 应用程序的默认语言? (加速器)

android - Material android 芯片在 xml 布局中膨胀时崩溃

php - 写入在线mysql数据库

android - NDK 如何在发布时删除 Log Debug 语句

android - 如何在 Android 中使用 JNI 将 Assets FileDescriptor 正确传递给 FFmpeg

ios - 钛开发者 : iPhone SDK "loading" never finishes on mobile SDK 1. 6.2 和 1.7.0 RC1