ionic-team / ionic-team/ionic-cli

The Task.leftShift(Closure) method has been deprecated

オープン
#3,002 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
2k
フォーク
682
PR マージ指標
30日以内にマージされた PR はありません

説明

**Description:**

ionic cordova run android

produces

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

**Steps to Reproduce:**
1. ionic start myApp blank
2. cd myApp
3. ionic cordova run android

**Output:**
```
√ Creating .\www directory for you - done!
> cordova platform add android --save
Using cordova-fetch for cordova-android@~7.0.0

Adding android project...

Creating Cordova project for the Android platform:

Path: platforms\android

Package: io.ionic.starter
Name: myApp
Activity: MainActivity
Android target: android-26

Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@7.0.0
Android Studio project detected

Android Studio project detected

Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project

Installing "cordova-plugin-whitelist" for android

This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.

Adding cordova-plugin-whitelist to package.json

Saved plugin info for "cordova-plugin-whitelist" to config.xml

Discovered plugin "cordova-plugin-device" in config.xml. Adding it to the project

Installing "cordova-plugin-device" for android
Adding cordova-plugin-device to package.json

Saved plugin info for "cordova-plugin-device" to config.xml

Discovered plugin "cordova-plugin-splashscreen" in config.xml. Adding it to the project

Installing "cordova-plugin-splashscreen" for android

Adding cordova-plugin-splashscreen to package.json

Saved plugin info for "cordova-plugin-splashscreen" to config.xml

Discovered plugin "cordova-plugin-ionic-webview" in config.xml. Adding it to the project

Installing "cordova-plugin-ionic-webview" for android

Adding cordova-plugin-ionic-webview to package.json

Saved plugin info for "cordova-plugin-ionic-webview" to config.xml

Discovered plugin "cordova-plugin-ionic-keyboard" in config.xml. Adding it to the project

Installing "cordova-plugin-ionic-keyboard" for android

Adding cordova-plugin-ionic-keyboard to package.json

Saved plugin info for "cordova-plugin-ionic-keyboard" to config.xml

--save flag or autosave detected

Saving android@~7.0.0 into config.xml file ...

Running app-scripts build: --platform android --target cordova
[15:04:57] build dev started ...
[15:04:57] clean started ...
[15:04:57] clean finished in 1 ms
[15:04:57] copy started ...
[15:04:57] deeplinks started ...
[15:04:57] deeplinks finished in 18 ms
[15:04:57] transpile started ...
[15:05:00] transpile finished in 3.84 s
[15:05:00] preprocess started ...
[15:05:00] preprocess finished in 1 ms
[15:05:00] webpack started ...
[15:05:01] copy finished in 4.07 s
[15:05:07] webpack finished in 6.25 s
[15:05:07] sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[15:05:08] sass finished in 1.28 s
[15:05:08] postprocess started ...
[15:05:08] postprocess finished in 9 ms
[15:05:08] lint started ...
[15:05:08] build dev finished in 11.51 s
> cordova run android
[15:05:11] lint finished in 2.51 s
Android Studio project detected

ANDROID_HOME=C:\Users\me\AppData\Local\Android\sdk
JAVA_HOME=C:\PROGRA~1\Java\JDK18~1.0_1
studio
:wrapper

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.

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_5zg76znm73dys32ywnifwah5u.run(C:\Users\me\git_projects\sandbox\myApp\platforms\android\app\build.gradle:143)
:CordovaLib:preBuild
UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl

:CordovaLib:compileDebugRenderscript

:CordovaLib:checkDebugManifest
:CordovaLib:generateDebugBuildConfig

:CordovaLib:prepareLintJar
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources

:CordovaLib:platformAttrExtractor

:CordovaLib:processDebugManifest

:CordovaLib:javaPreCompileDebug

:CordovaLib:processDebugJavaRes
NO-SOURCE
:app:preBuild UP-TO-DATE

:app:preDebugBuild

:app:compileDebugAidl

:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript

:app:checkDebugManifest

:app:generateDebugBuildConfig

:app:prepareLintJar

:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources

:app:createDebugCompatibleScreenManifests

:app:processDebugManifest

:app:splitsDiscoveryTaskDebug

:app:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugShaders

:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets

:CordovaLib:mergeDebugAssets

:app:mergeDebugShaders

:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets

:app:extractTryWithResourcesSupportJarDebug

:CordovaLib:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugJniLibFolders

:CordovaLib:transformNativeLibsWithMergeJniLibsForDebug

:CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug
:app:mergeDebugJniLibFolders

:app:processDebugJavaRes NO-SOURCE
:app:validateSigningDebug

:CordovaLib:processDebugResources

:CordovaLib:generateDebugSources
:CordovaLib:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug

:app:processDebugResources

:app:generateDebugSources
:app:javaPreCompileDebug

:app:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:app:compileDebugSources
:app:transformClassesWithStackFramesFixerForDebug

:app:transformClassesWithDesugarForDebug

:app:transformClassesWithDexBuilderForDebug

:app:transformDexArchiveWithExternalLibsDexMergerForDebug

:app:transformDexArchiveWithDexMergerForDebug

:app:transformNativeLibsWithMergeJniLibsForDebug

:app:transformResourcesWithMergeJavaResForDebug

:app:packageDebug

:app:assembleDebug
:app:cdvBuildDebug

BUILD SUCCESSFUL in 9s
47 actionable tasks: 47 executed
Built the following apk(s):
C:\Users\me\git_projects\sandbox\myApp\platforms\android\app\build\outputs\apk\debug\app-debug.apk

ANDROID_HOME=C:\Users\me\AppData\Local\Android\sdk
JAVA_HOME=C:\PROGRA~1\Java\JDK18~1.0_1
No target specified, deploying to device 'e61e99ab'.

none
Skipping build...

Built the following apk(s):
C:\Users\me\git_projects\sandbox\myApp\platforms\android\app\build\outputs\apk\debug\app-debug.apk

Using apk: C:\Users\me\git_projects\sandbox\myApp\platforms\android\app\build\outputs\apk\debug\app-debug.apk

Package name: io.ionic.starter

LAUNCH SUCCESS

[OK] Your app has been deployed.
Did you know you can live-reload changes from your app with --livereload?
```

**My `ionic info`:**
```
$ ionic info

cli packages: (C:\Users\me\AppData\Roaming\npm\node_modules)

@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.0.0
Ionic Framework : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node : v6.10.1
npm : 3.10.10
OS : Windows 10

Environment Variables:

ANDROID_HOME : C:\Users\me\AppData\Local\Android\sdk

Misc:

backend : legacy

```

**Other Information:**
This deprecation message was reported last year as [2249](https://github.com/ionic-team/ionic-cli/issues/2249) and closed, but it still occurs even with a brand new project.

The build is successful and it launches on the device, but the deprecation message should be addressed.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。