在demo的app里面的添加Application之后,无法启动了。
Closed this issue · 32 comments
在app里添加了一个application,启动报错。应用在自己有Application的项目上也是如此。求解~
下面是报错信息:
05-15 16:42:54.912 18675-18675/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.txjs.wj.dexknife_wj, PID: 18675
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.txjs.wj.dexknife_wj/com.txjs.wj.dexknife_wj.MainActivity}: java.lang.RuntimeException: Unable to instantiate application com.qianfandu.app.AppApplication: java.lang.ClassNotFoundException: Didn't find class "com.qianfandu.app.AppApplication" on path: DexPathList[[dex file "/data/data/com.txjs.wj.dexknife_wj/app_apktoolplus_dex/classes2.dex"],nativeLibraryDirectories=[/data/app/com.txjs.wj.dexknife_wj-1/lib/arm, /vendor/lib, /system/lib, /lib, /usr/lib, /home/EPT_Middleware/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2327)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.access$800(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
Caused by: java.lang.RuntimeException: Unable to instantiate application com.qianfandu.app.AppApplication: java.lang.ClassNotFoundException: Didn't find class "com.qianfandu.app.AppApplication" on path: DexPathList[[dex file "/data/data/com.txjs.wj.dexknife_wj/app_apktoolplus_dex/classes2.dex"],nativeLibraryDirectories=[/data/app/com.txjs.wj.dexknife_wj-1/lib/arm, /vendor/lib, /system/lib, /lib, /usr/lib, /home/EPT_Middleware/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.access$800(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.qianfandu.app.AppApplication" on path: DexPathList[[dex file "/data/data/com.txjs.wj.dexknife_wj/app_apktoolplus_dex/classes2.dex"],nativeLibraryDirectories=[/data/app/com.txjs.wj.dexknife_wj-1/lib/arm, /vendor/lib, /system/lib, /lib, /usr/lib, /home/EPT_Middleware/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.Instrumentation.newApplication(Instrumentation.java:980)
at android.app.LoadedApk.makeApplication(LoadedApk.java:558)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.access$800(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
Suppressed: java.lang.ClassNotFoundException: Didn't find class "com.qianfandu.app.AppApplication" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib, /lib, /usr/lib, /home/EPT_Middleware/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 14 more
Suppressed: java.lang.ClassNotFoundException: com.qianfandu.app.AppApplication
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 15 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
没有找到 com.qianfandu.app.AppApplication 你是不是没有改注册的名称 这个是demo里面的AppApplication
如果被加壳的app里面定义一个Application,除了在app的Manifest文件里面注册这个Application,还有哪里需要注册呢?
你要修改加壳的那个项目或者修改配置具体看gihub上的说明,我好像写了的
修改你要加载的Application 路径
您文档上写的是针对壳的Application,原话是:# application '你的壳的application 名称' 。
所以不太确定在被加壳项目上添加application之后,需要怎么注册
我将被加壳项目的application名称注册到这个项目的配置文件里,这么写的:
application 'MyAppApplication' 。
这样写会报以下错误:
Process: com.txjs.wj.dexknife_wj, PID: 11564
java.lang.RuntimeException: Unable to instantiate application com.txjs.wj.dexknife_wj.MyAppApplication: java.lang.ClassNotFoundException: Didn't find class "com.txjs.wj.dexknife_wj.MyAppApplication" on path: DexPathList[[zip file "/data/app/com.txjs.wj.dexknife_wj-1/base.apk"],nativeLibraryDirectories=[/data/app/com.txjs.wj.dexknife_wj-1/lib/arm, /vendor/lib, /system/lib, /lib, /usr/lib, /home/EPT_Middleware/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4540)
at android.app.ActivityThread.access$1500(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1366)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.txjs.wj.dexknife_wj.MyAppApplication" on path: DexPathList[[zip file "/data/app/com.txjs.wj.dexknife_wj-1/base.apk"],nativeLibraryDirectories=[/data/app/com.txjs.wj.dexknife_wj-1/lib/arm, /vendor/lib, /system/lib, /lib, /usr/lib, /home/EPT_Middleware/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.Instrumentation.newApplication(Instrumentation.java:980)
at android.app.LoadedApk.makeApplication(LoadedApk.java:558)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4540)
at android.app.ActivityThread.access$1500(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1366)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
Suppressed: java.lang.ClassNotFoundException: com.txjs.wj.dexknife_wj.MyAppApplication
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 13 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
这个是设置你修改加壳包的 名称,自己项目里面Application不用设置,自己会去获取启动
你新加的AppApplication 注册了吗
是在清单文件里面注册就行吧?
默认读取AndroidManifest.xml里面注册的
现在app定义的Application的名字是MyAppApplication,在app的AndroidManifest注册了,build.gradle中没有注册,加固后报错信息是:
05-17 10:04:13.577 18405-18405/? E/ProxyApplication: loadEncryptDex success
05-17 10:04:13.591 18405-18405/? E/ApkToolPlus: data size 36
05-17 10:04:13.605 18405-18405/? E/ProxyApplication: changeTopApplication failure!!!
05-17 10:04:13.630 18405-18405/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.txjs.wj.dexknife_wj, PID: 18405
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.txjs.wj.dexknife_wj/com.txjs.wj.dexknife_wj.MainActivity}: java.lang.RuntimeException: Unable to instantiate application com.qianfandu.app.AppApplication: java.lang.ClassNotFoundException: Didn't find class "com.qianfandu.app.AppApplication" on path: DexPathList[[dex file "/data/data/com.txjs.wj.dexknife_wj/app_apktoolplus_dex/classes2.dex"],nativeLibraryDirectories=[/data/app/com.txjs.wj.dexknife_wj-1/lib/arm, /vendor/lib, /system/lib, /lib, /usr/lib, /home/EPT_Middleware/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2327)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.access$800(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
Caused by: java.lang.RuntimeException: Unable to instantiate application com.qianfandu.app.AppApplication: java.lang.ClassNotFoundException: Didn't find class "com.qianfandu.app.AppApplication" on path: DexPathList[[dex file "/data/data/com.txjs.wj.dexknife_wj/app_apktoolplus_dex/classes2.dex"],nativeLibraryDirectories=[/data/app/com.txjs.wj.dexknife_wj-1/lib/arm, /vendor/lib, /system/lib, /lib, /usr/lib, /home/EPT_Middleware/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.access$800(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.qianfandu.app.AppApplication" on path: DexPathList[[dex file "/data/data/com.txjs.wj.dexknife_wj/app_apktoolplus_dex/classes2.dex"],nativeLibraryDirectories=[/data/app/com.txjs.wj.dexknife_wj-1/lib/arm, /vendor/lib, /system/lib, /lib, /usr/lib, /home/EPT_Middleware/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.Instrumentation.newApplication(Instrumentation.java:980)
at android.app.LoadedApk.makeApplication(LoadedApk.java:558)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.access$800(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
Suppressed: java.lang.ClassNotFoundException: Didn't find class "com.qianfandu.app.AppApplication" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib, /lib, /usr/lib, /home/EPT_Middleware/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 14 more
Suppressed: java.lang.ClassNotFoundException: com.qianfandu.app.AppApplication
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 15 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
这是我的build.gradle配置文件:
import java.text.SimpleDateFormat
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.library.wj:dexknife-wj:1.0.3'//分包
}
}
apply plugin: 'com.android.application'
apply plugin: 'dexknifeWj'
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.txjs.wj.dexknife_wj"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// dex突破65535的限制
multiDexEnabled true
}
// signingConfigs {
// releaseConfig {
// keyAlias 'cric'
// keyPassword 'crickeystore'
// storeFile file('../doc/ecan.keystore')
// storePassword 'keystorecric'
// }
// config_debug {
// keyAlias 'androiddebugkey'
// keyPassword 'android'
// storeFile file('../doc/debug.keystore')
// storePassword 'android'
// }
// }
signingConfigs {
releaseConfig {
keyAlias 'cric'
keyPassword 'crickeystore'
storeFile file('../doc/ecan.keystore')
storePassword 'keystorecric'
v2SigningEnabled false//禁用新版签名 配合packer多渠道打包
}
}
buildTypes {
release {
minifyEnabled false
signingConfig signingConfigs.releaseConfig
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
signingConfig signingConfigs.releaseConfig
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dexKnife {
//必选参数
enabled true //if false,禁用分包插件
//可选参数/
//1.如果没有可选参数,将根据enabled决定是否分包。
//2.如果有可选参数,需满足必选参数和可选参数的条件才允许分包
//=======================加固
shell true
packerNgShell false
apktoolpath '../doc/apktool.jar'
jiaguzippath '../doc/jiagu.zip'
// application 'com.qianfandu.ProxyApplication'
//=======================多渠道
// 指定渠道打包输出目录
archiveOutput = file(new File(project.buildDir.path, new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + "_apks"))
// 指定渠道打包输出文件名格式
// 默认是 ${appPkg}-${flavorName}-${buildType}-v${versionName}-${versionCode}
archiveNameFormat = 'qianfandu-${flavorName}-${versionName}'
// 是否检查Gradle配置中的signingConfig,默认不检查
// checkSigningConfig = false
// 是否检查Gradle配置中的zipAlignEnabled,默认不检查
// checkZipAlign = false
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.2.0'
}
你注册是不是写的完整路径 不要写 .Application的简写
清单文件这样写的:
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
这是加固后运行报错信息:
05-17 10:38:48.250 23872-23872/? E/ApkToolPlus: data size 2028264
05-17 10:38:48.385 23872-23872/? E/ProxyApplication: loadEncryptDex success
05-17 10:38:48.397 23872-23872/? E/ApkToolPlus: data size 36
05-17 10:38:48.413 23872-23872/? E/ProxyApplication: changeTopApplication failure!!!
05-17 10:38:48.454 23872-23872/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.txjs.wj.dexknife_wj, PID: 23872
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.txjs.wj.dexknife_wj/com.txjs.wj.dexknife_wj.MainActivity}: java.lang.RuntimeException: Unable to instantiate application com.qianfandu.app.AppApplication: java.lang.ClassNotFoundException: Didn't find class "com.qianfandu.app.AppApplication" on path: DexPathList[[dex file "/data/data/com.txjs.wj.dexknife_wj/app_apktoolplus_dex/classes2.dex"],nativeLibraryDirectories=[/data/app/com.txjs.wj.dexknife_wj-1/lib/arm, /vendor/lib, /system/lib, /lib, /usr/lib, /home/EPT_Middleware/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2327)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.access$800(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
Caused by: java.lang.RuntimeException: Unable to instantiate application com.qianfandu.app.AppApplication: java.lang.ClassNotFoundException: Didn't find class "com.qianfandu.app.AppApplication" on path: DexPathList[[dex file "/data/data/com.txjs.wj.dexknife_wj/app_apktoolplus_dex/classes2.dex"],nativeLibraryDirectories=[/data/app/com.txjs.wj.dexknife_wj-1/lib/arm, /vendor/lib, /system/lib, /lib, /usr/lib, /home/EPT_Middleware/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.access$800(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.qianfandu.app.AppApplication" on path: DexPathList[[dex file "/data/data/com.txjs.wj.dexknife_wj/app_apktoolplus_dex/classes2.dex"],nativeLibraryDirectories=[/data/app/com.txjs.wj.dexknife_wj-1/lib/arm, /vendor/lib, /system/lib, /lib, /usr/lib, /home/EPT_Middleware/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.Instrumentation.newApplication(Instrumentation.java:980)
at android.app.LoadedApk.makeApplication(LoadedApk.java:558)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.access$800(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
Suppressed: java.lang.ClassNotFoundException: Didn't find class "com.qianfandu.app.AppApplication" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib, /lib, /usr/lib, /home/EPT_Middleware/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 14 more
Suppressed: java.lang.ClassNotFoundException: com.qianfandu.app.AppApplication
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 15 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
<application
android:name="com.txjs.wj.dexknife_wj.App"
显示的是没有切换app成功 我有空再demo上写个Application 试下
抱歉上面的回复没有显示全,我的清单文件这样写的:
<application
android:name="com.txjs.wj.dexknife_wj.MyAppApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
您有什么思路吗,我可以按照思路改一下。工期紧啊 -_-!!
你看下壳项目的 ProxyApplication 里面的切换Application 看看有什么错误了
照理说不该有什么问题 看看是不是兼容的问题
嗯,我再捣鼓一下吧
我试了没有问题 看看你是不是写错了
不应该写错啊,您方便把demo发来吗? 我的邮箱是:wanglu_run@163.com
我添加的application,如果不加壳是可以正常运行的,里面的东西也会执行。
大概是sdk版本不一样 取不到反射方法 还需要测试下 你急需的话可以修改那个壳项目的反射方法 错误是没有反射到 下个版本我会兼容上去
您下个版本大概啥时候出呢?
我可以帮忙测试
我重新给你发个jiagu.zip吧 估计github上面的那个有问题
是的,用了这个jiagu.zip,demo就可以运行起来了!
好的 插件最近没有时间更新。。。 有空就升级。。
这个插件真的很方便,感谢分享~