Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于提问 #24

Open
jenly1314 opened this issue Jun 25, 2018 · 2 comments
Open

关于提问 #24

jenly1314 opened this issue Jun 25, 2018 · 2 comments

Comments

@jenly1314
Copy link
Owner

jenly1314 commented Jun 25, 2018

提问前不要一上来就问为什么报错,请先看下报错相关信息,看看自己是否能解决,这样有利于提高解决问题的能力。一般运行不起来都是配置相关问题导致。

下面是列举一些可能出现的问题和处理方法:
1、如 Neither path nor baseDir may be null or empty string. path='null' 相关报错,原因是因为签名配置导致。
解决办法:注释掉签名相关配置即可。请注释build.gradle中签名相关的配置。示例如下:
// signingConfigs {
// config {
//
// //加载资源
// Properties properties = new Properties()
// InputStream inputStream = project.rootProject.file('local.properties').newDataInputStream() ;
// properties.load( inputStream )
//
// //读取文件
// def storeFileDir = properties.getProperty('storeFile.file')
// storeFile file( storeFileDir )
//
// //读取字段
// def key_keyAlias = properties.getProperty( 'keyAlias' )
// def key_keyPassword = properties.getProperty( 'keyPassword' ) ;
// def key_storePassword = properties.getProperty( 'storePassword' ) ;
//
// keyAlias key_keyAlias
// keyPassword key_keyPassword
// storePassword key_storePassword
// }
// }

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// signingConfig signingConfigs.config
}
}

2、关于Tinker does not support instant run mode, please trigger build by assembleDebug or disable instant相关报错。
解决办法:这个提示很清楚,请关闭instant run模式或屏蔽apply from: 'tinker-support.gradle'配置。

3、Tinker或Bugly相关报错。
因为这是17年初开发的、而bugly和tinker还在不断的迭代更新,不能保证哪天他不兼容以前版本了,或集成方式配置改了,而项目中的配置是:
//sdk
compile 'com.tencent.bugly:crashreport_upgrade:latest.release'
//ndk
compile 'com.tencent.bugly:nativecrashreport:latest.release'
当时最新版的Tinker好像是1.7.7版本,Bugly哪个版本记不太清了,只能用时间和Tinker版本反推Bugly版本了。所以,你可能会报Bugly或Tinker相关的错,这些都不是重点,关键是你要知道问题所在,怎么去处理,万变不离其宗,根据报错信息去分析并处理问题。(如果实在不知道怎么处理,要么用旧版本,还有个简单粗暴的,直接屏蔽掉Bugly和Tinker相关集成代码即可。)

@Everglowzz
Copy link

赞~

@Everglowzz
Copy link

大神运行的时候tinker也报错了没有用过热修复,是缺少.so库了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants