无法在 android Samsung Galaxy s6 上启动 Phonegap 应用程序
Can't get Phonegap app to launch on android Samsung Galaxy s6
我有一个应用程序,我之前已经在 Google Play 商店和 iTunes 上发布了,但是我们已经有大约 6 个月没有制作新版本了。使用以前的版本,我在 Android 设备上安装时从未遇到过任何问题。我的方法很简单,只需将 apk 通过电子邮件发送给自己,然后单击它,每次都会加载。现在,该方法不起作用。该应用程序安装但当它打开时我只收到一条消息说“不幸的是,已停止。
经过大量研究和多次失败尝试后,我终于弄清楚了如何使用此命令通过命令行进行安装:
phonegap run android --device --verbose
这至少给了我比以前更多的信息。以下是该命令的全部输出(在退出前只是挂起几分钟:
No scripts found for hook "before_run".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform android
Checking config.xml for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in android platform
No differences found between plugins added to project and installed in android platform. Continuing...
Generating platform-specific config.xml from defaults for android at /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/res/xml/config.xml
Merging project's config.xml into platform-specific android config.xml
Merging and updating files from [www, platforms/android/platform_www] to platforms/android/assets/www
Wrote out android application name "CraftsmanRepublic" to /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/res/values/strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.3.5): 10305
Wrote out Android package name "com.m2.velexo" to /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/src/com/m2/velexo/MainActivity.java
Found extra default icon: www/res/icon/android/icon-48-mdpi.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Found extra default icon: www/res/icon/android/icon-72-hdpi.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Found extra default icon: www/res/icon/android/icon-96-xhdpi.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Found extra default icon: www/res/icon/blackberry/icon-80.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Found extra default icon: www/res/icon/blackberry/icon-80.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Found extra default icon: www/res/icon/webos/icon-64.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Found extra default icon: www/res/icon/windows-phone/icon-48.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Found extra default icon: www/res/icon/windows-phone/icon-173-tile.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Updating icons at platforms/android/res
Updating splash screens at platforms/android/res
This app does not have additional resource files defined
Prepared android project successfully
Executing script found in hooks directory for hook "after_prepare": hooks/after_prepare/node_modules
Skipped directory "/Users/dallascaley/Sites/scotch-box/velexo-mobile/hooks/after_prepare/node_modules" within hook directory
Executing script found in hooks directory for hook "after_prepare": hooks/after_prepare/update_platform_config.js
Running command: /Users/dallascaley/Sites/scotch-box/velexo-mobile/hooks/after_prepare/update_platform_config.js /Users/dallascaley/Sites/scotch-box/velexo-mobile
TypeError: _.keyBy is not a function
TypeError: Cannot read property 'permissions' of undefined
TypeError: _.keyBy is not a function
Command finished with error code 0: /Users/dallascaley/Sites/scotch-box/velexo-mobile/hooks/after_prepare/update_platform_config.js /Users/dallascaley/Sites/scotch-box/velexo-mobile
Running command: /usr/libexec/java_home
Command finished with error code 0: /usr/libexec/java_home
ANDROID_HOME=/Users/dallascaley/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
Subproject Path: CordovaLib
Running command: /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/gradlew cdvBuildDebug -b /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_648tt8e3eddnib21cv5hmdpsm.run(/Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build.gradle:139)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild
UP-TO-DATE
:preDebugBuild
UP-TO-DATE
:checkDebugManifest
:preReleaseBuild
UP-TO-DATE
:CordovaLib:preBuild
UP-TO-DATE
:CordovaLib:preDebugBuild
UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl
UP-TO-DATE
:CordovaLib:compileDebugNdk
UP-TO-DATE
:CordovaLib:compileLint UP-TO-DATE
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:compileDebugRenderscript
UP-TO-DATE
:CordovaLib:generateDebugResValues
UP-TO-DATE
:CordovaLib:generateDebugResources
UP-TO-DATE
:CordovaLib:packageDebugResources
UP-TO-DATE
:CordovaLib:processDebugManifest
UP-TO-DATE
:CordovaLib:generateDebugBuildConfig
UP-TO-DATE
:CordovaLib:processDebugResources
UP-TO-DATE
:CordovaLib:generateDebugSources
UP-TO-DATE
:CordovaLib:incrementalDebugJavaCompilationSafeguard
UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac
UP-TO-DATE
:CordovaLib:processDebugJavaRes
UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug
UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
UP-TO-DATE
:CordovaLib:mergeDebugJniLibFolders
UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug
UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug
UP-TO-DATE
:CordovaLib:bundleDebug
UP-TO-DATE
:CordovaLib:preReleaseBuild
UP-TO-DATE
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseAidl
UP-TO-DATE
:CordovaLib:compileReleaseNdk
UP-TO-DATE
:CordovaLib:copyReleaseLint
UP-TO-DATE
:CordovaLib:mergeReleaseShaders
UP-TO-DATE
:CordovaLib:compileReleaseShaders
UP-TO-DATE
:CordovaLib:generateReleaseAssets
UP-TO-DATE
:CordovaLib:mergeReleaseAssets
UP-TO-DATE
:CordovaLib:mergeReleaseProguardFiles
UP-TO-DATE
:CordovaLib:packageReleaseRenderscript
UP-TO-DATE
:CordovaLib:compileReleaseRenderscript
UP-TO-DATE
:CordovaLib:generateReleaseResValues
UP-TO-DATE
:CordovaLib:generateReleaseResources UP-TO-DATE
:CordovaLib:packageReleaseResources
UP-TO-DATE
:CordovaLib:processReleaseManifest
UP-TO-DATE
:CordovaLib:generateReleaseBuildConfig
UP-TO-DATE
:CordovaLib:processReleaseResources
UP-TO-DATE
:CordovaLib:generateReleaseSources
UP-TO-DATE
:CordovaLib:incrementalReleaseJavaCompilationSafeguard
UP-TO-DATE
:CordovaLib:compileReleaseJavaWithJavac
UP-TO-DATE
:CordovaLib:processReleaseJavaRes
UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForRelease
UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
UP-TO-DATE
:CordovaLib:mergeReleaseJniLibFolders
UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForRelease
UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForRelease
UP-TO-DATE
:CordovaLib:bundleRelease
UP-TO-DATE
:prepareComAndroidSupportSupportV132340Library
UP-TO-DATE
:prepareComAndroidSupportSupportV42340Library
UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBase1104Library
UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBasement1104Library
UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesGcm1104Library
UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesIid1104Library
UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesTasks1104Library
UP-TO-DATE
:prepareMeLeolinShortcutBadger1119Library
UP-TO-DATE
:prepareOrgApacheCordovaCordovaLib622DebugLibrary
UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl
UP-TO-DATE
:compileDebugRenderscript
UP-TO-DATE
:generateDebugBuildConfig
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
:incrementalDebugJavaCompilationSafeguard
UP-TO-DATE
:compileDebugJavaWithJavac
UP-TO-DATE
:compileDebugNdk
UP-TO-DATE
:compileDebugSources UP-TO-DATE
:mergeDebugShaders
UP-TO-DATE
:compileDebugShaders
UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets
UP-TO-DATE
:transformClassesWithDexForDebug
UP-TO-DATE
:mergeDebugJniLibFolders
UP-TO-DATE
:transformNative_libsWithMergeJniLibsForDebug
UP-TO-DATE
:processDebugJavaRes
UP-TO-DATE
:transformResourcesWithMergeJavaResForDebug
UP-TO-DATE
:validateSigningDebug
:packageDebug
UP-TO-DATE
:assembleDebug UP-TO-DATE
:cdvBuildDebug
UP-TO-DATE
BUILD SUCCESSFUL
Total time: 1.802 secs
Command finished with error code 0: /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/gradlew cdvBuildDebug,-b,/Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Dorg.gradle.jvmargs=-Xmx2048m,-Pandroid.useDeprecatedNdk=true
Built the following apk(s):
/Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build/outputs/apk/android-debug.apk
No scripts found for hook "before_deploy".
ANDROID_HOME=/Users/dallascaley/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
Running command: adb devices
Command finished with error code 0: adb devices
Running adb shell command "cat /proc/cpuinfo" on target 1215fc3807890504...
Running command: adb -s 1215fc3807890504 shell cat /proc/cpuinfo
Command finished with error code 0: adb -s,1215fc3807890504,shell,cat,/proc/cpuinfo
Skipping build...
Built the following apk(s):
/Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build/outputs/apk/android-debug.apk
Using apk: /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build/outputs/apk/android-debug.apk
Package name: com.m2.velexo
Installing apk /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build/outputs/apk/android-debug.apk on target 1215fc3807890504...
Running command: adb -s 1215fc3807890504 install -r /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build/outputs/apk/android-debug.apk
Command finished with error code 0: adb -s,1215fc3807890504,install,-r,/Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build/outputs/apk/android-debug.apk
Running adb shell command "input keyevent 82" on target 1215fc3807890504...
Running command: adb -s 1215fc3807890504 shell input keyevent 82
Command finished with error code 0: adb -s,1215fc3807890504,shell,input,keyevent,82
Starting application "com.m2.velexo/.MainActivity" on target 1215fc3807890504...
Running adb shell command "am start -W -a android.intent.action.MAIN -ncom.m2.velexo/.MainActivity" on target 1215fc3807890504...
Running command: adb -s 1215fc3807890504 shell am start -W -a android.intent.action.MAIN -ncom.m2.velexo/.MainActivity
此时脚本挂起约5分钟,退出前显示如下:
Command finished with error code 0: adb -s,1215fc3807890504,shell,am,start,-W,-a,android.intent.action.MAIN,-ncom.m2.velexo/.MainActivity
LAUNCH SUCCESS
No scripts found for hook "after_run".
[phonegap] completed 'cordova run android --device --verbose --no-telemetry'
所以,我不知道最初的问题是什么,但我最终确实加载了我的应用程序。我这样做的方法是创建一个全新的 hello world 应用程序,然后慢慢地将我旧应用程序中的所有代码复制到其中,同时手动添加插件并在此过程中修复问题。
我有一个应用程序,我之前已经在 Google Play 商店和 iTunes 上发布了,但是我们已经有大约 6 个月没有制作新版本了。使用以前的版本,我在 Android 设备上安装时从未遇到过任何问题。我的方法很简单,只需将 apk 通过电子邮件发送给自己,然后单击它,每次都会加载。现在,该方法不起作用。该应用程序安装但当它打开时我只收到一条消息说“不幸的是,已停止。
经过大量研究和多次失败尝试后,我终于弄清楚了如何使用此命令通过命令行进行安装:
phonegap run android --device --verbose
这至少给了我比以前更多的信息。以下是该命令的全部输出(在退出前只是挂起几分钟:
No scripts found for hook "before_run".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform android
Checking config.xml for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in android platform
No differences found between plugins added to project and installed in android platform. Continuing...
Generating platform-specific config.xml from defaults for android at /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/res/xml/config.xml
Merging project's config.xml into platform-specific android config.xml
Merging and updating files from [www, platforms/android/platform_www] to platforms/android/assets/www
Wrote out android application name "CraftsmanRepublic" to /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/res/values/strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.3.5): 10305
Wrote out Android package name "com.m2.velexo" to /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/src/com/m2/velexo/MainActivity.java
Found extra default icon: www/res/icon/android/icon-48-mdpi.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Found extra default icon: www/res/icon/android/icon-72-hdpi.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Found extra default icon: www/res/icon/android/icon-96-xhdpi.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Found extra default icon: www/res/icon/blackberry/icon-80.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Found extra default icon: www/res/icon/blackberry/icon-80.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Found extra default icon: www/res/icon/webos/icon-64.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Found extra default icon: www/res/icon/windows-phone/icon-48.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Found extra default icon: www/res/icon/windows-phone/icon-173-tile.png (ignoring in favor of www/res/icon/android/icon-36-ldpi.png)
Updating icons at platforms/android/res
Updating splash screens at platforms/android/res
This app does not have additional resource files defined
Prepared android project successfully
Executing script found in hooks directory for hook "after_prepare": hooks/after_prepare/node_modules
Skipped directory "/Users/dallascaley/Sites/scotch-box/velexo-mobile/hooks/after_prepare/node_modules" within hook directory
Executing script found in hooks directory for hook "after_prepare": hooks/after_prepare/update_platform_config.js
Running command: /Users/dallascaley/Sites/scotch-box/velexo-mobile/hooks/after_prepare/update_platform_config.js /Users/dallascaley/Sites/scotch-box/velexo-mobile
TypeError: _.keyBy is not a function
TypeError: Cannot read property 'permissions' of undefined
TypeError: _.keyBy is not a function
Command finished with error code 0: /Users/dallascaley/Sites/scotch-box/velexo-mobile/hooks/after_prepare/update_platform_config.js /Users/dallascaley/Sites/scotch-box/velexo-mobile
Running command: /usr/libexec/java_home
Command finished with error code 0: /usr/libexec/java_home
ANDROID_HOME=/Users/dallascaley/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
Subproject Path: CordovaLib
Running command: /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/gradlew cdvBuildDebug -b /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_648tt8e3eddnib21cv5hmdpsm.run(/Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build.gradle:139)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild
UP-TO-DATE
:preDebugBuild
UP-TO-DATE
:checkDebugManifest
:preReleaseBuild
UP-TO-DATE
:CordovaLib:preBuild
UP-TO-DATE
:CordovaLib:preDebugBuild
UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl
UP-TO-DATE
:CordovaLib:compileDebugNdk
UP-TO-DATE
:CordovaLib:compileLint UP-TO-DATE
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:compileDebugRenderscript
UP-TO-DATE
:CordovaLib:generateDebugResValues
UP-TO-DATE
:CordovaLib:generateDebugResources
UP-TO-DATE
:CordovaLib:packageDebugResources
UP-TO-DATE
:CordovaLib:processDebugManifest
UP-TO-DATE
:CordovaLib:generateDebugBuildConfig
UP-TO-DATE
:CordovaLib:processDebugResources
UP-TO-DATE
:CordovaLib:generateDebugSources
UP-TO-DATE
:CordovaLib:incrementalDebugJavaCompilationSafeguard
UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac
UP-TO-DATE
:CordovaLib:processDebugJavaRes
UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug
UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
UP-TO-DATE
:CordovaLib:mergeDebugJniLibFolders
UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug
UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug
UP-TO-DATE
:CordovaLib:bundleDebug
UP-TO-DATE
:CordovaLib:preReleaseBuild
UP-TO-DATE
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseAidl
UP-TO-DATE
:CordovaLib:compileReleaseNdk
UP-TO-DATE
:CordovaLib:copyReleaseLint
UP-TO-DATE
:CordovaLib:mergeReleaseShaders
UP-TO-DATE
:CordovaLib:compileReleaseShaders
UP-TO-DATE
:CordovaLib:generateReleaseAssets
UP-TO-DATE
:CordovaLib:mergeReleaseAssets
UP-TO-DATE
:CordovaLib:mergeReleaseProguardFiles
UP-TO-DATE
:CordovaLib:packageReleaseRenderscript
UP-TO-DATE
:CordovaLib:compileReleaseRenderscript
UP-TO-DATE
:CordovaLib:generateReleaseResValues
UP-TO-DATE
:CordovaLib:generateReleaseResources UP-TO-DATE
:CordovaLib:packageReleaseResources
UP-TO-DATE
:CordovaLib:processReleaseManifest
UP-TO-DATE
:CordovaLib:generateReleaseBuildConfig
UP-TO-DATE
:CordovaLib:processReleaseResources
UP-TO-DATE
:CordovaLib:generateReleaseSources
UP-TO-DATE
:CordovaLib:incrementalReleaseJavaCompilationSafeguard
UP-TO-DATE
:CordovaLib:compileReleaseJavaWithJavac
UP-TO-DATE
:CordovaLib:processReleaseJavaRes
UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForRelease
UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
UP-TO-DATE
:CordovaLib:mergeReleaseJniLibFolders
UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForRelease
UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForRelease
UP-TO-DATE
:CordovaLib:bundleRelease
UP-TO-DATE
:prepareComAndroidSupportSupportV132340Library
UP-TO-DATE
:prepareComAndroidSupportSupportV42340Library
UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBase1104Library
UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBasement1104Library
UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesGcm1104Library
UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesIid1104Library
UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesTasks1104Library
UP-TO-DATE
:prepareMeLeolinShortcutBadger1119Library
UP-TO-DATE
:prepareOrgApacheCordovaCordovaLib622DebugLibrary
UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl
UP-TO-DATE
:compileDebugRenderscript
UP-TO-DATE
:generateDebugBuildConfig
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
:incrementalDebugJavaCompilationSafeguard
UP-TO-DATE
:compileDebugJavaWithJavac
UP-TO-DATE
:compileDebugNdk
UP-TO-DATE
:compileDebugSources UP-TO-DATE
:mergeDebugShaders
UP-TO-DATE
:compileDebugShaders
UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets
UP-TO-DATE
:transformClassesWithDexForDebug
UP-TO-DATE
:mergeDebugJniLibFolders
UP-TO-DATE
:transformNative_libsWithMergeJniLibsForDebug
UP-TO-DATE
:processDebugJavaRes
UP-TO-DATE
:transformResourcesWithMergeJavaResForDebug
UP-TO-DATE
:validateSigningDebug
:packageDebug
UP-TO-DATE
:assembleDebug UP-TO-DATE
:cdvBuildDebug
UP-TO-DATE
BUILD SUCCESSFUL
Total time: 1.802 secs
Command finished with error code 0: /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/gradlew cdvBuildDebug,-b,/Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Dorg.gradle.jvmargs=-Xmx2048m,-Pandroid.useDeprecatedNdk=true
Built the following apk(s):
/Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build/outputs/apk/android-debug.apk
No scripts found for hook "before_deploy".
ANDROID_HOME=/Users/dallascaley/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
Running command: adb devices
Command finished with error code 0: adb devices
Running adb shell command "cat /proc/cpuinfo" on target 1215fc3807890504...
Running command: adb -s 1215fc3807890504 shell cat /proc/cpuinfo
Command finished with error code 0: adb -s,1215fc3807890504,shell,cat,/proc/cpuinfo
Skipping build...
Built the following apk(s):
/Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build/outputs/apk/android-debug.apk
Using apk: /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build/outputs/apk/android-debug.apk
Package name: com.m2.velexo
Installing apk /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build/outputs/apk/android-debug.apk on target 1215fc3807890504...
Running command: adb -s 1215fc3807890504 install -r /Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build/outputs/apk/android-debug.apk
Command finished with error code 0: adb -s,1215fc3807890504,install,-r,/Users/dallascaley/Sites/scotch-box/velexo-mobile/platforms/android/build/outputs/apk/android-debug.apk
Running adb shell command "input keyevent 82" on target 1215fc3807890504...
Running command: adb -s 1215fc3807890504 shell input keyevent 82
Command finished with error code 0: adb -s,1215fc3807890504,shell,input,keyevent,82
Starting application "com.m2.velexo/.MainActivity" on target 1215fc3807890504...
Running adb shell command "am start -W -a android.intent.action.MAIN -ncom.m2.velexo/.MainActivity" on target 1215fc3807890504...
Running command: adb -s 1215fc3807890504 shell am start -W -a android.intent.action.MAIN -ncom.m2.velexo/.MainActivity
此时脚本挂起约5分钟,退出前显示如下:
Command finished with error code 0: adb -s,1215fc3807890504,shell,am,start,-W,-a,android.intent.action.MAIN,-ncom.m2.velexo/.MainActivity
LAUNCH SUCCESS
No scripts found for hook "after_run".
[phonegap] completed 'cordova run android --device --verbose --no-telemetry'
所以,我不知道最初的问题是什么,但我最终确实加载了我的应用程序。我这样做的方法是创建一个全新的 hello world 应用程序,然后慢慢地将我旧应用程序中的所有代码复制到其中,同时手动添加插件并在此过程中修复问题。