Ionicv3使用兼容的库,minSdk最多为16或者将该项目的minSdk版本增加到至少19,

问题描述 投票:0回答:1

一切都很好,我能够建立apk由于某种原因我已经删除平台离子cordova平台rm android重新添加与离子cordova平台添加Android现在我最终有这个错误请让我知道我怎么能解决。

我跟mike(ionicteam)讨论了松弛,他告诉我要添加config.xml <preference name="android-minSdkVersion" value=" 19" />,但这已经存在,我无法找到解决这个问题的方法。

我重新安装了我能做的一切,删除了node_modules,平台,插件再次重新添加了npm install,ionic cordova platform添加android

> **D:\snip>cordova build android --verbose**
> No scripts found for hook "before_build".
> 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
> Android Studio project detected
> 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 D:\snip\platforms\android\app\src\main\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\app\src\main\assets\www
> Wrote out android application name "MyappName(hidden)" to D:\snip\platforms\android\app\src\main\res\values\strings.xml
> android-versionCode not found in config.xml. Generating a code based on version in config.xml (0.0.1): 1
> Wrote out Android package name "com.test.myappname(hidden)" to D:\snip\platforms\android\app\src\main\java\com\test(hidden)\myappname(hidden)\MainActivity.java
> Updating icons at platforms\android\app\src\main\res
> Updating splash screens at platforms\android\app\src\main\res
> This app does not have additional resource files defined
> Prepared android project successfully
> No scripts found for hook "after_prepare".
> No scripts found for hook "before_compile".
> ANDROID_HOME=C:\Users\HP\AppData\Local\Android\Sdk
> JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191
> studio
> Subproject Path: CordovaLib
> Subproject Path: app
> Running command: cmd "/s /c "D:\snip\platforms\android\gradlew.bat cdvBuildDebug -b D:\snip\platforms\android\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m""
> publishNonDefault is deprecated and has no effect anymore. All variants are now published.
> Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
> 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_7txkf7pvddwu0sncpbd844upy.run(D:\snip\platforms\android\app\build.gradle:151)
> :CordovaLib:preBuild UP-TO-DATE
> :CordovaLib:preDebugBuild UP-TO-DATE
> :CordovaLib:compileDebugAidl UP-TO-DATE
> :CordovaLib:compileDebugRenderscript UP-TO-DATE
> :CordovaLib:checkDebugManifest UP-TO-DATE
> :CordovaLib:generateDebugBuildConfig UP-TO-DATE
> :CordovaLib:prepareLintJar UP-TO-DATE
> :CordovaLib:generateDebugResValues UP-TO-DATE
> :CordovaLib:generateDebugResources UP-TO-DATE
> :CordovaLib:packageDebugResources UP-TO-DATE
> :CordovaLib:platformAttrExtractor UP-TO-DATE
> :CordovaLib:processDebugManifest UP-TO-DATE
> :CordovaLib:processDebugResources UP-TO-DATE
> :CordovaLib:generateDebugSources UP-TO-DATE
> :CordovaLib:javaPreCompileDebug UP-TO-DATE
> :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
> :CordovaLib:processDebugJavaRes NO-SOURCE
> :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
> :app:preBuild UP-TO-DATE
> :app:preDebugBuild
> OneSignalPlugin: WARNING: OneSignalPlugin: Downgraded 'com.android.support:23+' -> 27.+ to prevent compile errors! Recommend updating your project's compileSdkVersion!
> :app:preDebugBuild UP-TO-DATE
> :app:compileDebugAidl UP-TO-DATE
> :CordovaLib:packageDebugRenderscript NO-SOURCE
> :app:compileDebugRenderscript UP-TO-DATE
> :app:checkDebugManifest UP-TO-DATE
> :app:generateDebugBuildConfig UP-TO-DATE
> :app:prepareLintJar UP-TO-DATE
> :app:generateDebugResValues UP-TO-DATE
> :app:generateDebugResources UP-TO-DATE
> :app:mergeDebugResources UP-TO-DATE
> :app:createDebugCompatibleScreenManifests UP-TO-DATE
> :app:processDebugManifestD:\snip\platforms\android\app\src\main\AndroidManifest.xml:42:5-75 Error:
> uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] D:\snip\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
> Suggestion: use a compatible library with a minSdk of at most 16,
> or increase this project's minSdk version to at least 19,
> or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
> See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
> :app:processDebugManifest FAILED
> FAILURE: Build failed with an exception.
> 
> * What went wrong:
>   Execution failed for task ':app:processDebugManifest'.
> 
> > Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] D:\snip\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
> > Suggestion: use a compatible library with a minSdk of at most 16,
> > or increase this project's minSdk version to at least 19,
> > or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
> 
> 
> 
> * Try:
>   Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
> * Get more help at https://help.gradle.org
> 
> BUILD FAILED in 7s
> 23 actionable tasks: 1 executed, 22 up-to-date
> Command finished with error code 1: cmd /s /c "D:\snip\platforms\android\gradlew.bat cdvBuildDebug -b D:\snip\platforms\android\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m"
> cmd: Command failed with exit code 1 Error output:
> D:\snip\platforms\android\app\src\main\AndroidManifest.xml:42:5-75 Error:
> uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] D:\snip\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
> Suggestion: use a compatible library with a minSdk of at most 16,
> or increase this project's minSdk version to at least 19,
> or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
> FAILURE: Build failed with an exception.
> 
> * What went wrong:
>   Execution failed for task ':app:processDebugManifest'.
> 
> > Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] D:\snip\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
> > Suggestion: use a compatible library with a minSdk of at most 16,
> > or increase this project's minSdk version to at least 19,
> > or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
> 
> 
> 
> * Try:
>   Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
> * Get more help at https://help.gradle.org
> 
> BUILD FAILED in 7s
> Picked up _JAVA_OPTIONS: -Xmx512M
> Error: cmd: Command failed with exit code 1 Error output:
> D:\snip\platforms\android\app\src\main\AndroidManifest.xml:42:5-75 Error:
> uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] D:\snip\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
> Suggestion: use a compatible library with a minSdk of at most 16,
> or increase this project's minSdk version to at least 19,
> or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
> FAILURE: Build failed with an exception.
> 
> * What went wrong:
>   Execution failed for task ':app:processDebugManifest'.
> 
> > Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] D:\snip\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
> > Suggestion: use a compatible library with a minSdk of at most 16,
> > or increase this project's minSdk version to at least 19,
> > or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
> 
> 
> 
> * Try:
>   Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
> * Get more help at https://help.gradle.org
> 
> BUILD FAILED in 7s
> Picked up _JAVA_OPTIONS: -Xmx512M
> at ChildProcess.whenDone (D:\snip\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)    at emitTwo (events.js:126:13)
> at ChildProcess.emit (events.js:214:7)
> at maybeClose (internal/child_process.js:915:16)
> at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
> D:\snip>

> **D:\snip>ionic cordova build android --verbose**
> ionic:lib Terminal info: { tty: true, ci: false, windows: true } +0ms
> ionic:lib CLI global options: { _: [ 'cordova', 'build', 'android' ], help: null, h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json: null, project: null, '--': [] } +16ms
> ionic:lib:project Project type from config: Ionic 2/3 (ionic-angular) +0ms
> ionic:lib:project Project details: { configPath: 'D:\snip\ionic.config.json', errors: [], context: 'app', type: 'ionic-angular' } +0ms
> ionic Context: { binPath: 'C:\Users\HP\AppData\Roaming\npm\node_modules\ionic\bin\ionic', libPath: 'C:\Users\HP\AppData\Roaming\npm\node_modules\ionic', execPath: 'D:\snip', version: '4.4.0' } +0ms
> ionic:lib:integrations:cordova:config Using config.xml: D:\snip\config.xml +0ms
> ionic:lib:hooks Looking for ionic:build:before npm script. +0ms
> ionic:lib:project:ionic-angular:build Looking for ionic:build npm script. +0ms
> > ionic-app-scripts build --target cordova --platform android
> > [10:43:01]  ionic-app-scripts 3.2.0
> > [10:43:01]  build dev started ...
> > [10:43:01]  clean started ...
> > [10:43:01]  clean finished in 31 ms
> > [10:43:01]  copy started ...
> > [10:43:02]  deeplinks started ...
> > [10:43:03]  deeplinks finished in 766 ms
> > [10:43:03]  transpile started ...
> > [10:43:12]  transpile finished in 8.91 s
> > [10:43:12]  preprocess started ...
> > [10:43:12]  preprocess finished in less than 1 ms
> > [10:43:12]  webpack started ...
> > [10:43:12]  copy finished in 10.50 s
> > [10:43:20]  webpack finished in 8.60 s
> > [10:43:20]  sass started ...
> > [10:43:23]  sass finished in 2.93 s
> > [10:43:23]  postprocess started ...
> > [10:43:23]  postprocess finished in 15 ms
> > [10:43:23]  lint started ...
> > [10:43:23]  build dev finished in 22.07 s
> > No scripts found for hook "before_build".
> > 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
> > Android Studio project detected
> > 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 D:\snip\platforms\android\app\src\main\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\app\src\main\assets\www
> > copying all
> > Wrote out android application name "myappname(hidden)" to D:\snip\platforms\android\app\src\main\res\values\strings.xml
> > android-versionCode not found in config.xml. Generating a code based on version in config.xml (0.0.1): 1
> > Wrote out Android package name "com.test.myappname(hidden)" to D:\snip\platforms\android\app\src\main\java\com\name(hidden)\myappname(hidden)\MainActivity.java
> > Updating icons at platforms\android\app\src\main\res
> > Updating splash screens at platforms\android\app\src\main\res
> > This app does not have additional resource files defined
> > Prepared android project successfully
> > No scripts found for hook "after_prepare".
> > No scripts found for hook "before_compile".
> > ANDROID_HOME=C:\Users\HP\AppData\Local\Android\Sdk
> > JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191
> > studio
> > Subproject Path: CordovaLib
> > Subproject Path: app
> > Running command: cmd "/s /c "D:\snip\platforms\android\gradlew.bat cdvBuildDebug -b D:\snip\platforms\android\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m""
> 
> 
> D:\snip>if "Windows_NT" == "Windows_NT" setlocal
> D:\snip>set DIRNAME=D:\snip\platforms\android\
> D:\snip>if "D:\snip\platforms\android" == "" set DIRNAME=.
> D:\snip>set APP_BASE_NAME=gradlew
> D:\snip>set APP_HOME=D:\snip\platforms\android\
> D:\snip>set DEFAULT_JVM_OPTS=
> D:\snip>if defined JAVA_HOME goto findJavaFromJavaHome
> D:\snip>set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191
> D:\snip>set JAVA_EXE=C:\Program Files\Java\jdk1.8.0_191/bin/java.exe
> D:\snip>if exist "C:\Program Files\Java\jdk1.8.0_191/bin/java.exe" goto init
> D:\snip>if not "Windows_NT" == "Windows_NT" goto win9xME_args
> D:\snip>set CMD_LINE_ARGS=
> D:\snip>set _SKIP=2
> D:\snip>if "xcdvBuildDebug" == "x" goto execute
> D:\snip>set CMD_LINE_ARGS=cdvBuildDebug -b D:\snip\platforms\android\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m
> D:\snip>set CLASSPATH=D:\snip\platforms\android\gradle\wrapper\gradle-wrapper.jar
> D:\snip>"C:\Program Files\Java\jdk1.8.0_191/bin/java.exe"    "-Dorg.gradle.appname=gradlew" -classpath "D:\snip\platforms\android\gradle\wrapper\gradle-wrapper.jar" org.gradle.wrapper.GradleWrapperMain cdvBuildDebug -b D:\snip\platforms\android\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m
> publishNonDefault is deprecated and has no effect anymore. All variants are now published.
> Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
> 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_7txkf7pvddwu0sncpbd844upy.run(D:\snip\platforms\android\app\build.gradle:151)
> :CordovaLib:preBuild UP-TO-DATE
> :CordovaLib:preDebugBuild UP-TO-DATE
> :CordovaLib:compileDebugAidl UP-TO-DATE
> :CordovaLib:compileDebugRenderscript UP-TO-DATE
> :CordovaLib:checkDebugManifest UP-TO-DATE
> :CordovaLib:generateDebugBuildConfig UP-TO-DATE
> :CordovaLib:prepareLintJar UP-TO-DATE
> :CordovaLib:generateDebugResValues UP-TO-DATE
> :CordovaLib:generateDebugResources UP-TO-DATE
> :CordovaLib:packageDebugResources UP-TO-DATE
> :CordovaLib:platformAttrExtractor UP-TO-DATE
> :CordovaLib:processDebugManifest UP-TO-DATE
> :CordovaLib:processDebugResources UP-TO-DATE
> :CordovaLib:generateDebugSources UP-TO-DATE
> :CordovaLib:javaPreCompileDebug UP-TO-DATE
> :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
> :CordovaLib:processDebugJavaRes NO-SOURCE
> :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
> :app:preBuild UP-TO-DATE
> :app:preDebugBuild
> OneSignalPlugin: WARNING: OneSignalPlugin: Downgraded 'com.android.support:23+' -> 27.+ to prevent compile errors! Recommend updating your project's compileSdkVersion!
> :app:preDebugBuild UP-TO-DATE
> :app:compileDebugAidl UP-TO-DATE
> :CordovaLib:packageDebugRenderscript NO-SOURCE
> :app:compileDebugRenderscript UP-TO-DATE
> :app:checkDebugManifest UP-TO-DATE
> :app:generateDebugBuildConfig UP-TO-DATE
> :app:prepareLintJar UP-TO-DATE
> :app:generateDebugResValues UP-TO-DATE
> :app:generateDebugResources UP-TO-DATE
> :app:mergeDebugResources UP-TO-DATE
> :app:createDebugCompatibleScreenManifests UP-TO-DATE
> D:\snip\platforms\android\app\src\main\AndroidManifest.xml:42:5-75 Error:
> uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] D:\snip\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
> Suggestion: use a compatible library with a minSdk of at most 16,
> or increase this project's minSdk version to at least 19,
> or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
> :app:processDebugManifest
> See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
> :app:processDebugManifest FAILED
> 23 actionable tasks: 1 executed, 22 up-to-date
> FAILURE: Build failed with an exception.
> 
> * What went wrong:
>   Execution failed for task ':app:processDebugManifest'.
> 
> > Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] D:\snip\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
> > Suggestion: use a compatible library with a minSdk of at most 16,
> > or increase this project's minSdk version to at least 19,
> > or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
> 
> 
> 
> * Try:
>   Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
> * Get more help at https://help.gradle.org
> 
> BUILD FAILED in 3s
> D:\snip>if "1" == "0" goto mainEnd
> D:\snip>rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
> D:\snip>rem the _cmd.exe /c_ return code!
> D:\snip>if not "" == "" exit 1
> D:\snip>exit /b 1
> cmd: Command failed with exit code 1 Error output:
> D:\snip\platforms\android\app\src\main\AndroidManifest.xml:42:5-75 Error:
> uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] D:\snip\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
> Suggestion: use a compatible library with a minSdk of at most 16,
> or increase this project's minSdk version to at least 19,
> or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
> FAILURE: Build failed with an exception.
> 
> * What went wrong:
>   Execution failed for task ':app:processDebugManifest'.
> 
> > Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] D:\snip\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
> > Suggestion: use a compatible library with a minSdk of at most 16,
> > or increase this project's minSdk version to at least 19,
> > or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
> 
> 
> 
> * Try:
>   Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
> * Get more help at https://help.gradle.org
> 
> BUILD FAILED in 3s
> Picked up _JAVA_OPTIONS: -Xmx512M
> Command finished with error code 1: cmd /s /c "D:\snip\platforms\android\gradlew.bat cdvBuildDebug -b D:\snip\platforms\android\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m"
> Error: cmd: Command failed with exit code 1 Error output:
> D:\snip\platforms\android\app\src\main\AndroidManifest.xml:42:5-75 Error:
> uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] D:\snip\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
> Suggestion: use a compatible library with a minSdk of at most 16,
> or increase this project's minSdk version to at least 19,
> or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
> FAILURE: Build failed with an exception.
> 
> * What went wrong:
>   Execution failed for task ':app:processDebugManifest'.
> 
> > Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] D:\snip\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
> > Suggestion: use a compatible library with a minSdk of at most 16,
> > or increase this project's minSdk version to at least 19,
> > or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
> 
> 
> 
> * Try:
>   Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
> * Get more help at https://help.gradle.org
> 
> BUILD FAILED in 3s
> Picked up _JAVA_OPTIONS: -Xmx512M
> at ChildProcess.whenDone (D:\snip\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
> at emitTwo (events.js:126:13)
> at ChildProcess.emit (events.js:214:7)
> at maybeClose (internal/child_process.js:915:16)
> at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
> [ERROR] An error occurred while running subprocess cordova.
> ```
>     cordova build android --verbose exited with exit code 1.
> 
>     Re-running this command with the --verbose flag may provide more information.
> ```
> ionic:cli-framework:utils:process onBeforeExit handler: process.exit received +0ms
> ionic:cli-framework:utils:process onBeforeExit handler: running 2 functions +0ms
> ionic:cli-framework:utils:process error while killing process tree for 21236: { Error: Command failed: taskkill /pid 21236 /T /F
> ionic:cli-framework:utils:process ERROR: The process "21236" not found.
> ionic:cli-framework:utils:process
> ionic:cli-framework:utils:process     at ChildProcess.exithandler (child_process.js:276:12)
> ionic:cli-framework:utils:process     at emitTwo (events.js:126:13)
> ionic:cli-framework:utils:process     at ChildProcess.emit (events.js:214:7)
> ionic:cli-framework:utils:process     at maybeClose (internal/child_process.js:915:16)
> ionic:cli-framework:utils:process     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
> ionic:cli-framework:utils:process   killed: false,
> ionic:cli-framework:utils:process   code: 128,
> ionic:cli-framework:utils:process   signal: null,
> ionic:cli-framework:utils:process   cmd: 'taskkill /pid 21236 /T /F' } +125ms
> ionic:cli-framework:utils:process onBeforeExit handler: error from function: { Error: Command failed: taskkill /pid 21236 /T /F
> ionic:cli-framework:utils:process ERROR: The process "21236" not found.
> ionic:cli-framework:utils:process
> ionic:cli-framework:utils:process     at ChildProcess.exithandler (child_process.js:276:12)
> ionic:cli-framework:utils:process     at emitTwo (events.js:126:13)
> ionic:cli-framework:utils:process     at ChildProcess.emit (events.js:214:7)
> ionic:cli-framework:utils:process     at maybeClose (internal/child_process.js:915:16)
> ionic:cli-framework:utils:process     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
> ionic:cli-framework:utils:process   killed: false,
> ionic:cli-framework:utils:process   code: 128,
> ionic:cli-framework:utils:process   signal: null,
> ionic:cli-framework:utils:process   cmd: 'taskkill /pid 21236 /T /F' } +15ms
> ionic:cli-framework:utils:process error while killing process tree for 10536: { Error: Command failed: taskkill /pid 10536 /T /F
> ionic:cli-framework:utils:process ERROR: The process "10536" not found.
> ionic:cli-framework:utils:process
> ionic:cli-framework:utils:process     at ChildProcess.exithandler (child_process.js:276:12)
> ionic:cli-framework:utils:process     at emitTwo (events.js:126:13)
> ionic:cli-framework:utils:process     at ChildProcess.emit (events.js:214:7)
> ionic:cli-framework:utils:process     at maybeClose (internal/child_process.js:915:16)
> ionic:cli-framework:utils:process     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
> ionic:cli-framework:utils:process   killed: false,
> ionic:cli-framework:utils:process   code: 128,
> ionic:cli-framework:utils:process   signal: null,
> ionic:cli-framework:utils:process   cmd: 'taskkill /pid 10536 /T /F' } +0ms
> ionic:cli-framework:utils:process onBeforeExit handler: error from function: { Error: Command failed: taskkill /pid 10536 /T /F
> ionic:cli-framework:utils:process ERROR: The process "10536" not found.
> ionic:cli-framework:utils:process
> ionic:cli-framework:utils:process     at ChildProcess.exithandler (child_process.js:276:12)
> ionic:cli-framework:utils:process     at emitTwo (events.js:126:13)
> ionic:cli-framework:utils:process     at ChildProcess.emit (events.js:214:7)
> ionic:cli-framework:utils:process     at maybeClose (internal/child_process.js:915:16)
> ionic:cli-framework:utils:process     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
> ionic:cli-framework:utils:process   killed: false,
> ionic:cli-framework:utils:process   code: 128,
> ionic:cli-framework:utils:process   signal: null,
> ionic:cli-framework:utils:process   cmd: 'taskkill /pid 10536 /T /F' } +0ms
> ionic:cli-framework:utils:process onBeforeExit handler: exiting (exit code 1) +0ms
> > D:\snip>

离子信息

D:\ snip>离子信息

离子型:

离子(离子CLI):4.4.0(C:\ Users \ HP \ AppData \ Roaming \ npm \ node_modules \ ionic)Ionic Framework:ionic-angular 3.9.2 @ ionic / app-scripts:3.2.0

科尔多瓦:

cordova(Cordova CLI):8.1.2([email protected])Cordova平台:android 7.1.4 Cordova插件:cordova-plugin-ionic-keyboard 2.1.3,cordova-plugin-ionic-webview 1.2.1, (和其他16个插件)

系统:

Android SDK工具:26.1.1(C:\ Users \ HP \ AppData \ Local \ Android \ Sdk)NodeJS:v8.14.0(C:\ Program Files \ nodejs \ node.exe)npm:6.4.1操作系统:Windows 10

其他信息:我已经从AndroidManifest.xml上的config.xml <preference name="android-minSdkVersion" value=" 19" />上获得了minSdkversion

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="org.apache.cordova" android:versionName="1.0" android:versionCode="1">
    <uses-sdk android:minSdkVersion="19" />
</manifest>

来自build.gradle

  //This replaces project.properties w.r.t. build settings
    project.ext {
      defaultBuildToolsVersion="27.0.1" //String
      defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
      defaultTargetSdkVersion=27 //Integer - We ALWAYS target the latest by default
      defaultCompileSdkVersion=27 //Integer - We ALWAYS compile with the latest by default
    }

来自project.properties

# Project target.
target=android-27
android.library.reference.1=CordovaLib
android.library.reference.2=app
cordova.system.library.1=com.android.support:customtabs:23.3.0
cordova.gradle.include.1=cordova-plugin-browsertab/myappname-BrowserTab.gradle
cordova.gradle.include.2=cordova-plugin-mauron85-background-geolocation/myappname-logtofile.gradle
cordova.system.library.2=com.google.android.gms:play-services-location:11+
cordova.system.library.3=com.android.support:support-v4:23+
cordova.system.library.4=com.onesignal:OneSignal:3.10.5
cordova.gradle.include.3=onesignal-cordova-plugin/myappname-build-extras-onesignal.gradle
cordova.system.library.5=com.android.support:support-v4:26.+
cordova.system.library.6=com.android.support:appcompat-v7:26.+
cordova.system.library.7=com.google.android.gms:play-services-location:15.+

谢谢

cordova ionic-framework
1个回答
2
投票

如果有人面临同样的问题,请在平台/ android / cordova插件中检查def minSdkVersion = 19 browsertab / browserTab.gradle我有def minSdkVersion = 16这是解决我的问题。

© www.soinside.com 2019 - 2024. All rights reserved.