Fixed
Status Update
Comments
am...@google.com <am...@google.com>
ot...@gmail.com <ot...@gmail.com> #2
I am getting the same problem after the latest update...
[Deleted User] <[Deleted User]> #3
I think this might be the same as issue 36949180 . As mentioned in the comments there, try:
As a temporary workaround, try turning off Preferences > Compiler > Use External Build.
As a temporary workaround, try turning off Preferences > Compiler > Use External Build.
[Deleted User] <[Deleted User]> #4
Deleting the out folder before rebuilding solves the problem
ma...@gmail.com <ma...@gmail.com> #5
turning off Preferences > Compiler > Use External Build doesn't work if you have other modules as dependencies.
da...@loylap.com <da...@loylap.com> #6
I'm having the same problem.
am...@google.com <am...@google.com> #7
Same issue here
am...@google.com <am...@google.com> #8
Also having this problem, but turning off Preferences > Compiler > Use External Build worked for me, even though I have other modules as dependencies, despite what jai.chan mentioned.
lo...@gmail.com <lo...@gmail.com> #9
[Comment deleted]
ro...@gmail.com <ro...@gmail.com> #10
Problem exists. Turning off "Use external build" helps.
ro...@gmail.com <ro...@gmail.com> #11
Also having the same problem.But I don't know How can I fix ?
or...@gmail.com <or...@gmail.com> #12
The problem is still there... :s
ty...@gmail.com <ty...@gmail.com> #13
having the same issue here too
ty...@gmail.com <ty...@gmail.com> #14
Still happens
ul...@gmail.com <ul...@gmail.com> #15
A shame that google is not able to solve this issue since several years but is able to pop out yet another android version.
[Deleted User] <[Deleted User]> #16
Android Studio 1.4 and this or similar bug is still here! My project is completely blocked due to inability to add a new activity class without getting "cannot find symbol" for it. The other classes are getting compiled except that activty. I've checked in the build/intermediates/classes - the activity .class is missing, not even compiled though it is hollow class, no syntax error.
Already tried:
Invalidate Cache and Restart - nope
Deleted /build directory and rebuild - nope
./gradlew clean of entire project - nope
Restarting after everything above - nope
Recreating a new blank activity - nope
Checked manifest entries for the activity - nope
Combination of the above - nope
Desperation mode: on
Already tried:
Invalidate Cache and Restart - nope
Deleted /build directory and rebuild - nope
./gradlew clean of entire project - nope
Restarting after everything above - nope
Recreating a new blank activity - nope
Checked manifest entries for the activity - nope
Combination of the above - nope
Desperation mode: on
ng...@gmail.com <ng...@gmail.com> #17
I've just managed to workaround it! Simple Refactor > Move to another package did remove the error, but after I moved it back to the original package the error appeared again. Have NO idea what's going on!
ra...@gmail.com <ra...@gmail.com> #18
Damn, I've found that class in the long forgotten exclude list in my build.gradle! What a stupid mistake of mine. Mystery revealed! (chuckle)
ar...@gmail.com <ar...@gmail.com> #19
I tried https://code.google.com/p/android/issues/detail?id=201793#c18 and it worked actually. But it has a drawback. When you change something in the bottom sheet when user is interacting, the bottom sheet is not redrawn.
sw...@gmail.com <sw...@gmail.com> #20
public class ExpandedBottomSheetDialog extends BottomSheetDialog {
public ExpandedBottomSheetDialog(@NonNull Context context) {
super(context);
}
protected ExpandedBottomSheetDialog(@NonNull Context context, boolean cancelable, OnCancelListener cancelListener) {
super(context, cancelable, cancelListener);
}
public ExpandedBottomSheetDialog(@NonNull Context context, @StyleRes int theme) {
super(context, theme);
}
@Override
public void show() {
super.show();
final View view = findViewById(R.id.design_bottom_sheet);
view.post (new Runnable() {
@Override
public void run() {
BottomSheetBehavior behavior = BottomSheetBehavior.from(view);
behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
}
});
}
}
this is the actual code that helped me
public ExpandedBottomSheetDialog(@NonNull Context context) {
super(context);
}
protected ExpandedBottomSheetDialog(@NonNull Context context, boolean cancelable, OnCancelListener cancelListener) {
super(context, cancelable, cancelListener);
}
public ExpandedBottomSheetDialog(@NonNull Context context, @StyleRes int theme) {
super(context, theme);
}
@Override
public void show() {
super.show();
final View view = findViewById(R.id.design_bottom_sheet);
@Override
public void run() {
BottomSheetBehavior behavior = BottomSheetBehavior.from(view);
behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
}
});
}
}
this is the actual code that helped me
me...@gmail.com <me...@gmail.com> #21
The issues can still be reproduced in material:1.0.0 - in ladscape tablet, you don't get it fully opened, user needs to drag it up.
ng...@gmail.com <ng...@gmail.com> #22
error: package android.support.design.widget does not exist
import android.support.design.widget.BottomSheetDialog;
import android.support.design.widget.BottomSheetDialog;
Description
"While BottomSheetBehavior captures the persistent bottom sheet case, this release also provides a BottomSheetDialog and BottomSheetDialogFragment to fill the modal bottom sheets use case. Simply replace AppCompatDialog or AppCompatDialogFragment with their bottom sheet equivalents to have your dialog styled as a bottom sheet."
So I changed my AppCompatDialog to BottomSheetDialog:
package my.package.ui.dialog;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.support.design.widget.BottomSheetDialog;
import my.package.R;
public class AccountActionsDialog extends BottomSheetDialog {
public AccountActionsDialog(Context context) {
super(context);
if (context instanceof Activity) {
setOwnerActivity((Activity) context);
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(getLayoutInflater().inflate(R.layout.dialog_account_actions, null));
}
}
Here is my layout file:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ff0000"
android:padding="16dp"
android:text="Delete account"
android:textColor="#ffffff" />
</LinearLayout>
Then I use the following code in my Activity:
new AccountActionsDialog(this).show();
My screen becomes dimmed but the content of my dialog is not visible. It works fine when I use AppCompatDialog instead.
I've attached a sample project which demonstrates this behavior.
Device: Nexus 5X