我的工作流程非常简单,适用于hello world应用程序并且已经为我的应用程序工作了一段时间(但现在还没有)。
cordova run --target=emulator-5554 android
chrome://inspect/#devices
标签
检查运行几秒钟然后显示: http://imgur.com/fnd5MpF(抱歉,没有足够的声誉可以直接发布图片)
如果我使用ADB adb -s emulator-5554 logcat
连接到模拟器,我会看到此错误行:
E/chromium( 3863): [ERROR:http_connection.cc(35)] Too large read data is pending: capacity=1048576, max_buffer_size=1048576, read=1048576
遇到这个问题,除了http_connection.cc代码之外在谷歌找不到任何东西(这很明显,但无论如何都没有帮助解决这个问题)
这是我的adb日志附近的错误:
I/art ( 1412): Background sticky concurrent mark sweep GC freed 4681(829KB) AllocSpace objects, 48(768KB) LOS objects, 19% free, 6MB/8MB, paused 20ms total 20ms
E/eglCodecCommon( 3863): glUtilsParamSize: unknow param 0x00000b44
E/eglCodecCommon( 3863): glUtilsParamSize: unknow param 0x00000bd0
E/chromium( 3863): [ERROR:http_connection.cc(35)] Too large read data is pending: capacity=1048576, max_buffer_size=1048576, read=1048576
E/eglCodecCommon( 3863): glUtilsParamSize: unknow param 0x00000b44
这是我的cordova构建日志:
/usr/local/bin/cordova run --target=emulator-5554 android
Running command: /Users/imac/Documents/Prog/MyApp/platforms/android/cordova/run --target=emulator-5554
ANDROID_HOME=/usr/local/Cellar/android-sdk/24.0.1/
JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Running: /Users/imac/Documents/Prog/MyApp/platforms/android/gradlew cdvBuildDebug -b /Users/imac/Documents/Prog/MyApp/platforms/android/build.gradle -PcdvBuildArch=x86 -Dorg.gradle.daemon=true
:preBuild
:compileDebugNdk UP-TO-DATE
:preDebugBuild
:checkDebugManifest
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:preBuild
:CordovaLib:preDebugBuild
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:compileDebugJava UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:packageDebugJar UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:packageDebugJniLibs UP-TO-DATE
:CordovaLib:packageDebugLocalJar UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:preReleaseBuild
:CordovaLib:copyReleaseLint UP-TO-DATE
:CordovaLib:mergeReleaseProguardFiles UP-TO-DATE
:CordovaLib:preReleaseBuild
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseAidl UP-TO-DATE
:CordovaLib:compileReleaseRenderscript UP-TO-DATE
:CordovaLib:generateReleaseBuildConfig UP-TO-DATE
:CordovaLib:generateReleaseAssets UP-TO-DATE
:CordovaLib:mergeReleaseAssets UP-TO-DATE
:CordovaLib:generateReleaseResValues UP-TO-DATE
:CordovaLib:generateReleaseResources UP-TO-DATE
:CordovaLib:packageReleaseResources UP-TO-DATE
:CordovaLib:processReleaseManifest UP-TO-DATE
:CordovaLib:processReleaseResources UP-TO-DATE
:CordovaLib:generateReleaseSources UP-TO-DATE
:CordovaLib:compileReleaseJava UP-TO-DATE
:CordovaLib:processReleaseJavaRes UP-TO-DATE
:CordovaLib:packageReleaseJar UP-TO-DATE
:CordovaLib:compileReleaseNdk UP-TO-DATE
:CordovaLib:packageReleaseJniLibs UP-TO-DATE
:CordovaLib:packageReleaseLocalJar UP-TO-DATE
:CordovaLib:packageReleaseRenderscript UP-TO-DATE
:CordovaLib:bundleRelease UP-TO-DATE
:prepareComAndroidSupportSupportV42221Library UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:compileDebugJava UP-TO-DATE
:preDexDebug UP-TO-DATE
:dexDebug UP-TO-DATE
:processDebugJavaRes UP-TO-DATE
:validateDebugSigning
:packageDebug UP-TO-DATE
:zipalignDebug UP-TO-DATE
:assembleDebug UP-TO-DATE
:cdvBuildDebug UP-TO-DATE
BUILD SUCCESSFUL
Total time: 5.246 secs
Built the following apk(s):
/Users/imac/Documents/Prog/MyApp/platforms/android/build/outputs/apk/android-debug.apk
Installing app on emulator...
Using apk: /Users/imac/Documents/Prog/MyApp/platforms/android/build/outputs/apk/android-debug.apk
答案 0 :(得分:0)
我已经切换回21 API和以前的构建工具,现在一切似乎都运行良好。
<强>更新强> Cordova更新后来也在同样的问题上为我工作。 https://code.google.com/p/android/issues/detail?id=182123