javascript-图像不会在Titan Build Android应用程序中显示

javascript-图像不会在Titan Build Android应用程序中显示,第1张

概述虽然代码在iOS设备上运行时效果很好,但是当我为android构建图像时却无法显示.图像是navbar.png&menubuttonimage.png,到目前为止,我已经将它们复制到几乎每个文件夹中控制台日志[INFO]CompilingAndroidResources...Thiscouldtakesometime[DEBUG]"/androidsdk/sdk/bu

虽然代码在iOS设备上运行时效果很好,但是当我为android构建图像时却无法显示.图像是navbar.png& menubuttonimage.png,到目前为止,我已经将它们复制到几乎每个文件夹中

控制台日志

[INFO] Compiling AndroID Resources... This Could take some time[DEBUG] "/androID sdk/sdk/build-tools/17.0.0/dx" -JXmx1536M -JXX:-UseGCOverheadlimit --dex --output=/Users/daanluttik/documents/Titanium_Studio_Workspace/OuderKonnect/build/androID/bin/classes.dex /Users/daanluttik/documents/Titanium_Studio_Workspace/OuderKonnect/build/androID/bin/classes "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/kroll-v8.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/jaxen-1.1.1.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/modules/titanium-media.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/modules/titanium-platform.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/modules/titanium-ui.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/modules/titanium-analytics.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/modules/titanium-app.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/modules/titanium-androID.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/kroll-common.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/modules/titanium-filesystem.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/modules/titanium-locale.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/ti-commons-codec-1.3.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/androID-support-v4.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/lib/titanium-verify.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/lib/titanium-deBUG.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/lib/titanium-profiler.jar" "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/modules/titanium-network.jar"[DEBUG] AndroID classes.dex built[DEBUG] "/androID sdk/sdk/build-tools/17.0.0/aapt" package -f -M AndroIDManifest.xml -A /Users/daanluttik/documents/Titanium_Studio_Workspace/OuderKonnect/build/androID/bin/assets -S res -I "/androID sdk/sdk/platforms/androID-10/androID.jar" -I "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar" -F /Users/daanluttik/documents/Titanium_Studio_Workspace/OuderKonnect/build/androID/bin/app.ap_[DEBUG] creating unsigned apk: /Users/daanluttik/documents/Titanium_Studio_Workspace/OuderKonnect/build/androID/bin/app-unsigned.apk[DEBUG] from resource zip => assets/Resources/images/menubuttonimage.png[DEBUG] from resource zip => assets/Resources/images/navbar.png[DEBUG] from resource zip => assets/Resources/statics/Statics.Js[DEBUG] from resource zip => assets/Resources/utils/Navigation.Js[DEBUG] from resource zip => assets/Resources/utils/NavigationController.Js[DEBUG] from resource zip => assets/Resources/vIEws/vIEwParts/Navigationbar.Js[DEBUG] from resource zip => assets/Resources/vIEws/vIEwParts/SlIDeMenu.Js[DEBUG] from resource zip => assets/Resources/vIEws/FotoAlbum.Js[DEBUG] from resource zip => assets/Resources/vIEws/Schriftje.Js[DEBUG] from resource zip => assets/Resources/vIEws/VIEwBase.Js[DEBUG] from resource zip => assets/Resources/KS_nav_ui.png[DEBUG] from resource zip => assets/Resources/KS_nav_vIEws.png[DEBUG] from resource zip => assets/Resources/app.Js[DEBUG] from resource zip => assets/Resources/appicon.png[DEBUG] from resource zip => assets/Resources/default.png[DEBUG] from resource zip => assets/Resources/menubuttonimage.png[DEBUG] from resource zip => assets/Resources/navbar.png[DEBUG] from resource zip => assets/app.Json[DEBUG] from resource zip => assets/index.Json[DEBUG] from resource zip => res/drawable/appicon.png[DEBUG] from resource zip => res/drawable/background.png[DEBUG] from resource zip => res/drawable/btn_check_buttonless_on_64.png[DEBUG] from resource zip => res/drawable/btn_more_64.png[DEBUG] from resource zip => res/drawable/disclosure_64.png[DEBUG] from resource zip => res/layout/titanium_tabgroup.xml[DEBUG] from resource zip => res/layout/titanium_ui_List_header_or_footer.xml[DEBUG] from resource zip => res/layout/titanium_ui_List_item.xml[DEBUG] from resource zip => AndroIDManifest.xml[DEBUG] from resource zip => resources.arsc[DEBUG] from resource zip => res/drawable-long-land-hdpi/background.png[DEBUG] from resource zip => res/drawable-long-land-hdpi/menubuttonimage_aa179f5596.png[DEBUG] from resource zip => res/drawable-long-land-hdpi/navbar_e8e9044f98.png[DEBUG] from resource zip => res/drawable-long-land-ldpi/background.png[DEBUG] from resource zip => res/drawable-long-land-ldpi/menubuttonimage_aa179f5596.png[DEBUG] from resource zip => res/drawable-long-land-ldpi/navbar_e8e9044f98.png[DEBUG] from resource zip => res/drawable-long-port-hdpi/background.png[DEBUG] from resource zip => res/drawable-long-port-hdpi/menubuttonimage_aa179f5596.png[DEBUG] from resource zip => res/drawable-long-port-hdpi/navbar_e8e9044f98.png[DEBUG] from resource zip => res/drawable-long-port-ldpi/background.png[DEBUG] from resource zip => res/drawable-long-port-ldpi/menubuttonimage_aa179f5596.png[DEBUG] from resource zip => res/drawable-long-port-ldpi/navbar_e8e9044f98.png[DEBUG] from resource zip => res/drawable-notlong-land-hdpi/background.png[DEBUG] from resource zip => res/drawable-notlong-land-hdpi/menubuttonimage_aa179f5596.png[DEBUG] from resource zip => res/drawable-notlong-land-hdpi/navbar_e8e9044f98.png[DEBUG] from resource zip => res/drawable-notlong-land-ldpi/background.png[DEBUG] from resource zip => res/drawable-notlong-land-ldpi/menubuttonimage_aa179f5596.png[DEBUG] from resource zip => res/drawable-notlong-land-ldpi/navbar_e8e9044f98.png[DEBUG] from resource zip => res/drawable-notlong-land-mdpi/background.png[DEBUG] from resource zip => res/drawable-notlong-land-mdpi/menubuttonimage_aa179f5596.png[DEBUG] from resource zip => res/drawable-notlong-land-mdpi/navbar_e8e9044f98.png[DEBUG] from resource zip => res/drawable-notlong-port-hdpi/background.png[DEBUG] from resource zip => res/drawable-notlong-port-hdpi/menubuttonimage_aa179f5596.png[DEBUG] from resource zip => res/drawable-notlong-port-hdpi/navbar_e8e9044f98.png[DEBUG] from resource zip => res/drawable-notlong-port-ldpi/background.png[DEBUG] from resource zip => res/drawable-notlong-port-ldpi/menubuttonimage_aa179f5596.png[DEBUG] from resource zip => res/drawable-notlong-port-ldpi/navbar_e8e9044f98.png[DEBUG] from resource zip => res/drawable-notlong-port-mdpi/background.png[DEBUG] from resource zip => res/drawable-notlong-port-mdpi/menubuttonimage_aa179f5596.png[DEBUG] from resource zip => res/drawable-notlong-port-mdpi/navbar_e8e9044f98.png[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/modules/titanium-ui.jar => ti/modules/titanium/ui/Widget/webvIEw/binding.Js[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/modules/titanium-ui.jar => ti/modules/titanium/ui/Widget/webvIEw/binding.min.Js[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/modules/titanium-ui.jar => ti/modules/titanium/ui/Widget/webvIEw/Json2.Js[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/modules/titanium-ui.jar => ti/modules/titanium/ui/Widget/webvIEw/polling.Js[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/modules/titanium-ui.jar => ti/modules/titanium/ui/Widget/webvIEw/polling.min.Js[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/build.propertIEs[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/res/drawable/background.png[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/res/drawable/btn_check_buttonless_on.png[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/res/drawable/btn_check_buttonless_on_18.png[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/res/drawable/btn_check_buttonless_on_48.png[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/res/drawable/btn_check_buttonless_on_64.png[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/res/drawable/btn_more.png[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/res/drawable/btn_more_18.png[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/res/drawable/btn_more_48.png[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/res/drawable/btn_more_64.png[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/res/drawable/btn_picker_normal.9.png[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/res/drawable/btn_picker_pressed.9.png[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/res/drawable/btn_picker_selected.9.png[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/res/drawable/default_icon.png[DEBUG] from JAR /Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/titanium.jar => org/appcelerator/titanium/res/drawable/photoDefault.png[DEBUG] installing native SDK libs[DEBUG] keytool -v -List -keystore "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/dev_keystore" -storepass ******* -alias tIDev[DEBUG] jarsigner -sigalg MD5withRSA -digestalg SHA1 -storepass ******* -keystore "/Users/daanluttik/library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/androID/dev_keystore" -signedjar /Users/daanluttik/documents/Titanium_Studio_Workspace/OuderKonnect/build/androID/bin/app.apk /Users/daanluttik/documents/Titanium_Studio_Workspace/OuderKonnect/build/androID/bin/app-unsigned.apk tIDev[DEBUG] "/androID sdk/sdk/tools/zipalign" -v 4 /Users/daanluttik/documents/Titanium_Studio_Workspace/OuderKonnect/build/androID/bin/app.apk /Users/daanluttik/documents/Titanium_Studio_Workspace/OuderKonnect/build/androID/bin/app.apkz[DEBUG] "/androID sdk/sdk/platform-tools/adb" -d get-state[DEBUG] Waiting for device to be ready ...[TRACE] adb devices returned 1 devices/emulators[DEBUG] Device connected... (waited 0 seconds)[DEBUG] waited 0.017152 seconds on emulator to get ready[INFO] Installing application on device[DEBUG] "/androID sdk/sdk/platform-tools/adb" -d install -r /Users/daanluttik/documents/Titanium_Studio_Workspace/OuderKonnect/build/androID/bin/app.apk[INFO] Application installed. Launch from drawer on Home Screen[INFO] :   Project built successfully in 41s 853ms[INFO] :   Launching application on device: /androID sdk/sdk/platform-tools/adb "-d" "shell" "am" "start" "-a" "androID.intent.action.MAIN" "-c" "androID.intent.category.LAUNCHER" "-n" "com.konnect.ouderkonnect/.OuderkonnectActivity" "-f" "0x10200000"Starting: Intent { act=androID.intent.action.MAIN cat=[androID.intent.category.LAUNCHER] flg=0x10200000 cmp=com.konnect.ouderkonnect/.OuderkonnectActivity }[INFO] :   App installer shutdown successfully

码:

self.background = Ti.UI.createImageVIEw(    {        top : '0dp',        left : '0dp',        wIDth : '100%',        height : '50dp',        image : 'navbar.png',        backgroundImage : 'navbar.png',        //backgroundcolor:'black'    });    self.add(self.background);    var label = Ti.UI.createImageVIEw(    {        top : '10dp',        left : '10dp',        wIDth : '30dp',        height : '30dp',        image : 'menubuttonimage.png',        backgroundImage : 'menubuttonimage.png',        //backgroundcolor:'red'    });

解决方法:

使用图像的绝对路径,这样它们就可以在AndroID和iOS平台上使用.在您的情况下,只需在文件名前添加“ /”即可.

self.background = Ti.UI.createImageVIEw({    top : '0dp',    left : '0dp',    wIDth : '100%',    height : '50dp',    image : '/navbar.png',    backgroundImage : '/navbar.png',});self.add(self.background);var label = Ti.UI.createImageVIEw({    top : '10dp',    left : '10dp',    wIDth : '30dp',    height : '30dp',    image : '/menubuttonimage.png',    backgroundImage : '/menubuttonimage.png',});
总结

以上是内存溢出为你收集整理的javascript-图像不会在Titan Build Android应用程序中显示全部内容,希望文章能够帮你解决javascript-图像不会在Titan Build Android应用程序中显示所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1211291.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-04
下一篇 2022-06-04

发表评论

登录后才能评论

评论列表(0条)

保存