Can't start empty activity in Android Studio (handling issues)
I am very close to giving up Android development. I do not currently have an Android phone, so I am trying to use emulators. In Eclipse, after fixing 500,000 bugs / bugs, I finally managed to start the emulator, but it kept getting stuck on the Android loading screen (even after 45 minutes), so someone recommended that I use Android Studio.
I downloaded this to my computer and when I tried to run an empty operation I got this error:
When I tried to play around with this action, I got a rendering error:
I saw something on the internet that said to use a downgraded Android version for the error to get away - however I only have 2 versions as you can see and none of them work.
I tried downloading / installing Android Studio on my laptop and getting the same problems. What's happening? I've spent 2 days trying to start a blank activity now and I'm really on the verge of just giving up. Any ideas?
EDIT: Trying Jorge Casarigo's suggestion, but can't find Open Modules when I right click
source to share
To fix this issue, follow these steps:
- Go to the application folder under Navigation.
- Right Click -> Open Module Settings
- Install compilation with SDK version as API 22 or lower (Lollipop)
- Set build version as 21.1.2
- Clear + Create Project
to use the new M preview, you will also need to use Android Studio 1.3 Preview (from channel feed).
source to share
This appears to be due to the fact that you are updating android build tools to "24.0.0 rc1", but not updating the gradle version plugin for 1.3.0-beta1.
Make sure you have yourProjectFolder / build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0-beta1' // or 1.2.3
}
And in yourProjectFolder / mainModuleName / build.gradle you have
android {
...
buildToolsVersion "24.0.0 rc1" // or 23.0.1
...
}
or alternatively use the latest stable build tools
source to share
To downgrade the SDK, you need to download a different SDK version. To do this, you need to launch the SDK Manager, which is the 4th image on the right:
This will allow you to download different versions of Android, allowing you to get API 19/20/21, which should fix your problem.
I get this rendering issue all the time and I have been developing for almost 2 years now, over 10 months on android studio. These rendering issues are only for previewing the activity, which is usually not very useful at all. If you don't have an Android device, my best suggestion would be to download the GenyMotion emulator . It's 1000x better than the built-in emulator, and even has an Android studio plugin that lets you run it from the IDE. If you need to check how the layout works, I would recommend just running the application in an emulator, as you will get a much better idea of ​​how things look, rather than trying to approximate it with a layout preview.
source to share