Build failed with an exception
l-ll opened this issue · comments
npm run android
* Where:
Build file '/Users/l/project/native/noder-react-native/android/app/build.gradle' line: 104
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not find property 'MYAPP_RELEASE_STORE_FILE' on SigningConfig_Decorated{name=release, storeFile=null, storePassword=null, keyAlias=null, keyPassword=null, storeType=null}.
Just see : http://facebook.github.io/react-native/docs/signed-apk-android.html#content
You should gen a new key.
Android的项目配置有签名,但是调试过程中并不需要。
移除签名的方法:
打开 android/app/build.gradle
注释掉这四行:https://github.com/soliury/noder-react-native/blob/master/android/app/build.gradle#L104
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
对,但是注释掉以后吧,他要是提交代码还得注释回去
如果不打算PR,最好就注释掉
这个配置只有在打包release的时候才需要,但是如果真的要打包release,包名要不要改?这个文件一定是要动的
我就想编译学习一下,与其复杂的生成签名,不如直接就注释掉
如果我打算PR,攒着这个文件不提交就完了
恩恩,也对