Reputation: 2255
I create a project, both build.gradle
(Project) and build.gradle
(Module) are listed in Android folder structure normally, look likes Old Image 1, then I sync the project to remote GitHub in Android Studio 3.4.1.
I clone the project from GitHub in another PC, I find that build.gradle
(Project) disappear in Android folder structure in the another PC, look likes New Image 1, but I can find it in Project folder structure, look likes New Image 2. Why? BTW, the clone project can work well.
It seems that Github cause the problem, how can I fix it? Thanks!
Old Image 1
New Image 1
New Image 2
To InsurgentPointerException:
This is project level build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.40'
ext.anko_version = '0.10.8'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Again to InsurgentPointerException:
You can test it by clone from
You can download the project source code of Android Studio at
https://www.dropbox.com/s/ko8stedl135ohnt/MyTest.zip?dl=0
Upvotes: 8
Views: 1237
Reputation: 1186
So it seems like the Developers did that intentionally. IDK there probably used to be some setting for it but now I can't find it. This solution is a (rather lengthy) workaround.
build.gradle
and app/build.gradle
in the the Android View > Gradle Scripts (Optional)Upvotes: 1