只需将Angular CLI重新安装到版本7.1.1。运行12/04 23:33:39: Launching app
No apk changes detected since last installation, skipping installation of C:\Users\Omara\AndroidStudioProjects\FadeingAnimation\app\build\outputs\apk\app-debug.apk
$ adb shell am force-stop com.omar_alhjri.fadeinganimation
$ adb shell am start -n "com.omar_alhjri.fadeinganimation/com.omar_alhjri.fadeinganimation.MainActivity_3" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Connected to process 12499 on device samsung-gt_i9082-410086da984a7000
I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
W/dalvikvm: VFY: unable to resolve interface method 15725: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
W/dalvikvm: VFY: unable to resolve interface method 15727: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
W/dalvikvm: VFY: unable to resolve interface method 15731: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
W/dalvikvm: VFY: unable to resolve virtual method 453: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
W/dalvikvm: VFY: unable to resolve virtual method 475: Landroid/content/res/TypedArray;.getType (I)I
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008
I/dalvikvm: Could not find method android.widget.FrameLayout.startActionModeForChild, referenced from method android.support.v7.widget.ActionBarContainer.startActionModeForChild
W/dalvikvm: VFY: unable to resolve virtual method 16158: Landroid/widget/FrameLayout;.startActionModeForChild (Landroid/view/View;Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
D/dalvikvm: VFY: replacing opcode 0x6f at 0x0002
I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v7.content.res.AppCompatResources.getColorStateList
W/dalvikvm: VFY: unable to resolve virtual method 268: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable
W/dalvikvm: VFY: unable to resolve virtual method 416: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm: Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity
W/dalvikvm: VFY: unable to resolve virtual method 418: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
W/dalvikvm: VFY: unable to resolve instanceof 136 (Landroid/graphics/drawable/RippleDrawable;) in Landroid/support/v7/widget/AppCompatImageHelper;
D/dalvikvm: VFY: replacing opcode 0x20 at 0x000c
D/dalvikvm: GC_FOR_ALLOC freed 193K, 14% free 8668K/10016K, paused 17ms, total 17ms
I/dalvikvm-heap: Grow heap (frag case) to 26.068MB for 17280016-byte allocation
D/dalvikvm: GC_FOR_ALLOC freed <1K, 6% free 25543K/26892K, paused 15ms, total 15ms
E/dalvikvm: adjustAdaptiveCoef max=4194304, min=1048576, ut=568
D/dalvikvm: GC_CONCURRENT freed 5K, 6% free 25537K/26892K, paused 3ms+1ms, total 19ms
E/dalvikvm: adjustAdaptiveCoef max=6291456, min=1572864, ut=368
D/dalvikvm: GC_FOR_ALLOC freed <1K, 6% free 25537K/26892K, paused 13ms, total 14ms
I/dalvikvm-heap: Forcing collection of SoftReferences for 38880016-byte allocation
E/dalvikvm: adjustAdaptiveCoef max=8388608, min=2097152, ut=256
D/dalvikvm: GC_BEFORE_OOM freed 9K, 6% free 25527K/26892K, paused 25ms, total 25ms
E/dalvikvm-heap: Out of memory on a 38880016-byte allocation.
I/dalvikvm: "main" prio=5 tid=1 RUNNABLE
I/dalvikvm: | group="main" sCount=0 dsCount=0 obj=0x410e59a0 self=0x40fbd390
I/dalvikvm: | sysTid=12499 nice=-19 sched=0/0 cgrp=apps handle=1075193308
I/dalvikvm: | state=R schedstat=( 0 0 0 ) utm=34 stm=9 core=1
I/dalvikvm: at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
I/dalvikvm: at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596)
I/dalvikvm: at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
I/dalvikvm: at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:817)
I/dalvikvm: at android.content.res.Resources.loadDrawable(Resources.java:2854)
I/dalvikvm: at android.content.res.Resources.getDrawable(Resources.java:1521)
I/dalvikvm: at android.support.v7.widget.ResourcesWrapper.getDrawable(ResourcesWrapper.java:128)
I/dalvikvm: at android.support.v7.widget.TintResources.getDrawable(TintResources.java:45)
I/dalvikvm: at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:346)
I/dalvikvm: at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:197)
I/dalvikvm: at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:185)
I/dalvikvm: at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)
I/dalvikvm: at android.support.v7.widget.AppCompatImageHelper.loadFromAttributes(AppCompatImageHelper.java:50)
I/dalvikvm: at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:63)
I/dalvikvm: at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:53)
I/dalvikvm: at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:106)
I/dalvikvm: at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1013)
I/dalvikvm: at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1072)
I/dalvikvm: at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
I/dalvikvm: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:681)
I/dalvikvm: at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
I/dalvikvm: at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
I/dalvikvm: at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
I/dalvikvm: at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
I/dalvikvm: at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
I/dalvikvm: at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
I/dalvikvm: at com.omar_alhjri.fadeinganimation.MainActivity_3.onCreate(MainActivity_3.java:24)
I/dalvikvm: at android.app.Activity.performCreate(Activity.java:5283)
I/dalvikvm: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
I/dalvikvm: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
I/dalvikvm: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299)
I/dalvikvm: at android.app.ActivityThread.access$700(ActivityThread.java:150)
I/dalvikvm: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
I/dalvikvm: at android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm: at android.os.Looper.loop(Looper.java:137)
I/dalvikvm: at android.app.ActivityThread.main(ActivityThread.java:5283)
I/dalvikvm: at java.lang.reflect.Method.invokeNative(Native Method)
I/dalvikvm: at java.lang.reflect.Method.invoke(Method.java:511)
I/dalvikvm: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
I/dalvikvm: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
I/dalvikvm: at dalvik.system.NativeStart.main(Native Method)
D/skia: --- allocation failed for scaled bitmap
D/AndroidRuntime: Shutting down VM
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x410e4930)
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.OutOfMemoryError
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:817)
at android.content.res.Resources.loadDrawable(Resources.java:2854)
at android.content.res.Resources.getDrawable(Resources.java:1521)
at android.support.v7.widget.ResourcesWrapper.getDrawable(ResourcesWrapper.java:128)
at android.support.v7.widget.TintResources.getDrawable(TintResources.java:45)
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:346)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:197)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:185)
at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)
at android.support.v7.widget.AppCompatImageHelper.loadFromAttributes(AppCompatImageHelper.java:50)
at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:63)
at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:53)
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:106)
at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1013)
at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1072)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:681)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.omar_alhjri.fadeinganimation.MainActivity_3.onCreate(MainActivity_3.java:24)
at android.app.Activity.performCreate(Activity.java:5283)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299)
at android.app.ActivityThread.access$700(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5283)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
I/Process: Sending signal. PID: 12499 SIG: 9
Application terminated.
时,发生以下错误:
ng new project-name
npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! code ERR_STREAM_WRITE_AFTER_END
npm ERR! write after end
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\[username]\AppData\Roaming\npm-cache\_logs\2018-12-04T20_40_23_399Z-debug.log
切换到项目目录时,无法提供新的Angular应用程序。如何修复?
答案 0 :(得分:7)
您应该查看错误详细信息。
click
据此,不推荐使用circular-json@0.5.9。您应该使用flatted。直接来自CircularJSON创建者的超轻量级(0.5K)和快速循环JSON解析器。 CircularJSON的未来称为扁平化。
更小,更快,并且平均也可以减少输出,扁平化是新的,无膨胀的,与ESM和CJS兼容的循环JSON解析器。
使用mousedown
答案 1 :(得分:1)
我尝试了接受答案的解决方案,但是什么也没发生。
因此,经过一些搜索,我找到了解决方案。也许可以帮助别人
运行
npm cache clean --force
答案 2 :(得分:0)
第1步:首先使用此命令npm upgrade -g @angular/cli
步骤2:之后,重新启动PC
步骤3:之后,创建新项目ng new my-app
应该可以。