java - package org.powermock.api.easymock does not exist using gradle -
using gradle android.
i trying powermock
compile dependency.
i have dumbed down attempts working , still not working. below build.gradle , activity. doing way demonstrate error , trying working.
//error error: package org.powermock.api.easymock not exist import org.powermock.api.easymock.powermock;
//build.gradle apply plugin: 'com.android.application' android { compilesdkversion 21 buildtoolsversion "22.0.0" defaultconfig { applicationid "android.testing.powermock" minsdkversion 19 targetsdkversion 21 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.0.0' compile 'org.easymock:easymock:3.3.1' compile 'org.powermock:powermock-easymock-release-full:1.6.2' }
//mainactivity package android.testing.powermock; import org.powermock.api.easymock.powermock; public class mainactivity extends activity { //not important }
add dependency build.gradle
testcompile 'org.powermock:powermock-api-easymock:1.6.2'
if you're using outside of test classes change testcompile
compile
.
Comments
Post a Comment