1

When Compiling my app in the debug build, I get no errors. But when compiled in release, I get runtime errors.

I have no clue where on earth to start with this, as all of the pointers go to an unknown source.

I have been unable to replicate this error because as said before, none of the pointers are helpful, so I don't know what/where the problem has came from

Below is the runtime error.

2019-11-02 21:12:45.696 22451-22471/? E/AndroidRuntime: FATAL EXCEPTION: GLThread 37524
    Process: flappy.birb, PID: 22451
    java.lang.RuntimeException: There is no public dispose() method in the class d.g.b$a
        at d.c.a.c(Unknown Source:5)
        at d.c.a.b(Unknown Source:99)
        at d.c.a.a(Unknown Source:64)
        at d.g.b.<init>(Unknown Source:203)
        at d.g.b.a(Unknown Source:6)
        at d.g.g.<init>(Unknown Source:10)
        at d.g.a.<init>(Unknown Source:0)
        at d.g.f.<init>(Unknown Source:0)
        at flappy.birb.a.v0(Unknown Source:4)
        at flappy.birb.a.f0(Unknown Source:3)
        at flappy.birb.a.S(Unknown Source:16)
        at d.c.a.u(Unknown Source:62)
        at d.f.j$b.onDrawFrame(Unknown Source:13)
        at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1580)
        at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1275)

it's not a nullpointer error, so suggested post doesn't help. If it was a nullpointer I would be getting it in my debug build, which as said earlier, does not happen.


you have to configure proguard properly. if have you used an external library, copy their proguard rules as well -Touhidul Islam

.

Seems someone ran an obfuscator on the code, and didn't do it right. If that your code that's been obfuscated? – Andreas

I removed all the obsufcation stuff I pasted in from here, so now I get the error in new detail, shown below


2019-11-04 11:38:00.176 773-832/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-11-04 11:38:00.716 16476-16476/? E/Finsky: [2] zdo.b(2): Package name null is not an installed package
2019-11-04 11:38:00.954 15361-20380/? E/CastSocket: [TcpProberDeviceController-2] Failed to shutdown the output stream socket: pjq@5035be3.
    java.net.SocketException: Socket is not connected
2019-11-04 11:38:00.956 15361-18054/? E/TcpProberDeviceController: [TcpProberDeviceController-2] onSocketConnectionFailed. Error: 3
2019-11-04 11:38:00.958 15361-20380/? E/CastSocket: [TcpProberDeviceController-1] Failed to shutdown the output stream socket: pjq@785d33f.
    java.net.SocketException: Socket is not connected
        at sun.nio.ch.Net.translateToSocketException(Net.java:129)
        at sun.nio.ch.Net.translateException(Net.java:166)
        at sun.nio.ch.Net.translateException(Net.java:172)
        at sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:424)
        at pit.b(:com.google.android.gms@19530037@19.5.30 (100400-275531062):9)
        at piw.c(:com.google.android.gms@19530037@19.5.30 (100400-275531062):24)
        at piv.run(:com.google.android.gms@19530037@19.5.30 (100400-275531062):6)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.nio.channels.NotYetConnectedException
        at sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:844)
        at sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:422)
        at pit.b(:com.google.android.gms@19530037@19.5.30 (100400-275531062):9) 
        at piw.c(:com.google.android.gms@19530037@19.5.30 (100400-275531062):24) 
        at piv.run(:com.google.android.gms@19530037@19.5.30 (100400-275531062):6) 
        at java.lang.Thread.run(Thread.java:764) 
2019-11-04 11:38:02.708 1269-1269/? E/LoadedApk: Unable to instantiate appComponentFactory
    java.lang.ClassNotFoundException: Didn't find class "android.support.v4.app.CoreComponentFactory" on path: DexPathList[[],nativeLibraryDirectories=[/data/app/com.google.android.gms-NozBfal7CK1AQkWLZL5VBA==/lib/arm64, /data/app/com.google.android.gms-NozBfal7CK1AQkWLZL5VBA==/base.apk!/lib/arm64-v8a, /system/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at android.app.LoadedApk.createAppFactory(LoadedApk.java:226)
        at android.app.LoadedApk.updateApplicationInfo(LoadedApk.java:346)
        at android.app.ActivityThread.handleDispatchPackageBroadcast(ActivityThread.java:5633)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1880)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at com.android.server.SystemServer.run(SystemServer.java:503)
        at com.android.server.SystemServer.main(SystemServer.java:339)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:838)
2019-11-04 11:38:02.711 20727-20774/? E/libc: Access denied finding property "persist.vendor.fps.history.enabled"
2019-11-04 11:38:02.712 1269-1269/? E/LoadedApk: Unable to instantiate appComponentFactory
    java.lang.ClassNotFoundException: Didn't find class "android.support.v4.app.CoreComponentFactory" on path: DexPathList[[],nativeLibraryDirectories=[/data/app/com.google.android.gms-NozBfal7CK1AQkWLZL5VBA==/lib/arm64, /data/app/com.google.android.gms-NozBfal7CK1AQkWLZL5VBA==/base.apk!/lib/arm64-v8a, /system/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at android.app.LoadedApk.createAppFactory(LoadedApk.java:226)
        at android.app.LoadedApk.updateApplicationInfo(LoadedApk.java:346)
        at android.app.ActivityThread.handleDispatchPackageBroadcast(ActivityThread.java:5633)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1880)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at com.android.server.SystemServer.run(SystemServer.java:503)
        at com.android.server.SystemServer.main(SystemServer.java:339)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:838)
2019-11-04 11:38:02.814 20727-20774/? E/libc: Access denied finding property "persist.vendor.hwui.skia.multithread.enabled"
2019-11-04 11:38:02.814 20727-20774/? E/libc: Access denied finding property "persist.vendor.hwui.skia.reduce.overdraw.enabled"
2019-11-04 11:38:02.819 1269-1605/? E/OnePlusSmartBoostManager: Exception : file not exits :/proc/20704/memplus_type
2019-11-04 11:37:44.900 20626-20644/? E/AndroidRuntime: FATAL EXCEPTION: GLThread 41015
    Process: flappy.birb, PID: 20626
    java.lang.RuntimeException: There is no public dispose() method in the class d.g.b$a
        at d.c.a.c(Unknown Source:5)
        at d.c.a.b(Unknown Source:99)
        at d.c.a.a(Unknown Source:64)
        at d.g.b.<init>(Unknown Source:203)
        at d.g.b.a(Unknown Source:6)
        at d.g.g.<init>(Unknown Source:10)
        at d.g.a.<init>(Unknown Source:0)
        at d.g.f.<init>(Unknown Source:0)
        at flappy.birb.a.t0(Unknown Source:4)
        at flappy.birb.a.f0(Unknown Source:3)
        at flappy.birb.a.S(Unknown Source:16)
        at d.c.a.u(Unknown Source:62)
        at d.f.j$b.onDrawFrame(Unknown Source:13)
        at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1580)
        at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1275)
2019-11-04 11:38:02.845 20727-20772/? E/AndroidRuntime: FATAL EXCEPTION: GLThread 41023
    Process: flappy.birb, PID: 20727
    java.lang.RuntimeException: There is no public dispose() method in the class d.g.b$a
        at d.c.a.c(Unknown Source:5)
        at d.c.a.b(Unknown Source:99)
        at d.c.a.a(Unknown Source:64)
        at d.g.b.<init>(Unknown Source:203)
        at d.g.b.a(Unknown Source:6)
        at d.g.g.<init>(Unknown Source:10)
        at d.g.a.<init>(Unknown Source:0)
        at d.g.f.<init>(Unknown Source:0)
        at flappy.birb.a.t0(Unknown Source:4)
        at flappy.birb.a.f0(Unknown Source:3)
        at flappy.birb.a.S(Unknown Source:16)
        at d.c.a.u(Unknown Source:62)
        at d.f.j$b.onDrawFrame(Unknown Source:13)
        at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1580)
        at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1275)

@F53 It might be because of conflict resolution, on solving dependecies. Can you share your gradle file. – GensaGames

apply plugin: 'com.android.application'

android {
    signingConfigs {
        release {
            storeFile file('C:\\Users\\example\\documents\\AndroidStudio\\example.jks')
            storePassword 'examplepass'
            keyAlias = 'thisisanexample'
            keyPassword 'examplepass'
        }
    }
    compileSdkVersion 28
    defaultConfig {
        multiDexEnabled true
        applicationId "flappy.birb"
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 2
        versionName '0.2 - AlphaBirb'
        vectorDrawables.useSupportLibrary = true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        signingConfig signingConfigs.release
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }      
    buildTypes {
        debug {
            debuggable true
        }
        release {
            /*// Enables code shrinking, obfuscation, and optimization for only
            // your project's release build type.
            minifyEnabled true

            // Enables resource shrinking, which is performed by the
            // Android Gradle plugin.
            shrinkResources true

            // Includes the default ProGuard rules files that are packaged with
            // the Android Gradle plugin. To learn more, go to the section about
            // R8 configuration files.
            proguardFiles getDefaultProguardFile(
                    'proguard-android-optimize.txt'),
                    'proguard-rules.pro'*/
        }
    }
    lintOptions {
        abortOnError false
    }
    buildToolsVersion = '28.0.3'
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.google.android.support:wearable:2.5.0'
    compileOnly 'com.google.android.wearable:wearable:2.5.0'
    implementation files('libs/processing-core.jar')    
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
F53
  • 41
  • 1
  • 5
  • Seems someone ran an obfuscator on the code, and didn't do it right. If that your code that's been obfuscated? – Andreas Nov 03 '19 at 03:57
  • you have to configure proguard properly. if have you used an external library, copy their proguard rules as well – touhid udoy Nov 03 '19 at 04:37
  • Does this answer your question? [Is there any solution for get errors in logcat in android api 19?](https://stackoverflow.com/questions/57018624/is-there-any-solution-for-get-errors-in-logcat-in-android-api-19) – alireza daryani Nov 03 '19 at 05:00

1 Answers1

1

Seems like your proguard just cleaning up that source. Add next configuration to your proguard files. For more information, check out this resource.

-keep class <class where dispose is called>.** {
  *;
  }

UPDATE:

To ensure, it's not a proguard issue you need to disable it manually. Try to set up next options for your build types.

    minifyEnabled false
    useProguard false
GensaGames
  • 5,538
  • 4
  • 24
  • 53