首页 > 技术文章 > android studio 配置相关问题

hgwang 2019-05-27 10:07 原文

1:Unknown AVD name, use -list-avds to see valid list.

下午1:26    Emulator: emulator: ERROR: Unknown AVD name [Pixel_2_API_26], use -list-avds to see valid list.

下午1:26    Emulator: Process finished with exit code 1

解决办法:

I experienced the same issue, regardless of the AVD. I'm too new to understand why, but it seems that Android Studio created /.android/avd directories in two locations:

  1. /root/.android/avd
  2. /home/USERNAME/.android/avd

The .avd and .ini created when creating a new AVD were stored in the 1st location, and the 2nd location was empty. To resolve it, I copied and pasted both the .avd and .ini files for each AVD from 1 to 2 (they needed to be in both in order for AS to see and run the AVD). The emulator then ran successfully.

https://stackoverflow.com/questions/48996437/process-finished-with-exit-code-1-unknown-avd-name

 

 

2:循环依FAILURE: Build failed with an exception.


* What went wrong:
Circular dependency between the following tasks:
:app:checkManifestChangesDebug
\--- :app:instantRunMainApkResourcesDebug
     \--- :app:transformClassesAndDexWithShrinkResForDebug
          \--- :app:transformDexArchiveWithDexMergerForDebug
               +--- :app:preColdswapDebug
               |    \--- :app:incrementalDebugTasks
               |         +--- :app:transformClassesAndClassesEnhancedWithInstantReloadDexForDebug
               |         |    \--- :app:transformClassesWithInstantRunForDebug
               |         |         \--- :app:checkManifestChangesDebug (*)
               |         \--- :app:transformClassesWithInstantRunForDebug (*)
               \--- :app:transformClassesWithDexBuilderForDebug
                    +--- :app:preColdswapDebug (*)
                    \--- :app:transformClassesWithInstantRunForDebug (*)

(*) - details omitted (listed previously)
解决办法:

Disable instant run from settings

Settings > search for instant run > uncheck "Enable Instant Run to hot swap code/resource changes on display"

https://stackoverflow.com/questions/52779618/circular-dependency-between-the-following-tasks-in-gradle/53582242

3:armeabi is no longer supported. Use armeabi-v7a.

下载r16b后,修改ndk路径为r16b路径


推荐阅读