Just I update my studio (version 2.3) and build version ('25.0.0'),
now, when i try to create new activity then automatically constraintlayout
dependency
added in my build.gradle
file.
and layout render as parent ConstraintLayout
, can anyone know how to remove this dependency when activity is created.
Before activity creation gradle code.
dependencies {
compile 'com.android.support:support-v4:23.2.1'
}
After activity creation gradle code.
dependencies {
compile 'com.android.support:support-v4:23.2.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0'
}
You can modify default template layout file in Android Studio resources, path to it:
Edit file
simple.xml.ftl
and change layout to your choice, notice that some layouts require additional elements (e. g.LinearLayout
needsandroid:orientation
), save file and create activity in Android Studio, it should work.Mine looks like this (I have 2.2.3 so I have RelativeLayout)