After updating Android Studio and everything related to the SDK manager, I can no longer create simple applications containing one Blank Activity, due to all these rendering problems. The selection of empty activity still seems manageable, though.
Returning to my Blank Activity problem, this is a summary of my environment:
Android Studio 1.5.1 Android SDK Tools 24.4.1 Android SDK Platform Tools 23.1 Android SDK Build Tools 23.0.2 Android Support Library 23.2
I see a ton of error messages about rendering problems for both Activity_main.xml and content_main.xml. I changed the theme to Holo Light, I lowered the API level in the IDE to 19, but to no avail. I have both activity_main.xml and content_main.xml displaying gray coordinates of Layout. Therefore, I cannot drag any components onto the layout in the IDE. What am I missing ?!
Edit 10/10/2016: adding installation details and error messages ...
This is the file of my build.gradle application:
apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.udemycourse.notes" minSdkVersion 19 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.2.0' compile 'com.android.support:design:23.2.0' }
Missing styles. Is the correct theme chosen for this layout? Note: One or more layouts are missing the layout_width or layout_height attributes. These are required in most layouts. The following classes could not be instantiated: android.support.design.widget.AppBarLayout android.support.design.widget.CoordinatorLayout android.support.design.widget.FloatingActionButton
The exception displayed in the rendering window is: java.lang.IllegalArgumentException: you need to use Theme.AppCompat (or child) theme using the design library. in android.support.design.widget.ThemeUtils.checkAppCompatTheme (ThemeUtils.java:34) in android.support.design.widget.AppBarLayout. (AppBarLayout.java:145) at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance (Unknown source) at sun.reflect.DelegatingConstructorAccessorImpl.new.lnew.lnew.lnew.lnew.lnew.lnew.lnew.lnew.lnew.lnew Constructor.newInstance (Unknown source) in org.jetbrains.android.uipreview.ViewLoader.createNewInstance (ViewLoader.java:458) in org.jetbrains.android.uipreview.ViewLoader.loadClass (ViewLoader.java:170) in org.jet:jet android.uipreview.ViewLoader.loadView (ViewLoader.java:103) in com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView (LayoutlibCallbackImpl.java:168) in android.view.BridgeInflater.loadCustomView (BridgeInflater.java:77) in android.view.BridgeInflater.createViewFromTag (BridgeInflater.java:171) in android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:704) in android.view.LayoutInflat er.rInflate_Original (LayoutInflater.java:835) in android.view.LayoutInflater_Delegate.rInflate (LayoutInflater_Delegate.java:70) on android.view.LayoutInflater.rInflate (LayoutInflater.java:811) at android.viewChrenoutay .java: 798) on android.view.LayoutInflater.inflate (LayoutInflater.java<15) on android.view.LayoutInflater.inflate (LayoutInflater.javaI9494) in com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate ( RenderSessionImpl.java:223) at com.android.layoutlib.bridge.Bridge.createSession (Bridge.java:426) in com.android.ide.common.rendering.LayoutLibrary.createSession (LayoutLibrary.javahaps50) in com.android .tools.idea.rendering.RenderTask $ 2.compute (RenderTask.java∗10) in com.android.tools.idea.rendering.RenderTask $ 2.compute (RenderTask.java:498) in com.intellij.openapi.application.impl .ApplicationImpl.runReadAction (ApplicationImpl.java:888) in com.android.tools.idea.rendering.RenderTask.createRenderSession (RenderTask .java: 498) in com.android.tools.idea.rendering.RenderTask.access $ 600 (RenderTask.java:72) in com.android.tools.idea.rendering.RenderTask $ 3.call (RenderTask.java:610) in com.android.tools.idea.rendering.RenderTask $ 3.call (RenderTask.java:607) in com.android.tools.idea.rendering.RenderService.runRenderAction (RenderService.java data62) in com.android.tools.idea .rendering.RenderTask.render (RenderTask.java:607) at com.android.tools.idea.rendering.RenderTask.render (RenderTask.java:629) at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel $ 6.run ( AndroidDesignerEditorPanel.java:480) in com.intellij.util.ui.update.MergingUpdateQueue.execute (MergingUpdateQueue.javahaps20) in com.intellij.util.ui.update.MergingUpdateQueue.execute com10ingUpdateQueue.execute com10ingUpdateQueue.execute com10 .intellij.util.ui.update.MergingUpdateQueue $ 2.run (MergingUpdateQueue.java:254) at com.intellij.util.ui.update.MergingUpdateQueue.flush (MergingUpdateQueue.java:269) in com.intellij. update .MergingUpdateQueue.flush (MergingUpdateQueue.java:227) in com.intellij.util.ui.update.MergingUpdateQueue.run (MergingUpdateQueue.java:217) in com.intellij.util.concurrency.Queuejorporor.oruejorpororpororjorporor.orueorporor ) at com.intellij.util.Alarm $ Request $ 1.run (Alarm.javahaps51) in java.util.concurrent.Executors $ RunnableAdapter.call (Unknown source) in java.util.concurrent.FutureTask.run (Unknown source ) in java.util.concurrent.ThreadPoolExecutor.runWorker (Unknown source) in java.util.concurrent.ThreadPoolExecutor $ Worker.run (Unknown source) in java.lang.Thread.run (Unknown source)
source share