我在android studio中开发了一个应用程序,并尝试通过gmail和shareIt应用程序将apk共享给其他人。他们正在获取apk文件并安装。但是当他们启动应用程序时,它崩溃了。我测试了许多设备。为什么会这样发生,解决方案是什么。
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.lithium.passenger"
minSdkVersion 16
targetSdkVersion 25
}
dependencies {
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/picasso-2.5.0.jar')
compile 'com.android.support:design:25.2.0'
/*Recycler view*/
compile 'com.android.support:recyclerview-v7:25.2.0'
/*Card view*/
compile 'com.android.support:cardview-v7:25.2.0'
/*Google services*/
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-location:8.4.0'
compile 'com.google.android.gms:play-services-analytics:8.4.0'
/*Fabric-Crashlytics*/
compile('com.crashlytics.sdk.android:crashlytics:2.2.3@aar') {
transitive = true;
}
/*Volley lib*/
compile 'com.mcxiaoke.volley:library:1.0.16'
compile 'com.google.code.gson:gson:2.2.4'
compile files('libs/tarentoconnectionlib.jar')
/*Multi dex*/
compile 'com.android.support:multidex:1.0.1'
}
我使用api 22和23对设备进行了测试
最佳答案
尽管没有logs
可以帮助我们了解crash
的确切原因
仍然从您的描述看来。
They are getting the apk file and installed
仅安装意味着它们的设备比
minSDKVersion
高端。 16
。除非您这样做,否则单独安装将无法保证正常运行。
I tested with devices with api 22 and 23
问题可能是-在某些情况下,您正在使用在较低的
API
设备中不存在的依赖项/功能,并且您可能未采取预防措施来处理此问题。这可能是低端设备崩溃的原因。
如果您发布
Logs
,那将会有所帮助。
关于android - 当我通过gmail或shareIt共享apk而没有启动时,android应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42807167/