Android Studio 3.1.1新建项目弹窗异常及XML无Design选项求助
Hey there, let's work through these two Android Studio 3.1.1 issues step by step—they're typical post-update glitches, so we'll get you back on track in no time!
问题1:新建项目弹出异常窗口
Here are the most effective fixes for this problem:
- Clear Android Studio's cache: Go to
File→Invalidate Caches / Restart..., then selectInvalidate and Restart. This clears out corrupted cache files that often cause weird behavior after updates. - Reset project templates: If clearing cache doesn't help, delete the template directory manually:
- On Windows: Navigate to
C:\Users\<YourUsername>\.AndroidStudio3.1\config\templatesand delete the folder - On Mac: Go to
~/Library/Application Support/AndroidStudio3.1/templatesand remove it
Restart Android Studio afterward—it will automatically re-download the default templates.
- On Windows: Navigate to
- Verify SDK configuration: Open
File→Project Structure→SDK Location. Make sure the Android SDK path is correct and all required SDK versions are installed. If anything's missing, use the SDK Manager to download the necessary components.
问题2:.xml文件底部无“Design”选项
Try these solutions one by one:
- Switch to Android view: Often, the issue is just the project view being set to "Project" instead of "Android". Look for the dropdown menu in the top-left corner of the Project window, select "Android", then re-open your layout XML file. The Design tab should appear.
- Check the XML file type: Ensure you're opening a layout XML file (located in the
res/layoutdirectory). XML files in other folders likeres/valuesdon't have a Design view—this is expected behavior. - Enable the Android Designer plugin: Go to
File→Settings→Plugins(on Mac, it'sAndroid Studio→Preferences→Plugins). Look for "Android Designer" and make sure it's checked. If it was disabled, enable it and restart Studio. - Downgrade Gradle to match Studio 3.1.1: Android Studio 3.1.1 works best with Gradle plugin 3.1.1 and Gradle version 4.4. If your project uses a newer version, it might cause compatibility issues:
- Open your project's root
build.gradlefile, update the classpath toclasspath 'com.android.tools.build:gradle:3.1.1' - Open
gradle/wrapper/gradle-wrapper.properties, setdistributionUrltohttps\://services.gradle.org/distributions/gradle-4.4-all.zip - Sync your project with Gradle files and check if the Design tab returns.
- Open your project's root
内容的提问来源于stack exchange,提问作者ni gi
相关产品推荐
相关产品推荐

