stanfy / spoon-gradle-plugin

Gradle plugin for Spoon.
Apache License 2.0
353 stars 79 forks source link

Fixed #130

Closed sika78 closed 8 years ago

sika78 commented 8 years ago

Hello all,

I'm running 2 devices on Android N and M and when I call: Spoon.screenshot(solo.getCurrentActivity(), "Screenshot_" + getTime()); following trace is displayed in both cases: Caused by: java.lang.IllegalAccessException: Unable to create output dir: /storage/emulated/0/app_spoon-screenshots

I tried to see if others here, have, the same issue but I could not find. Do you guys have any ideas, what should I do?

Thanks!

Here is my setup: AndroidManifest.xml --------------------->

uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"

build.gradle ------------------->

dependencies { // Spoon-Gradle android plugin classpath 'com.stanfy.spoon:spoon-gradle-plugin:1.2.2'

spoon { adbTimeout = 600 // 600 seconds debug = true if (project.hasProperty('spoonDevice')) { def array = ((String)project.getProperty('spoonDevice')).split(",") devices = [] devices.addAll(array) }

if (project.hasProperty('spoonClassName')) {
    className = project.spoonClassName
}

// To grant permissions to Android M >= devices */
grantAllPermissions = true

}

// Testing-only dependencies
androidTestCompile 'com.squareup.spoon:spoon-client:1.6.4'
hram commented 7 years ago

Why did you close this issue? I'v the same issue IllegalAccessException: Unable to create output dir: /storage/emulated/0/app_spoon-screenshots/..... Can you help me?