Android: java.land.NoSuchFieldError after update to SDK 23

后端 未结 6 2331
孤独总比滥情好
孤独总比滥情好 2020-12-16 10:44

I updated to SDK 23 and updated the gradle.build to API 23, support library to 23.0.0, etc and am now getting the following error when trying to run the app (compiles just f

相关标签:
6条回答
  • 2020-12-16 11:00

    Using google play services version 8.1.0 instead of 8.4.0 solved on my side

    0 讨论(0)
  • 2020-12-16 11:01

    Thank you @zmarties for the answer , I want to add the details and links

    1. Remove 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar' from gradle
    2. Download actionbarsherlock module from this link!
    3. Verify that you have 'com.android.support:support-v4:20.0.0' or 23
    4. Open the actionbarsherlock module src change FloatMath to Math in AnimatorProxy.java
    5. Open the actionbarsherlock module src create variable fragments in class level scope as FragmentManagerImpl fragments = (FragmentManagerImpl) this.getSupportFragmentManager(); in Watson.java
    6. Replace all mFragments occurrence with fragments variable

    Thank you for the above answers .

    0 讨论(0)
  • 2020-12-16 11:04

    I did the some thing as you did , but I found gradle can solve dependencies, in External Libraries i cannot find support-v4-23.0.0,support-v7-23.0.0 and other lib which the version is 23.0.0. then I reverted back to compile 'com.android.support:support-v4:22.2.0', the problem solver @mraviator

    0 讨论(0)
  • 2020-12-16 11:05

    Did you change the theme view in the main layout from the design tab? Try changing it again to a Sherlock theme view at the design tab.

    0 讨论(0)
  • 2020-12-16 11:06

    I found that I could build ActionBarSherlock using SDK 23 if I made the following two sets of changes:

    • in AnimatorProxy.java, replace FloatMath calls with their corresponding Math calls
    • in Watson.java, replace the use of the mFragments field with a local variable fragments initialized via getActiveFragments(null), and then change the mFragment references to use the local variable
    0 讨论(0)
  • 2020-12-16 11:11

    i had the same problem when import project eclipse to Android Studio

    This is best solution for me

    I found that I could build ActionBarSherlock using SDK 23 if I made the following two sets of changes:

    in AnimatorProxy.java, replace FloatMath calls with their corresponding Math calls - i change FloatMath - to Math

    in Waston Class i had the error - mFragments.isadded So, i replace the follow code instead of checking

    mFragments.isadded != null

    to

    mFragments.getActiveFragments(mCreatedMenus)

    everywher when it required

    i had solve these issues.

    0 讨论(0)
提交回复
热议问题