- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在使用 crosswalk-lite 启动 ionic 应用程序,但它不能同时在真实设备和 genymotion 上运行。
ionic start myApp tabs
npm install
bower install
ionic serve # <-- I test on browser & it's work
ionic browser add crosswalk-lite
ionic build android # <-- success to compile
ionic run android # <-- run on genymotion, and it's crash
当我执行 adb logcat
时,它显示错误 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ionicframework.myapp}
我用:
插件:
有什么想法吗?
更新:
这是我的AndroidManifest.xml
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="com.ionicframework.vellfire661565" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="@string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:exported="true" android:name="com.plugin.gcm.PushHandlerActivity" />
<receiver android:name="com.plugin.gcm.CordovaGCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.ionicframework.vellfire661565" />
</intent-filter>
</receiver>
<service android:name="com.plugin.gcm.GCMIntentService" />
</application>
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="com.ionicframework.vellfire661565.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.ionicframework.vellfire661565.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>
这是我的config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.ionicframework.vellfire661565" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>SS Shop</name>
<description>
SS Shop.
</description>
<author email="" href="">
Silviana Suteja
</author>
<content src="index.html" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<feature name="File Transfer">
<param name="id" value="org.apache.cordova.file-transfer" />
</feature>
<feature name="Toast">
<param name="id" value="nl.x-services.plugins.toast" />
</feature>
<feature name="PushPlugin">
<param name="id" value="com.phonegap.plugins.PushPlugin" />
<param name="url" value="https://github.com/phonegap-build/PushPlugin.git" />
</feature>
<feature name="AppVersion">
<param name="id" value="uk.co.whiteoctober.cordova.appversion" />
<param name="url" value="https://github.com/whiteoctober/cordova-plugin-app-version.git" />
</feature>
<feature name="Network Information">
<param name="id" value="org.apache.cordova.network-information" />
</feature>
<platform name="android">
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resourc es/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<icon src="resources/android/icon/drawable-xhdpi-icon.png" />
<allow-navigation href="*" />
<allow-intent href="*" />
<access origin="*" />
<feature name="Media Refresher">
<param name="id" value="com.metacube.metacampus.mediarefresher" />
<param name="url" value="https://github.com/saurabhgupta050890/Media-Refresher-Cordova.git" />
</feature>
</widget>
更新 2:
adb logcat
返回:
W/InputMethodManagerService( 313): Window already focused, ignoring focus gain
of: com.android.internal.view.IInputMethodClient$Stub$Proxy@53864848 attribute=n
ull
W/genymotion_audio( 125): out_write() limiting sleep time 81156 to 39909
W/genymotion_audio( 125): out_write() limiting sleep time 62426 to 39909
I/ActivityManager( 313): START {act=android.intent.action.MAIN cat=[android.int
ent.category.LAUNCHER] flg=0x10200000 cmp=com.ionicframework.vellfire661565/.Mai
nActivity u=0} from pid 484
E/SocketStream( 122): readFully was waiting for 764896 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 715744 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 666592 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 617440 bytes, got 16384
E/SocketStream( 122): readFully was waiting for 601056 bytes, got 87280
E/SocketStream( 122): readFully was waiting for 513776 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 464624 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 415472 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 366320 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 317168 bytes, got 294912
E/SocketStream( 122): readFully was waiting for 22256 bytes, got 16384
D/dalvikvm( 313): GC_FOR_ALLOC freed 746K, 11% free 15401K/17159K, paused 10ms,
total 10ms
D/dalvikvm( 1054): Late-enabling CheckJNI
I/ActivityManager( 313): Start proc com.ionicframework.vellfire661565 for activ
ity com.ionicframework.vellfire661565/.MainActivity: pid=1054 uid=10048 gids={30
03, 1015, 1028}
I/qtaguid ( 313): Failed write_ctrl(s 1 10048) res=-1 errno=1
W/NetworkManagementSocketTagger( 313): setKernelCountSet(10048, 1) failed with
errno -1
D/OpenGLRenderer( 484): TextureCache::flush: target size: 651434
D/OpenGLRenderer( 484): TextureCache::callback: name, removed size, mSize = 592
, 59536, 1026188
D/OpenGLRenderer( 484): TextureCache::callback: name, removed size, mSize = 593
, 204880, 821308
D/OpenGLRenderer( 484): TextureCache::callback: name, removed size, mSize = 594
, 204880, 616428
I/CordovaLog( 1054): Changing log level to DEBUG(3)
D/AndroidRuntime( 1054): Shutting down VM
W/dalvikvm( 1054): threadid=1: thread exiting with uncaught exception (group=0xa
624f288)
E/AndroidRuntime( 1054): FATAL EXCEPTION: main
E/AndroidRuntime( 1054): java.lang.RuntimeException: Unable to start activity Co
mponentInfo{com.ionicframework.vellfire661565/com.ionicframework.vellfire661565.
MainActivity}: java.lang.RuntimeException: Failed to create webview.
E/AndroidRuntime( 1054): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2059)
E/AndroidRuntime( 1054): at android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2084)
E/AndroidRuntime( 1054): at android.app.ActivityThread.access$600(Activit
yThread.java:130)
E/AndroidRuntime( 1054): at android.app.ActivityThread$H.handleMessage(Ac
tivityThread.java:1195)
E/AndroidRuntime( 1054): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 1054): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1054): at android.app.ActivityThread.main(ActivityThrea
d.java:4745)
E/AndroidRuntime( 1054): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 1054): at java.lang.reflect.Method.invoke(Method.java:5
11)
E/AndroidRuntime( 1054): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:786)
E/AndroidRuntime( 1054): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:553)
E/AndroidRuntime( 1054): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1054): Caused by: java.lang.RuntimeException: Failed to create
webview.
E/AndroidRuntime( 1054): at org.apache.cordova.CordovaWebViewImpl.createE
ngine(CordovaWebViewImpl.java:83)
E/AndroidRuntime( 1054): at org.apache.cordova.CordovaActivity.makeWebVie
wEngine(CordovaActivity.java:192)
E/AndroidRuntime( 1054): at org.apache.cordova.CordovaActivity.makeWebVie
w(CordovaActivity.java:188)
E/AndroidRuntime( 1054): at org.apache.cordova.CordovaActivity.init(Cordo
vaActivity.java:136)
E/AndroidRuntime( 1054): at org.apache.cordova.CordovaActivity.loadUrl(Co
rdovaActivity.java:210)
E/AndroidRuntime( 1054): at com.ionicframework.vellfire661565.MainActivit
y.onCreate(MainActivity.java:32)
E/AndroidRuntime( 1054): at android.app.Activity.performCreate(Activity.j
ava:5008)
E/AndroidRuntime( 1054): at android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1079)
E/AndroidRuntime( 1054): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2023)
E/AndroidRuntime( 1054): ... 11 more
E/AndroidRuntime( 1054): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime( 1054): at java.lang.reflect.Constructor.constructNative
(Native Method)
E/AndroidRuntime( 1054): at java.lang.reflect.Constructor.newInstance(Con
structor.java:417)
E/AndroidRuntime( 1054): at org.apache.cordova.CordovaWebViewImpl.createE
ngine(CordovaWebViewImpl.java:81)
E/AndroidRuntime( 1054): ... 19 more
E/AndroidRuntime( 1054): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 1054): at org.xwalk.core.XWalkPreferences.setValue(XWal
kPreferences.java:106)
E/AndroidRuntime( 1054): at org.crosswalk.engine.XWalkCordovaView.setGlob
alPrefs(XWalkCordovaView.java:41)
E/AndroidRuntime( 1054): at org.crosswalk.engine.XWalkCordovaView.<init>(
XWalkCordovaView.java:50)
E/AndroidRuntime( 1054): at org.crosswalk.engine.XWalkWebViewEngine.<init
>(XWalkWebViewEngine.java:56)
E/AndroidRuntime( 1054): ... 22 more
W/ActivityManager( 313): Force finishing activity com.ionicframework.vellfire
661565/.MainActivity
E/SocketStream( 122): readFully was waiting for 764896 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 715744 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 666592 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 617440 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 568288 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 519136 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 469984 bytes, got 245760
E/SocketStream( 122): readFully was waiting for 224224 bytes, got 16384
E/SocketStream( 122): readFully was waiting for 207840 bytes, got 13804
E/SocketStream( 122): readFully was waiting for 194036 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 144884 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 95732 bytes, got 49152
E/SocketStream( 122): readFully was waiting for 46580 bytes, got 32768
D/dalvikvm( 313): GC_FOR_ALLOC freed 540K, 11% free 15377K/17159K, paused 12ms,
total 12ms
E/Genymotion( 313): Could not open '/sys/class/power_supply/genymotion_fake_pat
h/present'
W/ActivityManager( 313): Activity pause timeout for ActivityRecord{5385639c com
.ionicframework.vellfire661565/.MainActivity}
W/EGL_genymotion( 484): eglSurfaceAttrib not implemented
I/qtaguid ( 313): Failed write_ctrl(s 0 10048) res=-1 errno=1
W/NetworkManagementSocketTagger( 313): setKernelCountSet(10048, 0) failed with
errno -1
E/Genymotion( 313): Could not open '/sys/class/power_supply/genymotion_fake_pat
h/present'
E/Genymotion( 313): Could not open '/sys/class/power_supply/genymotion_fake_pat
h/present'
W/ActivityManager( 313): Activity destroy timeout for ActivityRecord{5385639c c
om.ionicframework.vellfire661565/.MainActivity}
最佳答案
我试过你的步骤,效果很好。
我有:- Cordova 5.3.1- ionic 版本 1.1.0- ionic CLI 版本 1.6.4
您应该尝试更新并查看它是否有效。
关于android - Ionic starter 无法在 crosswalk-lite 上运行 : Unable to start activity ComponentInfo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30452079/
因为谷歌发布了几篇关于移动设备联邦学习的论文,比如Gboard,但是我在TFLite网站上找不到关于训练的文档,TFLite现在支持设备训练吗? 最佳答案 我们不支持在 TensorFlow Lite
我正在尝试创建一个饼图,其中弧按大小(顺时针)排序,但不知道如何排序。 看来“theta”中的“sort”参数指向“color”的默认顺序,例如: { "$schema": "https://ve
就像这个: https://www.r-graph-gallery.com/265-grouped-boxplot-with-ggplot2/ 我尝试了刻面、颜色 channel 和构图, 但结果并不
我试图在折线图中显示一些数据。但是,我的“Harvest_Year”数据(以年为单位的日期,如 2017 年或 2018 年)显示为我认为是一个字符串 我从 .csv 文件导入数据,以下是我将字符串更
VegaLite 自动分配颜色。金价是蓝色,银价是橙色,感觉不对。 如何指定显式颜色 - #F1C40F黄金和 #95A5A6为了银? 我也想保留data.values如下面的示例代码 - 作为一组单
我正在 Vega-Lite(使用 Altair 生成)中绘制条形图。使用 Vega-View API,我编写了一些代码,用户可以在其中选择条形,这会更改这些条形的颜色(以及在应用程序的其他地方做一些其
我想注册一个自定义 Multi-Hue Sequential Color Scheme在织女星精简版。 我对文档的阅读是我只能创建 config.range对象来设置自定义色阶,但无法公开插值函数,从
最近几天我一直在尝试重命名我的 vega-lite 图表上的图例标签。 通常,这些标签与其各自的数据字段名称匹配。我有一个案例,我想给它们一个更具描述性的名称,但不重命名原始数据名称。 一个简化的例子
如何在 VegaLite 中使用数组数据? 我想将数据用作数组 dates = [1, 2, 3] prices1 = [1, 2, 1] prices2 = [1.5, 1, 2] 代替 Veg
我有一个非常简单的情况,我相信我的解决方案太复杂了,很有可能我遗漏了一些东西。说我有 time 的措施,位置(x,y,z),角度(滚动,俯仰,偏航)和速度。我想要一个简单的可视化,就像我目前拥有的那样
我似乎无法通过阅读文档来弄清楚这一点。 有没有办法实现 onClick我的任何标记的事件处理程序? 最佳答案 由于 Vega-Lite 尚不支持信号,您可以修补生成的 Vega。您可以向已编译的 Ve
我正在尝试制作一个简单的堆积条形图,仅在 X 轴上。我让它工作,有两个值 50 和 250。所以 X 轴的最大值显示为 300。 如何将其强制为另一个值,例如 500?那么从最后一个值到轴的末端是否存
我可以设置字体吗?在 vega-lite's config object , 用于所有标签和标题? 我目前为 x&y 轴和颜色图例设置了 labelFont 和 titleFont,但它在任何地方都是
在 Vega Lite 中,我试图将我的图例与这张图表的中间对齐。我需要图例的 anchor 参数,但我只能找到 titleAnchor。 Chart with Legend "legend": {
我可以设置字体吗?在 vega-lite's config object , 用于所有标签和标题? 我目前为 x&y 轴和颜色图例设置了 labelFont 和 titleFont,但它在任何地方都是
在 Vega Lite 中,我试图将我的图例与这张图表的中间对齐。我需要图例的 anchor 参数,但我只能找到 titleAnchor。 Chart with Legend "legend": {
我直接从 getmdl.io(组件页面)和所有设备(多台 PC、浏览器、手机等)复制代码,汉堡菜单不在标题中居中。我似乎无法隔离 css 中的菜单图标来重新对齐它。 getmdl.io 上的所有组件代
我正在使用 vega-lite 将一些数据渲染到 map 上。目前,我有这个架构,它呈现附加的图像: { "title": "What's the nearest city to you?",
我正在使用 Angular 4 构建一个 Web 应用程序。对于设计,我使用的是 Material Design lite。但是,我想使用 MDL 实现一个交互式轮播,它给我流畅的外观和感觉,并且与我
它看起来像 Polymer Starter Kit包含比 Material Design Lite 更多的组件,并且现在可用。由于两者都是符合 Material Design 理念的 Google 项
我是一名优秀的程序员,十分优秀!