Unresolved reference: setViewScale - android

I am using DrawerLayout instead of AdvancedDrawerLayout on Android Studio and I am stuck. The error I encounter is : Unresolved reference: setViewScale
Here is the code:
drawerLayout.setViewScale(GravityCompat.START, 0.9f)
So it seems like setViewScale is under AdvancedDrawerLayout and not DrawerLayout.
How should I rename the reference?

Related

Unresolved reference: MifosNotification_Table

When I try to run my app i get the following error:
Unresolved reference: MifosNotification_Table
I tried different versions and still no difference

android studio unresolved reference

I try to run my app and get this errors
e: /Users/idanfadlon/Desktop/Law-Tech-App/app/src/main/java/com/example/law_tech_app/fragments/BaseFragment.kt: (11, 24): Unresolved reference: synthetic
2.e: /Users/idanfadlon/Desktop/Law-Tech-App/app/src/main/java/com/example/law_tech_app/fragments/BaseFragment.kt: (19, 25): Unresolved reference: tv_progress_text
3.e: /Users/idanfadlon/Desktop/Law-Tech-App/app/src/main/java/com/example/law_tech_app/fragments/BaseFragment.kt: (19, 42): Variable expected
the problem is in base activity file and I dont touch him
I try to pull project again from my repository

Error "Unresolved reference: _root_ide_package_" after changing the package name

When I changed my package name and rebuilt the project, Android Studio put before many class names this string _root_ide_package_.com.example.<myprojectname>. And I have this error Unresolved reference: _root_ide_package_. Any ideas how to fix it?
While posting a code example would help, I had a similar issue and resolved it by doing a Replace in Path across the source tree and replaced all instances of _root_ide_package_.com.example.<myprojectname>. with nothing.
Just remove anything before the class name, for example:
_root_ide_package_.com.<project_name>.APP
Remove _root_ide_package_.com.<project_name>.

error: cannot find symbol class 'of' (Android Studio: Can't Resolve Symbol 'of')

Can't resolve symbol 'of' << Image
Does anyone know why Android Studio is giving me the error 'error: cannot find symbol class 'of'?
I'm trying to use the 'ModelViewProviders.of(Fragment fragment)'
You should use ViewModelProviders.of(Fragment f). Please check.
ViewModelProviders.of() is a static method, therefore you should remove the new keyword:
mWordViewModel = ViewModelProviders.of(this).get(WordViewModel.class)
Note that as per the ViewModelProviders documentation, this class is deprecated and if you're using the latest version of Fragments, you'd instead use new ViewModelProvider(this).get(WordViewModel.class)

Dagger + ButterKnife = Could not initialize class dagger.internal.codegen.ModuleAdapterProcessor

I have a project where I'm using ButterKnife for view injection, and I just added dagger but I'm getting the following error:
Description Resource Path Location Type Internal compiler error:
java.lang.NoClassDefFoundError: Could not initialize class
dagger.internal.codegen.ModuleAdapterProcessor at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) R.java /Suggest/gen/com/google/android/gms line 0 Java Problem
I'm using eclipse and I have the following in my Annotation config:
notice: I have written one #module with its #provides ... correctly, then removed it and still I'm having the same compilation error
I followed this comment to setup Annotation processing:
https://github.com/square/dagger/issues/126#issuecomment-11992320
I'm not sure if it's code-related or dependency and versions related, I just need someone to point me to the possibilities behind this error
For those looking for a solution, I just found out that using JavaWriter 2.1.1 Fixed the problem

Categories

Resources