Android 热修复的尝试(阿里的sophix和腾讯的bugly)记录

           移动端的热修复,近期都很火,由于个人的能力有限,一直没有深处去了解,这里就不去详细分析市面上流行的热修复框架那些了,度娘上面,资料多的是,我这边也是成功实现了两个热修复。

第一个是阿里云的sophix,傻瓜式接入,设备到达一定的数量之后,开始按梯级式,收费,这样的话,对于我这种个人开发者,就感觉有点压力(虽然我也没有开发出那过万台的用户使用量的app)

第二个是腾讯的bugly(基于tinker),但是他的使用会比纯的tinker接入要简单,主要是免费后台和异常错误的上传分析等,bugly的完整测试可以用第一种配置debug,第二种的生成有密钥的正式版,暂时没有测试通(初步正式包bugly 开混淆之后,报错问题,是因为我这边的bugly的混淆规则。没有添加上去的问题,后续会更新bugly 的热更新文章,请留意下一篇文章解决,混淆问题,可以学习这篇文章: https://juejin.im/post/5dbeecedf265da4d270b43a6) 

-dontwarn com.tencent.bugly.**
-keep public class com.tencent.bugly.**{*;}
# tinker混淆规则
-dontwarn com.tencent.tinker.**
-keep class com.tencent.tinker.** { *; }

如果你使用了support-v4包,你还需要配置以下混淆规则:

-keep class android.support.**{*;}

 

         下面记录一下,接入他们的过程,遇到的问题。

          1.阿里云的sophix: 

           这是我自己的demo上传到了Github上面:https://github.com/yezi10086/Ye_repairDemo,他的配置要参考他们官网文档步骤来一步步实现,没什么坑踩,容易接入。

Android 热修复的尝试(阿里的sophix和腾讯的bugly)记录_第1张图片

Android 热修复的尝试(阿里的sophix和腾讯的bugly)记录_第2张图片

 

 

           2.腾讯的bugly: 

             这是我自己的demo上传到了Github上面:https://github.com/yezi10086/TinkerDemo/tree/master   ,而bugly的接入文档感觉比较旧,接入有点困难,依赖版本说明不清楚,容易踩坑。

Android 热修复的尝试(阿里的sophix和腾讯的bugly)记录_第3张图片   

Android 热修复的尝试(阿里的sophix和腾讯的bugly)记录_第4张图片

             这里分享一下配置生成补丁包的方法 可以用这边大佬的: https://blog.csdn.net/qq_22236195/article/details/94383321   

            如果按照他的官方文档,按步骤来用gradle 的    TinkerSupport插件生成的补丁包,如果你的生成不出来,,没有显示出patch的文件夹,还会报错误api过时的问题:

Android 热修复的尝试(阿里的sophix和腾讯的bugly)记录_第5张图片

 

 

      默认的修复后bug的补丁包路径为:app/outputs/patch,你可以按照上面的链接来生成debug的包来解决这个问题。

      测试方案一:

Android 热修复的尝试(阿里的sophix和腾讯的bugly)记录_第6张图片

 

Android 热修复的尝试(阿里的sophix和腾讯的bugly)记录_第7张图片

 

       最新解决方案二,bugly上面的测试生成debug的apk,的确不是很好的办法,我的apk很容易被反编译,拿到源码,即便有加固的方法,但是我们的代码还是暴露的一清二楚,最近测试了bugly文档没有生成release基准包和补丁包的原因是自己,没有在gradle上面添加自动打包的密钥配置,才导致不成功。

下面的解决过程的步骤:

         1:我这边默认你们的配置按照官方文档配置完成了。

Android 热修复的尝试(阿里的sophix和腾讯的bugly)记录_第8张图片

 

  2:开始准备打基准包了

Android 热修复的尝试(阿里的sophix和腾讯的bugly)记录_第9张图片

 

         提醒     3,我们先别急着按文档说明操作,而是检查自己的app-gradle配置文件(如果没有这个配置文件,你是编译不了下面的release基准包的)

Android 热修复的尝试(阿里的sophix和腾讯的bugly)记录_第10张图片

 

       这边分享一下生成jks文件的方法:https://blog.csdn.net/qq_25700077/article/details/98494057 ,然后 File -- project structure  

  modules --app --Sining Configs 添加 release  补充完下面的信息即可:

Android 热修复的尝试(阿里的sophix和腾讯的bugly)记录_第11张图片

      4.这样才算是完整的配置完成,我们就可以按照文档顺利操作了:https://bugly.qq.com/docs/user-guide/instruction-manual-android-hotfix-demo/?v=20180709165613

    生成基准包的assmbleRelease 方式在other目录了

Android 热修复的尝试(阿里的sophix和腾讯的bugly)记录_第12张图片

 

Android 热修复的尝试(阿里的sophix和腾讯的bugly)记录_第13张图片

 最后正式加密版,生成补丁包不成功报错的信息如下。提醒:bugly的完整测试可以用第一种配置debug,第二种的生成有密钥的正式版,暂时没有测试通,遇到的问题是使用密钥生成的补丁包出现以下问题,如果你知道解决的方式可以评论,留下你的联系方式一起学习。

 Task :app:transformClassesAndResourcesWithR8ForRelease
AGPBI: {"kind":"error","text":"'java.lang.Object getMediaDescription()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'java.lang.Object createFromParcel(android.os.Parcel)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void ()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onStateChanged(androidx.lifecycle.LifecycleOwner,androidx.lifecycle.Lifecycle$Event)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onCreate(android.os.Bundle)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onKeyDown(int,android.view.KeyEvent)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onKeyUp(int,android.view.KeyEvent)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onSupportNavigateUp()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onConfigurationChanged(android.content.res.Configuration)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onMenuItemSelected(int,android.view.MenuItem)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onPostResume()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,android.view.Window,androidx.appcompat.app.AppCompatCallback,java.lang.Object)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'androidx.appcompat.view.ActionMode startSupportActionMode(androidx.appcompat.view.ActionMode$Callback)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setContentView(android.view.View,android.view.ViewGroup$LayoutParams)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onStop()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onMenuOpened(int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onPanelClosed(int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.content.Context getActionBarThemedContext()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'androidx.appcompat.app.AppCompatDelegateImpl$AutoNightModeManager getAutoTimeNightModeManager()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean dispatchKeyShortcutEvent(android.view.KeyEvent)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onMenuOpened(int,android.view.Menu)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onPanelClosed(int,android.view.Menu)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onPreparePanel(int,android.view.View,android.view.Menu)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'int getApplyableNightMode()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setDefaultDisplayHomeAsUpEnabled(boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void animateToMode(boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setHasEmbeddedTabs(boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (androidx.appcompat.app.WindowDecorActionBar,android.content.Context,androidx.appcompat.view.ActionMode$Callback)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setTitleOptionalHint(boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.content.res.ColorStateList getColorStateList(android.content.Context,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$AnimatedStateListState,android.content.res.Resources)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$AnimatedStateListState,androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat,android.content.res.Resources)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.graphics.drawable.AnimationDrawable,boolean,boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'int getIntrinsicHeight()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'int getIntrinsicWidth()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'int getMinimumHeight()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'int getMinimumWidth()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean getPadding(android.graphics.Rect)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void invalidateDrawable(android.graphics.drawable.Drawable)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.graphics.drawable.Drawable mutate()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void createAllFutures()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (androidx.appcompat.graphics.drawable.StateListDrawable$StateListState,androidx.appcompat.graphics.drawable.StateListDrawable,android.content.res.Resources)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,androidx.appcompat.widget.ActionBarContextView,androidx.appcompat.view.ActionMode$Callback,boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setTitleOptionalHint(boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onAnimationEnd(android.view.View)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void updateTextButtonVisibility()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,android.view.View,int,int,boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void updateMenuView(boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void showMenu(androidx.appcompat.view.menu.MenuBuilder)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.widget.ListView getListView()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,android.util.AttributeSet,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,android.util.AttributeSet,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setShortcut(boolean,char)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void findExpandedIndex()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'int getCount()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void findExpandedIndex()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'int getCount()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'androidx.appcompat.view.menu.MenuItemImpl getItem(int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setHeaderInternal(int,java.lang.CharSequence,int,android.graphics.drawable.Drawable,android.view.View)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'int addIntentOptions(int,int,int,android.content.ComponentName,android.content.Intent[],android.content.Intent,int,android.view.MenuItem[])' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.view.SubMenu addSubMenu(int,int,int,java.lang.CharSequence)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.view.MenuItem findItem(int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean performShortcut(int,android.view.KeyEvent,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void removeGroup(int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void removeItem(int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setGroupCheckable(int,boolean,boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setGroupEnabled(int,boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'androidx.core.internal.view.SupportMenuItem setSupportActionProvider(androidx.core.view.ActionProvider)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.graphics.drawable.Drawable getIcon()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.view.MenuItem setActionView(int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.view.MenuItem setTitle(int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (androidx.appcompat.view.menu.MenuItemWrapperICS,android.content.Context,android.view.ActionProvider)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void showPopup(int,int,boolean,boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void clear()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void removeGroup(int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void show()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'java.lang.String getActionViewStatesKey()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'androidx.core.view.ViewPropertyAnimatorCompat setupAnimatorToVisibility(int,long)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,android.util.AttributeSet,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void initForMode(androidx.appcompat.view.ActionMode)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void pullChildren()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onNestedFling(android.view.View,float,float,boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onNestedScrollAccepted(android.view.View,android.view.View,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onStopNestedScroll(android.view.View)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onWindowSystemUiVisibilityChanged(int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setActionBarVisibilityCallback(androidx.appcompat.widget.ActionBarOverlayLayout$ActionBarVisibilityCallback)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void updateMenuView(boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean flagActionItems()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (androidx.appcompat.widget.ActionMenuPresenter,android.content.Context,androidx.appcompat.view.menu.SubMenuBuilder,android.view.View)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (androidx.appcompat.widget.ActionMenuPresenter,android.content.Context,androidx.appcompat.view.menu.MenuBuilder,android.view.View,boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,android.util.AttributeSet)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.view.Menu getMenu()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onLayout(boolean,int,int,int,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onMeasure(int,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onLayout(boolean,int,int,int,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onLayout(boolean,int,int,int,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean tintDrawable(android.content.Context,int,android.graphics.drawable.Drawable)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,android.util.AttributeSet,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void show(int,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (androidx.appcompat.widget.AppCompatSpinner,android.content.Context,android.util.AttributeSet,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void show(int,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (androidx.appcompat.widget.AppCompatTextHelper,int,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onLayout(boolean,int,int,int,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setSupportCompoundDrawablesTintList(android.content.res.ColorStateList)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setSupportCompoundDrawablesTintMode(android.graphics.PorterDuff$Mode)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setTextClassifier(android.view.textclassifier.TextClassifier)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setTextMetricsParamsCompat(androidx.core.text.PrecomputedTextCompat$Params)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void updateSelectorStateCompat()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void dispatchDraw(android.graphics.Canvas)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void drawableStateChanged()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onHoverEvent(android.view.MotionEvent)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.graphics.drawable.Drawable)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,android.util.AttributeSet,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void layoutVertical(int,int,int,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void dismiss()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void show()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onHoverEvent(android.view.MotionEvent)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void tintDrawable(android.graphics.drawable.Drawable,androidx.appcompat.widget.TintInfo,int[])' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.content.res.ColorStateList getTintList(android.content.Context,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean performExpand()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onConfigurationChanged(android.content.res.Configuration)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (androidx.appcompat.widget.ScrollingTabContainerView,android.content.Context,androidx.appcompat.app.ActionBar$Tab,boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,android.util.AttributeSet,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onItemSelected(int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void forceSuggestionQuery()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onTextFocusChanged()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onVoiceClicked()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onLayout(boolean,int,int,int,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onMeasure(int,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onRestoreInstanceState(android.os.Parcelable)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void updateQueryHint()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'java.lang.CharSequence convertToString(android.database.Cursor)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.view.View getDropDownView(int,android.view.View,android.view.ViewGroup)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void notifyDataSetChanged()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'int getDisabledThemeAttrColor(android.content.Context,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'int getThemeAttrColor(android.content.Context,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,android.content.res.Resources)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,android.util.AttributeSet,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onLayout(boolean,int,int,int,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onMeasure(int,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onRestoreInstanceState(android.os.Parcelable)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.os.Parcelable onSaveInstanceState()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (androidx.appcompat.widget.Toolbar,boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void show(boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void hide()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void supportRemove(androidx.arch.core.internal.SafeIterableMap$Entry)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void putAll(java.util.Map)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean addAll(java.util.Collection)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean equals(java.lang.Object)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'java.util.Iterator iterator()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean equals(java.lang.Object)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void ()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean dispatchKeyEvent(android.view.KeyEvent)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean dispatchKeyShortcutEvent(android.view.KeyEvent)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'androidx.core.app.ComponentActivity$ExtraData getExtraData(java.lang.Class)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'androidx.core.app.NotificationCompat$Builder setLargeIcon(android.graphics.Bitmap)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'androidx.core.app.RemoteActionCompat read(androidx.versionedparcelable.VersionedParcel)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'androidx.core.content.FileProvider$PathStrategy parsePathStrategy(android.content.Context,java.lang.String)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.os.ParcelFileDescriptor openFile(android.net.Uri,java.lang.String)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void ()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void ()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'java.lang.String getResPackage()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'androidx.core.graphics.drawable.IconCompat read(androidx.versionedparcelable.VersionedParcel)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.graphics.drawable.Drawable$ConstantState getConstantState()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setTintList(android.content.res.ColorStateList)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider(android.view.View)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onInitializeAccessibilityNodeInfo(android.view.View,android.view.accessibility.AccessibilityNodeInfo)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean isScreenReaderFocusable(android.view.View)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void ()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.widget.ListView)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,android.util.AttributeSet,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean startNestedScroll(int,int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean dispatchNestedFling(float,float,boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean dispatchNestedPreFling(float,float)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void stopNestedScroll(int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onInterceptTouchEvent(android.view.MotionEvent)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onRequestFocusInDescendants(int,android.graphics.Rect)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onTouchEvent(android.view.MotionEvent)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (androidx.fragment.app.FragmentManagerImpl)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void dump(java.lang.String,java.io.FileDescriptor,java.io.PrintWriter,java.lang.String[])' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void initLifecycle()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'androidx.fragment.app.FragmentActivity getActivity()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.view.LayoutInflater getLayoutInflater(android.os.Bundle)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'androidx.lifecycle.ViewModelStore getViewModelStore()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onAttach(android.content.Context)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onCreate(android.os.Bundle)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onInflate(android.content.Context,android.util.AttributeSet,android.os.Bundle)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void performActivityCreated(android.os.Bundle)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void performAttach()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void performCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void performDestroyView()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void performDetach()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void performPause()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void performResume()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void performSaveInstanceState(android.os.Bundle)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void performStart()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void performStop()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void postponeEnterTransition(long,java.util.concurrent.TimeUnit)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void requestPermissions(java.lang.String[],int)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void restoreViewState(android.os.Bundle)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void setRetainInstance(boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void startActivity(android.content.Intent,android.os.Bundle)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void startActivityForResult(android.content.Intent,int,android.os.Bundle)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void startIntentSenderForResult(android.content.IntentSender,int,android.content.Intent,int,int,int,android.os.Bundle)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void ()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean markState(androidx.fragment.app.FragmentManager,androidx.lifecycle.Lifecycle$State)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void dump(java.lang.String,java.io.FileDescriptor,java.io.PrintWriter,java.lang.String[])' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onActivityResult(int,int,android.content.Intent)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onCreate(android.os.Bundle)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onCreatePanelMenu(int,android.view.Menu)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onDestroy()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onMenuItemSelected(int,android.view.MenuItem)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onPanelClosed(int,android.view.Menu)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onPause()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean onPreparePanel(int,android.view.View,android.view.Menu)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onRequestPermissionsResult(int,java.lang.String[],int[])' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onSaveInstanceState(android.os.Bundle)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onStart()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'java.lang.Class loadClass(java.lang.ClassLoader,java.lang.String)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void throwException(java.lang.RuntimeException)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'boolean isPrimaryNavigation(androidx.fragment.app.Fragment)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void makeActive(androidx.fragment.app.Fragment)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void moveFragmentToExpectedState(androidx.fragment.app.Fragment)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.view.View onCreateView(android.view.View,java.lang.String,android.content.Context,android.util.AttributeSet)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.os.Parcelable saveAllState()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void scheduleCommit()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void ()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void startTransitions(androidx.fragment.app.FragmentManagerImpl,java.util.ArrayList,java.util.ArrayList,int,int,boolean)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onStateChanged(androidx.lifecycle.LifecycleOwner,androidx.lifecycle.Lifecycle$Event)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void clear()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void ()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void onCleared()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'androidx.media.AudioAttributesCompat read(androidx.versionedparcelable.VersionedParcel)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void ()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'int getAlpha()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.graphics.ColorFilter getColorFilter()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void inflate(android.content.res.Resources,org.xmlpull.v1.XmlPullParser,android.util.AttributeSet,android.content.res.Resources$Theme)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void (android.content.Context,android.util.AttributeSet,org.xmlpull.v1.XmlPullParser)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void draw(android.graphics.Canvas)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'int getAlpha()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'android.graphics.ColorFilter getColorFilter()' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void inflate(android.content.res.Resources,android.util.AttributeSet,android.content.res.Resources$Theme,org.xmlpull.v1.XmlPullParser)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'void writeVersionedParcelable(androidx.versionedparcelable.VersionedParcelable)' already has a mapping","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"'androidx.versionedparcelable.VersionedParcelable readVersionedParcelable()' already has a mapping","sources":[{}],"tool":"R8"}

> Task :app:transformClassesAndResourcesWithR8ForRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithR8ForRelease'.
> com.android.tools.r8.CompilationFailedException: Compilation failed to complete

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 41s
29 actionable tasks: 10 executed, 19 up-to-date
9:23:24: Task execution finished 'buildTinkerPatchRelease'.

如果path 下面的补丁包拿到,这一步就大功告成了。接下来你就可以放心的将你的apk去测试了,按照文档去操作。

使用bugly还有一个问题,好像是9.0不能使用bugly去修复。 我测试的是华为荣耀9x,版本是9.0 不行,在7.0都可以。

我在他们的github demo 上面 :https://github.com/BuglyDevTeam/Bugly-Android-Demo/wiki#%E7%83%AD%E6%9B%B4%E6%96%B0%E9%97%AE%E9%A2%98%E6%B1%87%E6%80%BB ,找到方式也不行。

    如果有什么不懂的可以看我自己的demo参考一下配置过程,上面有链接,同时记录一下自己的配置bugly踩过的坑。如果你有好的建议或者其他问题,可以留言评论,一起学习交流!

 

你可能感兴趣的:(Android,热修复)