Android Gradle sync failed (import project from github) -
hi guys download project github , imported in android studio , after imported getting error
gradle sync failed: cause: assert localprops['keystore.props.file'] | | | null [ndk.dir:e:\sdk\ndk-bundle, sdk.dir:e:\sdk] consult ide log more details (help | show log)
gradle file:
signingconfigs { release { def properties localprops = new properties() localprops.load(new fileinputstream(file('../local.properties'))) def properties keyprops = new properties() assert localprops['keystore.props.file']; keyprops.load(new fileinputstream(file(localprops['keystore.props.file']))) storefile file(keyprops["store"]) keyalias keyprops["alias"] storepassword keyprops["storepass"] keypassword keyprops["pass"] } } buildtypes { release { minifyenabled true proguardfiles getdefaultproguardfile('proguard-android.txt'), file('proguard-project.txt') signingconfig signingconfigs.release } publicbeta.initwith(buildtypes.release) publicbeta { minifyenabled true proguardfiles getdefaultproguardfile('proguard-android.txt'), file('proguard-project.txt') versionnamesuffix " beta " + versionprops['betanumber'] } publicdebug.initwith(buildtypes.publicbeta) publicdebug { debuggable true minifyenabled true proguardfiles getdefaultproguardfile('proguard-android.txt'), file('proguard-project.txt') versionnamesuffix " debug beta " + versionprops['betanumber'] } }
}
i realy don't know do.
does have suggestions?.
in root folder of project, should have keystore.properties
, local.properties
files.
keystore.properties
should have this:
store=/path/to/your.keystore alias=your_alias pass=your_password storepass=your_keystore_password
in local.properties
, add last line.
ndk.dir=/users/username/library/android/sdk/ndk-bundle sdk.dir=/users/username/library/android/sdk # add line below keystore.props.file=../keystore.properties
see a commit here or check the modified project.
or if need quick dirty fix, make gradle script same standard 1 replacing android block this:
android { compilesdkversion 23 buildtoolsversion "23.0.2" defaultconfig { minsdkversion rootproject.ext.minsdkversion targetsdkversion rootproject.ext.targetsdkversion versioncode 1 versionname "1.0" } lintoptions { abortonerror false } compileoptions { sourcecompatibility javaversion.version_1_7 targetcompatibility javaversion.version_1_7 } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } }
Comments
Post a Comment