iampawan / Flutter-Music-Player

Flutter Music Player - First Open Source Flutter based material design music player with audio plugin to play local music files.
Apache License 2.0
1.72k stars 549 forks source link

Unable to build music player app due to missing key.properties file . #8

Closed ravindra4me closed 6 years ago

ravindra4me commented 6 years ago

I have downloaded the latest flutter music player and ran it in visual studio. The build is failing with the following error.

I'm relatively new to both Android and Flutter development

FAILURE: Build failed with an exception. Exit code 1 from: C:\Users\gidugum\Downloads\Flutter-Music-Player-master\Flutter-Music-Player-master\android\gradlew.bat app:properties: Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence. java.lang.IllegalStateException: compileSdkVersion is not specified. at com.google.common.base.Preconditions.checkState(Preconditions.java:456) at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:590) at com.android.build.gradle.BasePlugin.lambda$null$3(BasePlugin.java:555) at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81) at com.android.build.gradle.BasePlugin.lambda$createTasks$4(BasePlugin.java:551) at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:91) at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:80) at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42) at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230) at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149) at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58) at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324) .....

*** What went wrong: A problem occurred evaluating project ':app'.

C:\Users\gidugum\Downloads\Flutter-Music-Player-master\Flutter-Music-Player-master\android\key.properties (The system cannot find the file specified)**

manishkherde commented 6 years ago

It seems key.properties not committed. No worries... It is related to signing build in release. To solve- Open r\Flutter-Music-Player-master\android\app\build.gradle file and comment following lines- signingConfigs { // release { // keyAlias keystoreProperties['keyAlias'] // keyPassword keystoreProperties['keyPassword'] // storeFile file(keystoreProperties['storeFile']) // storePassword keystoreProperties['storePassword'] // } } buildTypes { // release { // signingConfig signingConfigs.release // } }

iampawan commented 6 years ago

@manishkherde Thanks for the support.

2bon commented 6 years ago

no, it don‘t work we shall cmt

Build file 'C:\Users\gidugum\Downloads\Flutter-Music-Player-master\Flutter-Music-Player-master\android\app\build.gradle' line: 19

//keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

fritz-playmaker commented 5 years ago

Comment keystoreProperties.load(new FileInputStream(keystorePropertiesFile))in build.gradle

also comment in build.gradle

signingConfigs {
// release {
// keyAlias keystoreProperties['keyAlias']
// keyPassword keystoreProperties['keyPassword']
// storeFile file(keystoreProperties['storeFile'])
// storePassword keystoreProperties['storePassword']
// }
}
buildTypes {
// release {
// signingConfig signingConfigs.release
// }
}