【问题标题】:Android ADB fails to install APK to Nexus 5 on Windows 8.1Android ADB 无法在 Windows 8.1 上将 APK 安装到 Nexus 5
【发布时间】:2015-04-16 20:39:15
【问题描述】:

我正在尝试通过 ADB 将 APK 安装到 Nexus 5,但它总是给我以下错误:

Unrecognized option -Xlog-stdio
dalvikvm: [options] class [argument ...]

The following standard options are supported:
  -classpath classpath (-cp classpath)
  -Dproperty=value
  -verbose:tag ('gc', 'jni', or 'class')
  -showversion
  -help
  -agentlib:jdwp=options

The following extended options are supported:
  -Xrunjdwp:<options>
  -Xbootclasspath:bootclasspath
  -Xcheck:tag  (e.g. 'jni')
  -XmsN (min heap, must be multiple of 1K, >= 1MB)
  -XmxN (max heap, must be multiple of 1K, >= 2MB)
  -XssN (stack size)
  -Xint

The following Dalvik options are supported:
  -Xzygote
  -Xjnitrace:substring (eg NativeClass or nativeMethod)
  -Xstacktracefile:<filename>
  -Xgc:[no]preverify
  -Xgc:[no]postverify
  -XX:+DisableExplicitGC
  -XX:HeapGrowthLimit=N
  -XX:HeapMinFree=N
  -XX:HeapMaxFree=N
  -XX:NonMovingSpaceCapacity=N
  -XX:HeapTargetUtilization=doublevalue
  -XX:ForegroundHeapGrowthMultiplier=doublevalue
  -XX:LowMemoryMode
  -Xprofile:{threadcpuclock,wallclock,dualclock}

The following unique to ART options are supported:
  -Xgc:[no]preverify_rosalloc
  -Xgc:[no]postsweepingverify_rosalloc
  -Xgc:[no]postverify_rosalloc
  -Xgc:[no]presweepingverify
  -Ximage:filename
  -XX:ParallelGCThreads=integervalue
  -XX:ConcGCThreads=integervalue
  -XX:MaxSpinsBeforeThinLockInflation=integervalue
  -XX:LongPauseLogThreshold=integervalue
  -XX:LongGCLogThreshold=integervalue
  -XX:DumpGCPerformanceOnShutdown
  -XX:IgnoreMaxFootprint
  -XX:UseTLAB
  -XX:BackgroundGC=none
  -Xmethod-trace
  -Xmethod-trace-file:filename  -Xmethod-trace-file-size:integervalue
  -Xenable-profiler
  -Xprofile-filename:filename
  -Xprofile-period:integervalue
  -Xprofile-duration:integervalue
  -Xprofile-interval:integervalue
  -Xprofile-backoff:doublevalue
  -Xprofile-start-immediately
  -Xprofile-top-k-threshold:doublevalue
  -Xprofile-top-k-change-threshold:doublevalue
  -Xprofile-type:{method,stack}
  -Xprofile-max-stack-depth:integervalue
  -Xcompiler:filename
  -Xcompiler-option dex2oat-option
  -Ximage-compiler-option dex2oat-option
  -Xpatchoat:filename
  -X[no]relocate
  -X[no]dex2oat (Whether to invoke dex2oat on the application)
  -X[no]image-dex2oat (Whether to create and use a boot image)

The following previously supported Dalvik options are ignored:
  -ea[:<package name>... |:<class name>]
  -da[:<package name>... |:<class name>]
   (-enableassertions, -disableassertions)
  -esa
  -dsa
   (-enablesystemassertions, -disablesystemassertions)
  -Xverify:{none,remote,all}
  -Xrs
  -Xint:portable, -Xint:fast, -Xint:jit
  -Xdexopt:{none,verified,all,full}
  -Xnoquithandler
  -Xjniopts:{warnonly,forcecopy}
  -Xjnigreflimit:integervalue
  -Xgc:[no]precise
  -Xgc:[no]verifycardtable
  -X[no]genregmap
  -Xverifyopt:[no]checkmon
  -Xcheckdexsum
  -Xincludeselectedop
  -Xjitop:hexopvalue[-endvalue][,hexopvalue[-endvalue]]*
  -Xincludeselectedmethod
  -Xjitthreshold:integervalue
  -Xjitcodecachesize:decimalvalueofkbytes
  -Xjitblocking
  -Xjitmethod:signature[,signature]* (eg Ljava/lang/String\;replace)
  -Xjitclass:classname[,classname]*
  -Xjitoffset:offset[,offset]
  -Xjitconfig:filename
  -Xjitcheckcg
  -Xjitverbose
  -Xjitprofile
  -Xjitdisableopt
  -Xjitsuspendpoll
  -XX:mainThreadStackSize=N

Nexus 5 运行的是 Android 5.0.1,ADB (v1.0.32) 运行的是 Windows 8.1。 USB 驱动程序也是最新的。我已经尝试过不同的 USB 驱动程序和端口,但它们都不起作用。

【问题讨论】:

  • 我有同样的错误,因为我激活了 stdout/stderr 重定向到 logcat。我可以通过在连接设备的情况下运行以下命令来安装我的应用程序:“adb shell stop”,然后是“adb shell setprop log.redirect-stdio false”,然后是“adb shell start”。

标签: android adb windows-8.1 nexus-5


【解决方案1】:

您已启用 stdio 重定向。

要禁用它,请运行以下命令(也由 grattmandu03 编写):

adb shell stop
adb shell setprop log.redirect-stdio false
adb shell start

然后再次运行安装。

【讨论】:

    猜你喜欢
    • 2015-08-10
    • 2015-06-01
    • 1970-01-01
    • 2015-08-04
    • 2014-12-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多