Giter Site home page Giter Site logo

android-development-problems-book's Introduction

Anurag's GitHub stats

android-development-problems-book's People

Contributors

hl5130 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

android-development-problems-book's Issues

使用Git切换分支的时候,Android Studio的项目会出现 Error:Please select Android SDK

背景

在分支A上有项目1(application类型),在分支B上有项目1(application类型)和项目2(application类型)。现在在分支B上可以运行项目1和项目2,然后切换到分支A上就只能运行项目1,然后再切换到分支B上却发现项目2也不能运行了,并且出现了 Error:Please select Android SDK

原因

local.propertities文件是配置Android Studio 的 SDK 和 NDK ,并且在.gitignore文件中被标注为忽略文件,所以切换分支的时候local.propertities是不会发生更改。并且每次切换分支的时候,Android Studio 都会重新Gradle一次,所以从分支A切换到分支B的时候,项目2的SDK位置需要重新查找一次,而Android Studio 在切换分支后不会自动更新SDK位置,需要手动更新一下。

解决办法

  1. local.propertities查看Android SDK的位置是否和电脑中的位置一致,如果不一致,就修改成正确的
  2. 按照“File - Sync Project With Gradle Files”的步骤操作就可以了

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.