Intellij Idea 2018.2.5 CE Android development issue, android sdk v28 is unstable/rendering issue
First of all, I researched alot and this question is not a duplicate of Rendering Issue in Android Studio its answer doesn't fix my problem (i already have the same configuration that is in its answer). Secondly I tried cleaning project, rebuilding project, running gradle sync too. Issue still persist.
After starting a new project, i used to load a template basic activity but the layout xml files are actually not rendering.
Error:
It says Failed to instantiate one or more classes
inside that i see
The following classes could not be instantiated:
- android.support.design.widget.CoordinatorLayout (Open Class, Show Exception, Clear Cache)
- android.support.design.widget.AppBarLayout (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE.
If this is an unexpected error you can also try to build the project, then manually refresh the layout.
Exception Details
java.lang.ClassNotFoundException: android.view.View$OnUnhandledKeyEventListener
Copy stack to clipboard
my styles.xml file is:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="coordinatorLayoutStyle">@style/Widget.Support.CoordinatorLayout</item>
<item name="floatingActionButtonStyle">@style/Widget.Design.FloatingActionButton</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
</resources>
My gradle is using this dependency: and compilation and target sdk version is 28
implementation 'com.android.support:appcompat-v7:28.0.0'
Right now it looks like:
EDIT 1:
So now at this point, i tried many things and found myself that the rendering issue is only in SdkVersion 28. When I use
android {
compileSdkVersion 27
defaultConfig {
targetSdkVersion 27
...
}
...
}
dependencies {
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
...
}
It doesn't appear to be, so I want to investigate what's wrong with sdk version 28? I mean like whenever you make a project you get default config for version 28 and when i try this above snippet i still get warning that v27 is older, why? if v28 not stable enough then why is it default? I don't understand I want some useful answer for why this is!
Thanks everyone who used time to read my question.
android android-layout intellij-idea sdk rendering
|
show 1 more comment
First of all, I researched alot and this question is not a duplicate of Rendering Issue in Android Studio its answer doesn't fix my problem (i already have the same configuration that is in its answer). Secondly I tried cleaning project, rebuilding project, running gradle sync too. Issue still persist.
After starting a new project, i used to load a template basic activity but the layout xml files are actually not rendering.
Error:
It says Failed to instantiate one or more classes
inside that i see
The following classes could not be instantiated:
- android.support.design.widget.CoordinatorLayout (Open Class, Show Exception, Clear Cache)
- android.support.design.widget.AppBarLayout (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE.
If this is an unexpected error you can also try to build the project, then manually refresh the layout.
Exception Details
java.lang.ClassNotFoundException: android.view.View$OnUnhandledKeyEventListener
Copy stack to clipboard
my styles.xml file is:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="coordinatorLayoutStyle">@style/Widget.Support.CoordinatorLayout</item>
<item name="floatingActionButtonStyle">@style/Widget.Design.FloatingActionButton</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
</resources>
My gradle is using this dependency: and compilation and target sdk version is 28
implementation 'com.android.support:appcompat-v7:28.0.0'
Right now it looks like:
EDIT 1:
So now at this point, i tried many things and found myself that the rendering issue is only in SdkVersion 28. When I use
android {
compileSdkVersion 27
defaultConfig {
targetSdkVersion 27
...
}
...
}
dependencies {
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
...
}
It doesn't appear to be, so I want to investigate what's wrong with sdk version 28? I mean like whenever you make a project you get default config for version 28 and when i try this above snippet i still get warning that v27 is older, why? if v28 not stable enough then why is it default? I don't understand I want some useful answer for why this is!
Thanks everyone who used time to read my question.
android android-layout intellij-idea sdk rendering
Have you tried this : stackoverflow.com/questions/26575815/… ?
– B.M
Nov 14 '18 at 16:13
@B.M yeah i just tried still problem persists.
– Animesh Sahu
Nov 14 '18 at 16:19
Have you tried to change <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> to <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"> ?
– y.bedrov
Nov 15 '18 at 11:15
@y.bedrov yeah already did it before asking question.
– Animesh Sahu
Nov 15 '18 at 11:29
have you imported the design library?
– Dr4ke the b4dass
Nov 21 '18 at 1:20
|
show 1 more comment
First of all, I researched alot and this question is not a duplicate of Rendering Issue in Android Studio its answer doesn't fix my problem (i already have the same configuration that is in its answer). Secondly I tried cleaning project, rebuilding project, running gradle sync too. Issue still persist.
After starting a new project, i used to load a template basic activity but the layout xml files are actually not rendering.
Error:
It says Failed to instantiate one or more classes
inside that i see
The following classes could not be instantiated:
- android.support.design.widget.CoordinatorLayout (Open Class, Show Exception, Clear Cache)
- android.support.design.widget.AppBarLayout (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE.
If this is an unexpected error you can also try to build the project, then manually refresh the layout.
Exception Details
java.lang.ClassNotFoundException: android.view.View$OnUnhandledKeyEventListener
Copy stack to clipboard
my styles.xml file is:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="coordinatorLayoutStyle">@style/Widget.Support.CoordinatorLayout</item>
<item name="floatingActionButtonStyle">@style/Widget.Design.FloatingActionButton</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
</resources>
My gradle is using this dependency: and compilation and target sdk version is 28
implementation 'com.android.support:appcompat-v7:28.0.0'
Right now it looks like:
EDIT 1:
So now at this point, i tried many things and found myself that the rendering issue is only in SdkVersion 28. When I use
android {
compileSdkVersion 27
defaultConfig {
targetSdkVersion 27
...
}
...
}
dependencies {
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
...
}
It doesn't appear to be, so I want to investigate what's wrong with sdk version 28? I mean like whenever you make a project you get default config for version 28 and when i try this above snippet i still get warning that v27 is older, why? if v28 not stable enough then why is it default? I don't understand I want some useful answer for why this is!
Thanks everyone who used time to read my question.
android android-layout intellij-idea sdk rendering
First of all, I researched alot and this question is not a duplicate of Rendering Issue in Android Studio its answer doesn't fix my problem (i already have the same configuration that is in its answer). Secondly I tried cleaning project, rebuilding project, running gradle sync too. Issue still persist.
After starting a new project, i used to load a template basic activity but the layout xml files are actually not rendering.
Error:
It says Failed to instantiate one or more classes
inside that i see
The following classes could not be instantiated:
- android.support.design.widget.CoordinatorLayout (Open Class, Show Exception, Clear Cache)
- android.support.design.widget.AppBarLayout (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE.
If this is an unexpected error you can also try to build the project, then manually refresh the layout.
Exception Details
java.lang.ClassNotFoundException: android.view.View$OnUnhandledKeyEventListener
Copy stack to clipboard
my styles.xml file is:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="coordinatorLayoutStyle">@style/Widget.Support.CoordinatorLayout</item>
<item name="floatingActionButtonStyle">@style/Widget.Design.FloatingActionButton</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
</resources>
My gradle is using this dependency: and compilation and target sdk version is 28
implementation 'com.android.support:appcompat-v7:28.0.0'
Right now it looks like:
EDIT 1:
So now at this point, i tried many things and found myself that the rendering issue is only in SdkVersion 28. When I use
android {
compileSdkVersion 27
defaultConfig {
targetSdkVersion 27
...
}
...
}
dependencies {
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
...
}
It doesn't appear to be, so I want to investigate what's wrong with sdk version 28? I mean like whenever you make a project you get default config for version 28 and when i try this above snippet i still get warning that v27 is older, why? if v28 not stable enough then why is it default? I don't understand I want some useful answer for why this is!
Thanks everyone who used time to read my question.
android android-layout intellij-idea sdk rendering
android android-layout intellij-idea sdk rendering
edited Nov 17 '18 at 9:28
Animesh Sahu
asked Nov 14 '18 at 16:10
Animesh SahuAnimesh Sahu
136315
136315
Have you tried this : stackoverflow.com/questions/26575815/… ?
– B.M
Nov 14 '18 at 16:13
@B.M yeah i just tried still problem persists.
– Animesh Sahu
Nov 14 '18 at 16:19
Have you tried to change <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> to <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"> ?
– y.bedrov
Nov 15 '18 at 11:15
@y.bedrov yeah already did it before asking question.
– Animesh Sahu
Nov 15 '18 at 11:29
have you imported the design library?
– Dr4ke the b4dass
Nov 21 '18 at 1:20
|
show 1 more comment
Have you tried this : stackoverflow.com/questions/26575815/… ?
– B.M
Nov 14 '18 at 16:13
@B.M yeah i just tried still problem persists.
– Animesh Sahu
Nov 14 '18 at 16:19
Have you tried to change <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> to <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"> ?
– y.bedrov
Nov 15 '18 at 11:15
@y.bedrov yeah already did it before asking question.
– Animesh Sahu
Nov 15 '18 at 11:29
have you imported the design library?
– Dr4ke the b4dass
Nov 21 '18 at 1:20
Have you tried this : stackoverflow.com/questions/26575815/… ?
– B.M
Nov 14 '18 at 16:13
Have you tried this : stackoverflow.com/questions/26575815/… ?
– B.M
Nov 14 '18 at 16:13
@B.M yeah i just tried still problem persists.
– Animesh Sahu
Nov 14 '18 at 16:19
@B.M yeah i just tried still problem persists.
– Animesh Sahu
Nov 14 '18 at 16:19
Have you tried to change <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> to <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"> ?
– y.bedrov
Nov 15 '18 at 11:15
Have you tried to change <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> to <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"> ?
– y.bedrov
Nov 15 '18 at 11:15
@y.bedrov yeah already did it before asking question.
– Animesh Sahu
Nov 15 '18 at 11:29
@y.bedrov yeah already did it before asking question.
– Animesh Sahu
Nov 15 '18 at 11:29
have you imported the design library?
– Dr4ke the b4dass
Nov 21 '18 at 1:20
have you imported the design library?
– Dr4ke the b4dass
Nov 21 '18 at 1:20
|
show 1 more comment
1 Answer
1
active
oldest
votes
Before proceeding with the answer, make sure you have the latest Android Studio. It handles API v28 in a much better way. This update on its own might solve your problem, but if it doesn't, read below:
AndroidX
Try migrating to AndroidX. In the latest Android Studio 3.2 there is a feature called 'Refactor to AndroidX' under the 'Refactor' menu, which makes the whole process easier.
AndroidX is basically google renaming all of the packages to make the naming clearer. More information on that can be found here and here.
I know this is not a direct answer to your question, but I am confident it will solve it. There are many bugs and other irritating errors that Android Studio produces, that I don't see any other IDE makes - I am referring to those that are unclear about what went wrong.
I believe by making AndroidX google addresses this issue in some way. It does definitely make some things clearer and easier, and I recommend migrating to it, in order to solve your problem, and for good practice.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53304423%2fintellij-idea-2018-2-5-ce-android-development-issue-android-sdk-v28-is-unstable%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Before proceeding with the answer, make sure you have the latest Android Studio. It handles API v28 in a much better way. This update on its own might solve your problem, but if it doesn't, read below:
AndroidX
Try migrating to AndroidX. In the latest Android Studio 3.2 there is a feature called 'Refactor to AndroidX' under the 'Refactor' menu, which makes the whole process easier.
AndroidX is basically google renaming all of the packages to make the naming clearer. More information on that can be found here and here.
I know this is not a direct answer to your question, but I am confident it will solve it. There are many bugs and other irritating errors that Android Studio produces, that I don't see any other IDE makes - I am referring to those that are unclear about what went wrong.
I believe by making AndroidX google addresses this issue in some way. It does definitely make some things clearer and easier, and I recommend migrating to it, in order to solve your problem, and for good practice.
add a comment |
Before proceeding with the answer, make sure you have the latest Android Studio. It handles API v28 in a much better way. This update on its own might solve your problem, but if it doesn't, read below:
AndroidX
Try migrating to AndroidX. In the latest Android Studio 3.2 there is a feature called 'Refactor to AndroidX' under the 'Refactor' menu, which makes the whole process easier.
AndroidX is basically google renaming all of the packages to make the naming clearer. More information on that can be found here and here.
I know this is not a direct answer to your question, but I am confident it will solve it. There are many bugs and other irritating errors that Android Studio produces, that I don't see any other IDE makes - I am referring to those that are unclear about what went wrong.
I believe by making AndroidX google addresses this issue in some way. It does definitely make some things clearer and easier, and I recommend migrating to it, in order to solve your problem, and for good practice.
add a comment |
Before proceeding with the answer, make sure you have the latest Android Studio. It handles API v28 in a much better way. This update on its own might solve your problem, but if it doesn't, read below:
AndroidX
Try migrating to AndroidX. In the latest Android Studio 3.2 there is a feature called 'Refactor to AndroidX' under the 'Refactor' menu, which makes the whole process easier.
AndroidX is basically google renaming all of the packages to make the naming clearer. More information on that can be found here and here.
I know this is not a direct answer to your question, but I am confident it will solve it. There are many bugs and other irritating errors that Android Studio produces, that I don't see any other IDE makes - I am referring to those that are unclear about what went wrong.
I believe by making AndroidX google addresses this issue in some way. It does definitely make some things clearer and easier, and I recommend migrating to it, in order to solve your problem, and for good practice.
Before proceeding with the answer, make sure you have the latest Android Studio. It handles API v28 in a much better way. This update on its own might solve your problem, but if it doesn't, read below:
AndroidX
Try migrating to AndroidX. In the latest Android Studio 3.2 there is a feature called 'Refactor to AndroidX' under the 'Refactor' menu, which makes the whole process easier.
AndroidX is basically google renaming all of the packages to make the naming clearer. More information on that can be found here and here.
I know this is not a direct answer to your question, but I am confident it will solve it. There are many bugs and other irritating errors that Android Studio produces, that I don't see any other IDE makes - I am referring to those that are unclear about what went wrong.
I believe by making AndroidX google addresses this issue in some way. It does definitely make some things clearer and easier, and I recommend migrating to it, in order to solve your problem, and for good practice.
answered Nov 21 '18 at 17:45
Ido Fang BentovIdo Fang Bentov
12218
12218
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53304423%2fintellij-idea-2018-2-5-ce-android-development-issue-android-sdk-v28-is-unstable%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you tried this : stackoverflow.com/questions/26575815/… ?
– B.M
Nov 14 '18 at 16:13
@B.M yeah i just tried still problem persists.
– Animesh Sahu
Nov 14 '18 at 16:19
Have you tried to change <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> to <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"> ?
– y.bedrov
Nov 15 '18 at 11:15
@y.bedrov yeah already did it before asking question.
– Animesh Sahu
Nov 15 '18 at 11:29
have you imported the design library?
– Dr4ke the b4dass
Nov 21 '18 at 1:20