android приложение вылетает при загрузке в Google Play - PullRequest
1 голос
/ 29 мая 2020

Мое приложение работало нормально, когда я запускал его через Android Studio, но оно вылетало, когда я загружал его из магазина Google Play. Раньше он работал хорошо, но внезапно это произошло, ничего не меняя, это игра Google Play sh журнал:

      java.lang.NoClassDefFoundError: 
      at net.sourceforge.jtds.jdbc.Support.calculateNamedPipeBufferSize (Support.java)
      at net.sourceforge.jtds.jdbc.Support.class$ (Support.java)
      at net.sourceforge.jtds.jdbc.Support.convert (Support.java)
      at net.sourceforge.jtds.jdbc.Support.convertLOB (Support.java)
      at net.sourceforge.jtds.jdbc.Support.convertLOBType (Support.java)
      at net.sourceforge.jtds.jdbc.Support.encodeString (Support.java)
      at net.sourceforge.jtds.jdbc.Support.getJdbcType (Support.java)
      at net.sourceforge.jtds.jdbc.Support.getParameterDefinitions (Support.java)
      at net.sourceforge.jtds.jdbc.Support.getStatementKey (Support.java)
      at net.sourceforge.jtds.jdbc.Support.isWindowsOS (Support.java)
      at net.sourceforge.jtds.jdbc.Support.linkException (Support.java)
      at net.sourceforge.jtds.jdbc.Support.normalizeBigDecimal (Support.java)
      at net.sourceforge.jtds.jdbc.Support.substituteParamMarkers (Support.java)
      at net.sourceforge.jtds.jdbc.Support.timeFromZone (Support.java)
      at net.sourceforge.jtds.jdbc.Support.toHex (Support.java)
      at net.sourceforge.jtds.jdbc.Support.<clinit> (Support.java)
      at net.sourceforge.jtds.jdbc.Support.calculateNamedPipeBufferSize (Support.java)
      at net.sourceforge.jtds.jdbc.Support.class$ (Support.java)
      at net.sourceforge.jtds.jdbc.Support.convert (Support.java)
      at net.sourceforge.jtds.jdbc.Support.convertLOB (Support.java)
      at net.sourceforge.jtds.jdbc.Support.convertLOBType (Support.java)
      at net.sourceforge.jtds.jdbc.Support.encodeString (Support.java)
      at net.sourceforge.jtds.jdbc.Support.getJdbcType (Support.java)
      at net.sourceforge.jtds.jdbc.Support.getParameterDefinitions (Support.java)
      at net.sourceforge.jtds.jdbc.Support.getStatementKey (Support.java)
      at net.sourceforge.jtds.jdbc.Support.isWindowsOS (Support.java)
      at net.sourceforge.jtds.jdbc.Support.linkException (Support.java)
      at net.sourceforge.jtds.jdbc.Support.normalizeBigDecimal (Support.java)
      at net.sourceforge.jtds.jdbc.Support.substituteParamMarkers (Support.java)
      at net.sourceforge.jtds.jdbc.Support.timeFromZone (Support.java)
      at net.sourceforge.jtds.jdbc.Support.toHex (Support.java)
      at net.sourceforge.jtds.jdbc.ConnectionJDBC2.addStatement (ConnectionJDBC2.java)
      at net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkLocal (ConnectionJDBC2.java)
      at net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen (ConnectionJDBC2.java)
      at net.sourceforge.jtds.jdbc.ConnectionJDBC2.getSybaseInfo (ConnectionJDBC2.java)
      at net.sourceforge.jtds.jdbc.ConnectionJDBC2.parseBooleanProperty (ConnectionJDBC2.java)
      at net.sourceforge.jtds.jdbc.ConnectionJDBC2.setCollation (ConnectionJDBC2.java)
      at net.sourceforge.jtds.jdbc.TdsCore.z (TdsCore.java)
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken (TdsCore.java:4)
      at net.sourceforge.jtds.jdbc.TdsCore.login (TdsCore.java:43)
      at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init> (ConnectionJDBC2.java:16)
      at net.sourceforge.jtds.jdbc.Driver.connect (Driver.java:2)
      at java.sql.DriverManager.getConnection (DriverManager.java:569)
      at java.sql.DriverManager.getConnection (DriverManager.java:219)
      at info.xyz.yourapplication2.ConnectSQL.Run (ConnectSQL.java)
      at info.xyz.yourapplication2.ConnectSQL.connectionclass (ConnectSQL.java)
      at info.xyz.yourapplication2.getproducttype.a (getproducttype.java)
      at info.xyz.yourapplication2.MainActivity.onCreate (MainActivity.java:5)
      at android.app.Activity.performCreate (Activity.java:6942)
      at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1126)
      at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2880)
      at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2988)
      at android.app.ActivityThread.-wrap14 (ActivityThread.java)
      at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1631)
      at android.os.Handler.dispatchMessage (Handler.java:102)
      at android.os.Looper.loop (Looper.java:154)
      at android.app.ActivityThread.main (ActivityThread.java:6682)
      at java.lang.reflect.Method.invoke (Method.java)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1520)
      at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1410)

Есть идеи, что могло вызвать это?

Вот мой proguard-rules.pro.

# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

Заранее спасибо

Ответы [ 2 ]

0 голосов
/ 30 мая 2020

Должна быть проблема с вашим выпуском при использовании pro guard. Попробуйте изменить свойство gradle.App на

   buildTypes {
        release {
//try it without proguard
        }
}
0 голосов
/ 30 мая 2020

Мне кажется, это ошибка прогарда. Давайте добавим следующее в ваш proguard-rules.pro и проверим, решает ли это проблему.

-keep class net.sourceforge.jtds.jdbc.**
-keepclassmembers class net.sourceforge.jtds.jdbc.** { *; }
...