zoukankan      html  css  js  c++  java
  • Xposed 在android 6.0上报couldn't load class,找不到xposed_init中配置的入口类

    经测试再android 4.4时是可以直接在android studio中运行debug签名包,在xposed中运行的,但是6.0的机器不好使。解决办法是在运行时使用release版并签名

    apply plugin: 'com.android.application'
    
    android {
        signingConfigs {
            config {
                keyAlias 'demo'
                keyPassword 'xirtam'
                storeFile file('C:\workspace\demo.jks')
                storePassword 'xirtam'
            }
        }
        compileSdkVersion 28
        defaultConfig {
            applicationId "com.xirtam.testhook"
            minSdkVersion 15
            targetSdkVersion 28
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                signingConfig signingConfigs.config
            }
            debug {
                signingConfig signingConfigs.config
            }
        }
    }
    
    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:28.0.0'
        implementation 'com.android.support.constraint:constraint-layout:1.1.3'
        implementation 'com.android.support:design:28.0.0'
        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'
    
        compileOnly 'de.robv.android.xposed:api:82'
    }

    然后在android studio的Build Variants视图中,Build Variant中选择release,再次运行即可。

  • 相关阅读:
    配置缓存过期时间
    浏览器读取缓存流程
    nginx做代理的优化
    系统优化
    每日总结2.2
    每日总结2.1
    《构建之法》阅读笔记三
    每日总结1.29
    每日总结1.28
    每日总结1.27
  • 原文地址:https://www.cnblogs.com/xirtam/p/10443141.html
Copyright © 2011-2022 走看看