Giter VIP home page Giter VIP logo

Comments (3)

qdsfdhvh avatar qdsfdhvh commented on July 21, 2024

I seem to have found the reason that Screen.key was optimised out, I added the following configuration and it solved it.

-keepclassmembers class * implements cafe.adriel.voyager.core.screen.Screen {
    public getKey();
}

Maybe add it to the library's consumer-rules.pro?

from voyager.

qdsfdhvh avatar qdsfdhvh commented on July 21, 2024

I used diffuse to compare the differences between the apk's:

OLD: app-debug.apk (signature: V2)
NEW: app-debug-fix.apk (signature: V2)

          │           compressed           │         uncompressed         
          ├───────────┬───────────┬────────┼──────────┬──────────┬────────
 APK      │ old       │ new       │ diff   │ old      │ new      │ diff   
──────────┼───────────┼───────────┼────────┼──────────┼──────────┼────────
      dex │ 604.7 KiB │ 604.5 KiB │ -147 B │  1.2 MiB │  1.2 MiB │  +96 B 
     arsc │  74.3 KiB │  74.3 KiB │    0 B │ 74.2 KiB │ 74.2 KiB │    0 B 
 manifest │   1.8 KiB │   1.8 KiB │    0 B │  5.7 KiB │  5.7 KiB │    0 B 
      res │  36.8 KiB │  36.8 KiB │   -4 B │ 41.8 KiB │ 41.8 KiB │    0 B 
    asset │   3.3 KiB │   3.3 KiB │   +3 B │  3.1 KiB │  3.1 KiB │   +7 B 
    other │    22 KiB │    22 KiB │    0 B │ 32.1 KiB │ 32.1 KiB │    0 B 
──────────┼───────────┼───────────┼────────┼──────────┼──────────┼────────
    total │ 742.8 KiB │ 742.7 KiB │ -148 B │  1.4 MiB │  1.4 MiB │ +103 B 

 DEX     │ old  │ new  │ diff       
─────────┼──────┼──────┼────────────
   files │    1 │    1 │  0         
 strings │ 6692 │ 6693 │ +1 (+2 -1) 
   types │ 2294 │ 2295 │ +1 (+1 -0) 
 classes │ 1759 │ 1760 │ +1 (+1 -0) 
 methods │ 9706 │ 9708 │ +2 (+3 -1) 
  fields │ 5191 │ 5190 │ -1 (+2 -3) 

 ARSC    │ old │ new │ diff 
─────────┼─────┼─────┼──────
 configs │  97 │  97 │  0   
 entries │ 123 │ 123 │  0   

=================
====   APK   ====
=================

     compressed     │   uncompressed   │                                
───────────┬────────┼─────────┬────────┤                                
 size      │ diff   │ size    │ diff   │ path                           
───────────┼────────┼─────────┼────────┼────────────────────────────────
 604.5 KiB │ -147 B │ 1.2 MiB │  +96 B │ ∆ classes.dex                  
   2.8 KiB │   +6 B │ 2.7 KiB │   +6 B │ ∆ assets/dexopt/baseline.prof  
   7.7 KiB │   -4 B │ 7.6 KiB │    0 B │ ∆ res/-6.webp                  
     486 B │   -3 B │   354 B │   +1 B │ ∆ assets/dexopt/baseline.profm 
───────────┼────────┼─────────┼────────┼────────────────────────────────
 615.6 KiB │ -148 B │ 1.2 MiB │ +103 B │ (total)                        


=================
====   DEX   ====
=================

STRINGS:

   old  │ new  │ diff       
  ──────┼──────┼────────────
   6692 │ 6693 │ +1 (+2 -1) 
  
  + Le1/i;
  + ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":24,"pg-map-id":"79a64e1","r8-mode":"full","version":"8.4.22"}
  
  - ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":24,"pg-map-id":"cc45031","r8-mode":"full","version":"8.4.22"}
  

TYPES:

   old  │ new  │ diff       
  ──────┼──────┼────────────
   2294 │ 2295 │ +1 (+1 -0) 
  
  + Le1/i;
  

METHODS:

   old  │ new  │ diff       
  ──────┼──────┼────────────
   9706 │ 9708 │ +2 (+3 -1) 
  
  + e1.i <clinit>()
  + e1.i getKey() → String
  + e1.i j(n, int)
  
  - e1.h <init>(int)
  

FIELDS:

   old  │ new  │ diff       
  ──────┼──────┼────────────
   5191 │ 5190 │ -1 (+2 -3) 
  
  + e1.h g: h
  + e1.i g: i
  
  - e1.h g: int
  - e1.h h: h
  - e1.h i: h
  

seem it does possible to lose the Screen.key.

...
  + e1.i getKey() → String
...

mapping.txt

...
com.seiko.demo.voyager_crash_of_kotlin2.HomeScreen -> e1.i:
...

from voyager.

DevSrSouza avatar DevSrSouza commented on July 21, 2024

Thanks for the finding

from voyager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.