There’s no permission for accessing the Downloads shared collection. Your app can access its own files in this collection. To access other apps’ files in this collection, however, you must allow the user to choose a file using the system’s file picker app.
If your app uses the Storage Access Framework, it doesn’t need to request these media-scoped permissions.
./gradlew clean clean项目 ./gradlew build 构建项目 /gradlew assembleDebug or /gradlew aD 编译并打Debug包 ./gradlew assembleRelease or /gradlew aR 编译并打Release的包 ./gradlew installRelease or /gradlew iR Release模式打包并安装 ./gradlew installDebug or /gradlew iD Debug模式打包并安装 ./gradlew uninstallRelease or ./gradlew uR 卸载Release模式包 ./gradlew uninstallDebug or ./gradlew uD 卸载Debug模式包 需要说明的是这些命令可以叠加使用,例如: ./gradlew clean build --info > bugtags.log
/** * 探究JVM 堆内存溢出,堆当中存储的是对象的实例,只要我们不断的new对象实例 就OK * @author pengchengliu * JVM Args: -Xms20m -Xmx20m -XX:+HeapDumpOnOutOfMemoryError * */ publicclassHeapOOM{ staticclassOOMObject{} publicstaticvoidmain(String[] args){ List<OOMObject> list = new ArrayList<OOMObject>(); while (true) { list.add(new OOMObject()); } } } java.lang.OutOfMemoryError: Java heap space Dumping heap to java_pid795.hprof ... Heap dump file created [27575251 bytes in 0.114 secs] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:3210) at java.util.Arrays.copyOf(Arrays.java:3181) at java.util.ArrayList.grow(ArrayList.java:261) at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:235) at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:227) at java.util.ArrayList.add(ArrayList.java:458) at outofmemoryerror.HeapOOM.main(HeapOOM.java:19)
当JVM堆当中出现OOM的异常还是比较常见的,当JVM当中出现堆内存溢出的时候。控制台上面便会抛出OOM异常,紧接着便会在后面出现 Java heap space 这样的字样,如果出现了这样的字样的时候,便可以得出当前的JVM堆现在状态便是内存溢出的状态。那么关于JVM堆内存溢出我们应该如何解决呢?