Giter Club home page Giter Club logo

Comments (7)

Blankj avatar Blankj commented on July 30, 2024

那你试试里面的getSDCardInfo呢,或者提供下报错信息

from androidutilcode.

BroganGrow avatar BroganGrow commented on July 30, 2024

同样报错,oppo的系统内部好像没这个方法

from androidutilcode.

BroganGrow avatar BroganGrow commented on July 30, 2024

10-31 10:13:59.666: E/AndroidRuntime(4503): FATAL EXCEPTION: main
10-31 10:13:59.666: E/AndroidRuntime(4503): java.lang.NoSuchMethodError: android.os.StatFs.getBlockCountLong
10-31 10:13:59.666: E/AndroidRuntime(4503): at com.blankj.utilcode.utils.SDCardUtils.getSDCardInfo(SDCardUtils.java:118)
10-31 10:13:59.666: E/AndroidRuntime(4503): at com.show.shuaji.activity.MainActivity.initView(MainActivity.java:66)
10-31 10:13:59.666: E/AndroidRuntime(4503): at com.show.shuaji.activity.MainActivity.onCreate(MainActivity.java:59)
10-31 10:13:59.666: E/AndroidRuntime(4503): at android.app.Activity.performCreate(Activity.java:5203)
10-31 10:13:59.666: E/AndroidRuntime(4503): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1156)
10-31 10:13:59.666: E/AndroidRuntime(4503): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2329)
10-31 10:13:59.666: E/AndroidRuntime(4503): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2429)
10-31 10:13:59.666: E/AndroidRuntime(4503): at android.app.ActivityThread.access$600(ActivityThread.java:166)
10-31 10:13:59.666: E/AndroidRuntime(4503): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1374)
10-31 10:13:59.666: E/AndroidRuntime(4503): at android.os.Handler.dispatchMessage(Handler.java:107)
10-31 10:13:59.666: E/AndroidRuntime(4503): at android.os.Looper.loop(Looper.java:194)
10-31 10:13:59.666: E/AndroidRuntime(4503): at android.app.ActivityThread.main(ActivityThread.java:5427)
10-31 10:13:59.666: E/AndroidRuntime(4503): at java.lang.reflect.Method.invokeNative(Native Method)
10-31 10:13:59.666: E/AndroidRuntime(4503): at java.lang.reflect.Method.invoke(Method.java:525)
10-31 10:13:59.666: E/AndroidRuntime(4503): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
10-31 10:13:59.666: E/AndroidRuntime(4503): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
10-31 10:13:59.666: E/AndroidRuntime(4503): at dalvik.system.NativeStart.main(Native Method)
10-31 10:14:01.281: E/Parcel(4503): Reading a NULL string not supported here.

from androidutilcode.

Blankj avatar Blankj commented on July 30, 2024

安卓版本多少

from androidutilcode.

BroganGrow avatar BroganGrow commented on July 30, 2024

4.4

from androidutilcode.

Blankj avatar Blankj commented on July 30, 2024

用stat.getBlockSize();呢,就是把后面的Long全去掉

from androidutilcode.

BroganGrow avatar BroganGrow commented on July 30, 2024

还真是行了,oppo居然只支持以前的方法。。

from androidutilcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.