Shrink, Optimize and Secure Your App With R8 & ProGuard - Full Guide

  Рет қаралды 61,816

Philipp Lackner

Philipp Lackner

Күн бұрын

In this video you will learn what you can do before your app's release to make sure it is well optimized, shrinked and secured.
00:00 - What is R8 & ProGuard?
04:17 - Enabling R8 in Your Project
06:38 - ProGuard Rules & @Keep annotation
12:30 - Building the Release Version of Your App
14:00 - Read Obfuscated Stacktraces
⭐ Get certificates for your future job
⭐ Save countless hours of time
⭐ 100% money back guarantee for 30 days
⭐ Become a professional Android developer now:
pl-coding.com/premium-courses...
💻 Let me personally review your code and provide individual feedback, so it won't backfire and cost you a fortune in future:
elopage.com/s/philipplackner/...
Regular Android tutorials on my Instagram: / _philipplackner_
Checkout my GitHub: github.com/philipplackner

Пікірлер: 139
@tortoiseshell_cat
@tortoiseshell_cat 3 жыл бұрын
man i swear i start my project by watching ur video and now i end it with this tutorial R8 & ProGuard
@sreshthamehrotra9977
@sreshthamehrotra9977 3 жыл бұрын
Best channel for learning Android Dev. Thanks !
@trending_tech1
@trending_tech1 Жыл бұрын
A brilliant way to deliver a complex topic. Hats off to you man 🙂
@MattCM89
@MattCM89 2 жыл бұрын
Really great video! You cover some of the key gotchas and then go in depth in such a short video. 👏👏
@JosueLopes
@JosueLopes 3 жыл бұрын
Thank you, I was looking for this these days!!! :D
@tiamabderezai5374
@tiamabderezai5374 3 жыл бұрын
Your videos are as always so informative, clear, and concise. Einfach ausgezeichnet! :)
@icodethis
@icodethis 2 жыл бұрын
Your "data classes" example saved my time. It was exactly what I was looking for. Thank you.
@murlipatle2705
@murlipatle2705 3 жыл бұрын
Philipp Lackner you are amazing. you make everything simple
@nikhiltambe7204
@nikhiltambe7204 3 жыл бұрын
Thanks for the recap PL. In addition, the older version of Play Console had an option to upload the mapping.txt file along with the release build which de-obfuscates any crashes/ANR reported. I haven't used the new console yet, but I hope it will still be there somewhere.
@ioannistzavaras6873
@ioannistzavaras6873 3 жыл бұрын
Nice job bro! I really enjoy you explanations and your teaching style! Thank you 👍👍👍
@xD-saleem
@xD-saleem 3 жыл бұрын
i learned a lot from you and keeping learning from you. thanks for sharing your knowledge with us.
@markli2171
@markli2171 2 жыл бұрын
Love the way you teach one thing at time with detail. we want to see more advance and small suject like how to use android studio profil tool to detect memory leak, how to use some android studio plugins, everything about gradle, materiel design
@vishrutgoyani8071
@vishrutgoyani8071 3 жыл бұрын
I knew it. But it's the perfect Video to understand all of the Proguard & Obfuscating for beginners. Great work bro, Keep it up!👍
@dbtechprojects2392
@dbtechprojects2392 3 жыл бұрын
Very detailed video, will be releasing my first app in a few months so this will help alot, thanks :)
@ultimatedev8779
@ultimatedev8779 3 жыл бұрын
I really like the way you explain things just keeping them simple and straight. Can you please do a video regarding the Android App bundle which is used for updating the application in the playstore ?.
@iftak01
@iftak01 2 жыл бұрын
AMAZING much needed video bud!
@flembrane5265
@flembrane5265 2 жыл бұрын
Very helpful video for a new android developer. Thanks!
@sraldous
@sraldous 10 ай бұрын
Very helpful, explained well and easy to understand. Thank you!
@yashgarg5992
@yashgarg5992 2 жыл бұрын
Very very clearly explained everything. Thanks a lot
@preenxus3425
@preenxus3425 3 жыл бұрын
Many thanks for your video. This is the best video on KZbin about R8 / Proguard!!! Very helpful
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Glad it was helpful!
@gihanpathirage4301
@gihanpathirage4301 2 жыл бұрын
You are the best! Thank you for this.
@vengateshm2122
@vengateshm2122 3 жыл бұрын
Though these concepts are familiar to me it gives me a quick recap for my interview preparation. Thanks Pl.
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Glad it was helpful!
@simranpreetsingh1861
@simranpreetsingh1861 11 ай бұрын
what a lovely video very insightful
@mattgraves3709
@mattgraves3709 3 жыл бұрын
Very nice, Very nice. I love the Lackner one stop Android shop for professionals at KZbin
@oguzhanarslan9714
@oguzhanarslan9714 3 жыл бұрын
This man really makes complex things simple , also wondering that would you make a tutorial about gradle ?
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Thanks a lot! Not planned atm, but maybe in future
@androidcodingwithkh7896
@androidcodingwithkh7896 3 жыл бұрын
keep it up. very informative and detailed .GOOD JOB!!
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Glad it was helpful!
@michaelsanders9147
@michaelsanders9147 6 ай бұрын
Very well explained. I was having exactly this problem with JSON.
@theeuropeanperspective3391
@theeuropeanperspective3391 Жыл бұрын
Excellent tutorial, thanks!
@Jake-uj8fy
@Jake-uj8fy 3 жыл бұрын
This is so enough, nice stuff indeed. 🥂 mate
@user-wr9dr7po2v
@user-wr9dr7po2v 2 жыл бұрын
thanks boss .. you changed my life
@ArdianMaulanaEffendi
@ArdianMaulanaEffendi 3 жыл бұрын
Thank you very much, Philipp! I finally found out the problem why my login function didn't work. It was because of that obfuscation 🤣 Thanks for clearing that up!
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Glad it helped!
@buzfinda276
@buzfinda276 10 ай бұрын
Thanks alot man, you made my work easier. I logged my email just to like and comment👍
@kisan_thapa
@kisan_thapa 3 жыл бұрын
Really informative video. Thanks ❤
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Glad it was helpful!
@omarguevara536
@omarguevara536 2 жыл бұрын
Excellent video, thank you very much, I hope and there is second part of the video
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Thanks and welcome
@emranulislam6469
@emranulislam6469 2 жыл бұрын
Great Video Brother
@Rafael-hk9pg
@Rafael-hk9pg 2 жыл бұрын
Thanks for the video. Could you make a series of how to release your app?
@kafychannel
@kafychannel Жыл бұрын
useful thanks so much!
@stanislavomelchenko5271
@stanislavomelchenko5271 2 жыл бұрын
Спасибо тебе. Всё понятно и доступно объяснил. You have awesome pronounce.
@mustafaammar551
@mustafaammar551 3 жыл бұрын
Thank you very much Bro Very cool video wish you all the best ❤❤❤👍👍👍👍
@PhilippLackner
@PhilippLackner 3 жыл бұрын
thanks wish you the same!
@zakariahossain5149
@zakariahossain5149 3 жыл бұрын
I really like your presentation/explanation style and your explanation is very very well. BTW, how many hours do you research for creating a new video?
@AbdullahKhan-uw2wj
@AbdullahKhan-uw2wj 3 жыл бұрын
Bro u are the best youtuber for app developing and error fixing. Best 💯👍thanks bro and can you tell me something in which I contact you.
@VICMAGUCAS
@VICMAGUCAS 2 жыл бұрын
Gracias, me sirvió mucho, excelente explicación....
@nizamyuseri4058
@nizamyuseri4058 11 ай бұрын
i've successfully obfuscate my code because of your video thank you
@techtutorial2424
@techtutorial2424 Жыл бұрын
Excellent explanation.............
@dailybrainexercises
@dailybrainexercises 2 жыл бұрын
Thank you so much
@mockingspyhd6099
@mockingspyhd6099 3 жыл бұрын
Wooow, perfect guy! thank you so much!
@PhilippLackner
@PhilippLackner 3 жыл бұрын
You're welcome!
@ampo2004
@ampo2004 3 жыл бұрын
very good, as always. Do you have something about signing apps and playstore upload?
@ChrisAthanas
@ChrisAthanas 3 жыл бұрын
Best hair in all of Android tutorials
@neerajpant4071
@neerajpant4071 3 жыл бұрын
Absolutely brillant.👍👍 If possible ,Can you make video on dsl kotlin
@hamzaboi6875
@hamzaboi6875 3 жыл бұрын
you are so cool keep going bro
@jarvis2913
@jarvis2913 3 жыл бұрын
Very helpful video
@raespim
@raespim 2 жыл бұрын
Hi Philipp! Thanks for the knowledge! I have a question: Is there any way to find out which classes the R8 compiler is breaking?
@devetips
@devetips 3 жыл бұрын
Nice content well done man. Could you please talk about ci/cd such as fastlane and how to integrate it with github actions and google play .thanks in advance🌹🌹
@bboydarknesz
@bboydarknesz 3 жыл бұрын
Damn you are best !
@OriginRow
@OriginRow 3 жыл бұрын
This is absolutely helpful..... could you please make tutorial on "Play Feature Delivery" which I am making 3D resources based app development. And I am beginner for app development in android studio.There are four types in it like Install time delivery, on-demand delivery, conditional delivery and instant delivery. First two are useful 🙏
@shivamsethi3829
@shivamsethi3829 3 жыл бұрын
Great topic
@minhtuhuynhcao4782
@minhtuhuynhcao4782 2 жыл бұрын
Sweet, smooth
@VikashSingh-dn7kk
@VikashSingh-dn7kk 2 жыл бұрын
Why to backup the mapping file? If Google Play automatically translate the obfuscated code as the Android App Bundle contains the mapping file.
@danielmartinspiridione6559
@danielmartinspiridione6559 3 жыл бұрын
Excellent! Do you know any rules to keep the classes dynamically generated by ViewBinding?
@blackballization
@blackballization 2 жыл бұрын
Thank you
@ashar9327
@ashar9327 3 жыл бұрын
Best teacher 💪
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Thanks!
@imsherry7225
@imsherry7225 3 жыл бұрын
Hi I just started watching your channel , new to android development so i am watching your android fundamental series and it's awesome and updated, I really feel connection and the flow so plz let me know, what do u recommend next ? better be a playlist or topics thanks...
@PhilippLackner
@PhilippLackner 3 жыл бұрын
I'd watch the coroutine playlist afterwards and then it's up to you. Whatever is interesting for you
@imsherry7225
@imsherry7225 3 жыл бұрын
@@PhilippLackner Thanks Phil It's Really Helping ❤️✌️
@niranz7745
@niranz7745 2 жыл бұрын
Amazing.
@mostafahosseini2944
@mostafahosseini2944 2 жыл бұрын
thank you
@funnymoment9164
@funnymoment9164 3 жыл бұрын
Thanks
@vishalthapa1440
@vishalthapa1440 3 жыл бұрын
make a video on sha-1 and sha-256 .what are these and why we need them?
@armandoavila4615
@armandoavila4615 3 жыл бұрын
Thank you!
@PhilippLackner
@PhilippLackner 3 жыл бұрын
You're welcome!
@dororodororo8200
@dororodororo8200 3 жыл бұрын
Hi ) could you show more examples with R8 and ProGuard, like some small, real project?)))
@mattgraves3709
@mattgraves3709 2 жыл бұрын
If you follow this up with deployment that would be awesome. Phillipp do any of your app playlists deploy to play? Would love to see a complete app playlist on Continuous integration or Continuous deployment setup that has automated test suite
@PhilippLackner
@PhilippLackner 2 жыл бұрын
still learning about CI/CD myself
@mattgraves3709
@mattgraves3709 2 жыл бұрын
@@PhilippLackner I know it's not for everyone, since many people will not be doing this on at scale or with a large team of people. However I would bet a good amount of people would benefit from them. I also like robotics and automation in the physical world so finding a way to automate the build release process is cool, even cooler if you automate the test suite as well as the deployment because it takes out the possibility for human error. I think you will enjoy learning about it Phillipp, even if it doesn't end up on the channel, I think you will have good time with it. Thanks again for all the great videos! You have seriously changed the game for many people!
@PhilippLackner
@PhilippLackner 2 жыл бұрын
@@mattgraves3709 Thanks a lot for the kind words, Matt, appreciate all your comments and support!
@pemmasanirajesh6965
@pemmasanirajesh6965 3 жыл бұрын
It's a great explanation compared to some proguard videos
@raintech7053
@raintech7053 Жыл бұрын
Arigato 😊
@xD-saleem
@xD-saleem 3 жыл бұрын
amazing
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Thank you
@manishgautam2424
@manishgautam2424 Жыл бұрын
Good videos
@mehdiparsaei1867
@mehdiparsaei1867 Жыл бұрын
As you mentioned, we should avoid obfuscation for DTO classes cause of the serialization. How if we use @SerializedName("...") for any fields? I think we don't have to exclude them anymore.
@ibrahemsalah1011
@ibrahemsalah1011 Жыл бұрын
That's correct, It will work.
@VINAYCHOWDARY-uo1zs
@VINAYCHOWDARY-uo1zs 2 жыл бұрын
make a video to use in spring boot application for jars
@makasiparsad
@makasiparsad 2 ай бұрын
Regarding "data class ..." would one need to not obfuscate every method & reference variable (such as LiveData variables) that makes use of the dataclasses or just not obfuscate the dataclasses themselves?
@sagarchincholkar7557
@sagarchincholkar7557 3 жыл бұрын
what about the inner static classes (Like u said as Model class of josn ) which are inside the class which we have added pro Guard rule for not obfuscate this calss .* does this means variable name which are in inner class also not obfuscated?
@manojrai397
@manojrai397 2 жыл бұрын
if i use zoom sdk and make magnify true is also change name to zoom library file at time of release
@ravi_sorathiya
@ravi_sorathiya 3 жыл бұрын
Which plugin you have used in your android studio that provides create new classes such as data class etc......??
@expense-moneytracking6577
@expense-moneytracking6577 3 жыл бұрын
I have tried this option on my project. But unfortunately, it is won't be working very well. For an example of my login activity, R8 has renamed all my XML id into another name that could not pass data through to the form validate and API request.
@cnx8377
@cnx8377 3 жыл бұрын
Bro I try multiscreen support using your tutorial but screen size set and not resize component bro.. How to set that
@aysyk
@aysyk 2 ай бұрын
how can i use proguard? Should I set useProguard true in app gradle or android.enableR8=false in gradle properties
@nicolasfelipe1
@nicolasfelipe1 2 жыл бұрын
my app working perfectly on many devices, after "minifyEnabled true" even the mainactivity cant open
@snooringcode6594
@snooringcode6594 3 жыл бұрын
how to upload the mapping.txt file along with app bundle to play console.
@sacrificeforstars9479
@sacrificeforstars9479 2 жыл бұрын
what are these at 09:31 , cubit class and bloc class? is this flutter related stuff or something else.
@kendyoccean1714
@kendyoccean1714 2 жыл бұрын
How can I use mapping file through git to decrypt it
@mr-re1ax
@mr-re1ax Жыл бұрын
I haven't fill proguard rule and uploaded my app to the market with minify = true. But haven't face any crashes🤔
@kirubelberhanu4698
@kirubelberhanu4698 2 жыл бұрын
I have firebase app with RecyclerView but when I release it into paly store, the app will crash... how to set proground for this problem?
@SoulCalmingWithAzooz
@SoulCalmingWithAzooz 9 ай бұрын
How about Flutter applications?
@VVLGANESHK
@VVLGANESHK 3 жыл бұрын
Will it work for Augmented Reality ARCore app? Is it possible to implement it? Will my app size shirnks? Bcoz 3D models are huge. Already I am stuck here by developing app
@arpanlayek6405
@arpanlayek6405 3 жыл бұрын
What is Bloc class and Cubit Class?
@Sahin_Safi
@Sahin_Safi 2 жыл бұрын
how to check r8 app working fine or not?
@onlinemarketing9865
@onlinemarketing9865 Жыл бұрын
Sir,, Please help me.. I have faced a problem.. My app previous update version was only 10 megabyte. But now I have added some features,, the size jumped to 25 MB, which is not possible because I have added very small amount of code... When I cancled all and go to previous version by github using version control; it also showing 25MB in released version,,, which was 10MB..
@shivayogihiremath1046
@shivayogihiremath1046 3 жыл бұрын
"This App Bundle contains native code, and you've not uploaded debug symbols. We recommend that you upload a symbol file to make your crashes and ANRs easier to analyse and debug." whats this error?.. where I will get that file ?
@VVLGANESHK
@VVLGANESHK 3 жыл бұрын
How can I test app bundles in phone.....those are not APK to install right?
@Alchemist10241
@Alchemist10241 2 жыл бұрын
What if we declare a SerializedName for our JSON fields like this? Do we have to declare a rule in proguard file? data class User( @Expose @SerializedName("email") val email:String? = null, @Expose @SerializedName("username") val username:String? = null, )
@sonusaini-sz2sf
@sonusaini-sz2sf 2 жыл бұрын
App get crash in release build when hit api
@algo_chronicles
@algo_chronicles 3 жыл бұрын
I dont know why but after this while generating signed apk ,,,i am getting stackoverflow error ,,,
@muhamadannur2859
@muhamadannur2859 Жыл бұрын
i found here, thanks Philipp ask, Tell about Jiagu360?
@Dark2opffx
@Dark2opffx 2 жыл бұрын
Can this Work for Aide ?
5 Fatal Coroutine Mistakes Nobody Tells You About
18:15
Philipp Lackner
Рет қаралды 85 М.
Nutella bro sis family Challenge 😋
00:31
Mr. Clabik
Рет қаралды 14 МЛН
Effective ProGuard keep rules for smaller applications (Google I/O '18)
36:32
5 Common Android Anti-Patterns That Make Your Code a Mess
17:06
Philipp Lackner
Рет қаралды 29 М.
How to Hide & Protect API Keys in Your Android App (Reverse Engineering)
10:13
THIS Is How You Measure the Performance of Your Android App
21:30
Philipp Lackner
Рет қаралды 41 М.
Shrinking your app with R8 (Android Dev Summit '19)
18:04
Android Developers
Рет қаралды 18 М.
KMP vs. Flutter - Who Will Win The Cross-Platform Battle?
16:19
Philipp Lackner
Рет қаралды 36 М.
How to Support ALL Screen Sizes on Android - Full Guide
19:10
Philipp Lackner
Рет қаралды 111 М.
Nutella bro sis family Challenge 😋
00:31
Mr. Clabik
Рет қаралды 14 МЛН