问题
I am trying to import a git project from Bitbucket to Android Studio 3.2. However when I follow the steps New -> Project from Version Control-> Git, the project is imported but not in the right format and thus, it can't read the gradle file or identify the project as an android project.
After import, this is the view I see:
As you can see above, the only folder appearing is the java folder.
And when I switched to Project view, the following appears:
The app is seen as omasy however the real code is in omasyAndroid. Also the manifest file is not appearing in the right place.
This lead to the application not compiling because it can't read itself being an android project.
Any help would be highly appreciated.
回答1:
Importing a project like that implies (for AS) that your are importing a module, not starting a new project.
Start by creating a new, empty project. Then import the module or project from Github or Bitbucket
Voilá.
EDIT
By now you should've seen the only thing missing was a host directory and a build.gradle
file for the whole project structured like this:
buildscript {
...
repositories {
google()
jcenter()
}
dependencies {
....
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
来源:https://stackoverflow.com/questions/49780644/vcs-project-import-not-working-on-android-studio