RedApparat / FaceDetector

Face detection for your Android app
Apache License 2.0
1.17k stars 197 forks source link

can not support internal storage? #40

Open lingdianguole opened 5 years ago

lingdianguole commented 5 years ago
Process: io.fotoapparat.facedetector.example, PID: 4320
io.fotoapparat.facedetector.AssetsExtractor$ExtractionException: Not a valid external directory: /mnt/internal_sd/Android/data/io.fotoapparat.facedetector.example/files
    at io.fotoapparat.facedetector.AssetsExtractor.ensureValidDirectory(AssetsExtractor.java:76)
    at io.fotoapparat.facedetector.AssetsExtractor.extractedFile(AssetsExtractor.java:69)
    at io.fotoapparat.facedetector.AssetsExtractor.extractIfNeeded(AssetsExtractor.java:29)
    at io.fotoapparat.facedetector.FaceDetector.ensureInitialized(FaceDetector.java:50)
    at io.fotoapparat.facedetector.FaceDetector.detectFaces(FaceDetector.java:42)
    at io.fotoapparat.facedetector.processor.FaceDetectorProcessor.processFrame(FaceDetectorProcessor.java:37)
    at io.fotoapparat.hardware.v1.PreviewStream1.dispatchFrame(PreviewStream1.java:115)
    at io.fotoapparat.hardware.v1.PreviewStream1.access$200(PreviewStream1.java:21)
    at io.fotoapparat.hardware.v1.PreviewStream1$2.run(PreviewStream1.java:103)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at java.lang.Thread.run(Thread.java:818)
littlebear333 commented 4 years ago

Same problem. Do you find the solution?

littlebear333 commented 4 years ago

I fixed the problem by changing the following two lines in AndroidManifest.

  <uses-permission tools:remove="android:maxSdkVersion" android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission tools:remove="android:maxSdkVersion" android:name="android.permission.READ_EXTERNAL_STORAGE" />