Motion editor not working in Android studio 4.0.1 - android

I am trying to set up motion layout in android studio 4.0.1 and everything works fine until I edit in motion editor. It render fine but as soon as I edit something in motion scene it shows .
But I use
implementation 'com.google.android.material:material:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-rc1'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
and android build tool version is
classpath 'com.android.tools.build:gradle:4.0.1'
and gradle version is
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
I try clean>rebuild the project; invalidate cache and restart, delete lib fold in .idea. Is there any thing that I miss but need to config to work with Motion Layout?

Try implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta6' instead of implementation 'androidx.constraintlayout:constraintlayout:2.0.0-rc1' or other beta version here at Constraint Layout

Related

Android Studio XML doesn't show anything in Design View. (empty screen)

I checked other questions, but they all are about blank screen(white screen or theme). But in my case, it shows literally nothing.
I tried 'Force Refresh Layout'. But It didn't work. And only reboot can solve problem. just closing and opening Android Studio doesn't solve this problem(I even tried with removing cache and restart.)
Which one of Android Studio is related to Design View? I don't want to reboot and even though I reboot, this problem keep occurring, So, I need some better way to solve this problem.
Try this solution and see if any one actually works
Update your constraint layout dependency
change the dependencies in your gradle module file to something like this Specially and sync it implementation'androidx.constraintlayout:constraintlayout:2.1.1'
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
}
Invalidate Cache/restart
File>Invalidate Cache/restart
Disable and Enable android support apk
File>Settings>plugins>Under Installed section -> disable and enable and see if it works
You will be able to see if you use any Theme.AppCompat theme to your constraint layout. For example
android:theme="#style/AppTheme.NoActionBar"

Flutter Plugin Development - Unable to use ContextCompat in my Project

I am trying to develop a flutter plugin for android permissions. It through this error
I already search other different question here but none is solving my problem
have a look at this screenshot too
Image 2
this means I am unable to access .support class
I already tried to add
implementation 'com.android.support:appcompat-v7:28.0.0'
or
implementation 'com.android.support:appcompat-v4:28.0.0'
My Gradle file looks like this
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
implementation 'com.android.support:appcompat-v7:28.0.0'
}
after upgrading my plugin to Android X it through these errors
Error After Upgrading to Android X
Try migrating to AndroidX (if not already there) and change the support dependency to:
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.core:core:1.0.2'

Problem with rendering, how can I solve it?

I have a problem with the preview of my app.
In the log file i have a few errors :
This is a group project but I am the only one encountering this problem. I just downloaded Android Studio so I did not touch anything in the settings.
Any idea?
Add constraint layout dependency in build.gradle
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
Just click the blue text that prompt in your console
or try to add these into your gradle (app level)
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
And you can update them to latest version if Android Studio tells you there's a new version.

Android Navigation Component: Fragments are not visible in drop down list when adding destination from nav_graph.xml

When I am trying to add a destination when clicking
"New destination" button, from the dropdown list I am not able to see any fragments which are already there in my project.
I also face this issue when I am trying to add a blank fragment by clicking "Create a blank destination" option from the drop down.
I tried restarting the IDE, and this Android Navigation Component Not Displaying Fragment but it doesn't resolve my issue.
Navigation dependency: implementation "androidx.navigation:navigation-fragment:1.0.0-rc02"
My project is already migrated to AndroidX.
Am I missing something? Any help would be appreciated.
Gradle dependency:
def nav_version = "1.0.0-rc02"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.2-alpha02'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha02'
implementation 'androidx.cardview:cardview:1.0.0'
implementation "android.arch.navigation:navigation-fragment:$nav_version"
I had the same problem.
Just use these dependencies.
//Android Navigation Architecture
implementation "androidx.navigation:navigation-fragment-ktx:2.1.0-alpha05"
implementation "androidx.navigation:navigation-ui-ktx:2.1.0-alpha05"
I had the same problem and i solved it by simply checking the superior build-gradle for the kotlin version, it may be the case if you recently updated your kotlin plugin but didnt update your code.
So in android studio in project navigation bar(ANDROID): Gradle Scripts -> build.gradle(project) -> look for buildscript - ext and update "kotlin_version" for your kotlin plugin version (this can be checked in tools -> kotlin -> Configure kotlin plugin updates)
I also had the exact same problem, I was using older library version(1.0.0-alpha05)
But as soon as I switched to
implementation "android.arch.navigation:navigation-fragment-ktx:1.0.0"
implementation "android.arch.navigation:navigation-ui-ktx:1.0.0"
Other fragments started showing up!
I am facing this issue even with version 2.2.1. I have solved this by adding the fragment in the XML code. Then I am able to add actions from the visual editor.
Example:
<fragment
android:id="#+id/test"
android:name="com.example.test.ui.test.TestFragment"
android:label="Test Label"
tools:layout="#layout/fragment_test"/>
Sometimes Fragments don't show up in the graph because classes haven't been made for them. After calling onViewCreate within a class, while returning correct inflater they show up in the graph.
Just I built and Run the project once. Then Fragments appeared as destinations in the Fragments List in NavGraph.

Android Studio 3.1, No cached version available for offline mode

Big problem since upgrading to Android Studio 3.1, I get:
No cached version of com.github.bumptech.glide:compiler:4.6.1 available for offline mode
But I am not in offline mode as you can see here:
I tried Clean Project and Rebuild Project, all with no success.
I even rebooted my PC.
Here's my Build.gradle:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation "com.android.support:gridlayout-v7:27.1.0"
implementation 'com.android.support:exifinterface:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.code.gson:gson:2.8.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
}
I ran into this issue and "offline work" was unchecked inside gradle settings. After wasting 2 hours on it, I realized that I had --offline in the Command-line options of Build, Execution, Deployment > Compiler. So make sure you don't have that command listed there when you encounter this issue.
You should close Gradle offline-work model and clear compiler Command-line Options --offline:
The only thing that worked for me was to remove the "--offline" in "File -> Settings -> Compiler -> Command-line Options".
I don't know why this parameter was there but anyway...now it's ok.
Dont know what was going on, maybe it was really due to JCenter being partly down during the day. Probably because half the globe was upgrading Android Studio to 3.1.
I cleaned the cache (70.000 files!), no effect, except from a resulting hourlong download of thousands of files, mainly from JCenter, with at least 10 fails (time outs?) along the way.
End result: Gradle still complaing about
No cached version of com.github.bumptech.glide:compiler:4.6.1 available for offline mode
Then in desparation, I modified
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
to
`compile group: 'com.github.bumptech.glide', name: 'compiler', version:` '4.6.1'
in my Build.gradle.
The result was of course an error message.
After then changing back to where I came from
compile group: 'com.github.bumptech.glide', name: 'compiler', version: '4.6.1'
Bingo: all was good, no idea why.
Thanks for your help anyway
First My English is very poor,Sorry.
I meet this problem too,when I upgrade my AndroidStudio to 3.1 and update gradle 3.0.1 to 3.1.0 ,then I build to run my project,it is error “no version of butterknife in offline mode”,but I'm sure it’s not offline mode。I have tried to a lot of ways ,doesn't work.
Then I try to add dependences in AndroidStudio ProjectStructure--app--dependences,search and selected the butterknife,and then build to run.
It works!
https://blog.csdn.net/binglumeng/article/details/79747651
I hope It can help you!
have you tried invalidating your cache and restarting your android studio?
or else if your working behind a proxy network checkout this
link

Categories

Resources