froyohuang / replugin-androidx Goto Github PK
View Code? Open in Web Editor NEWA RePlugin branch supports AndroidX 支持AndroidX的RePlugin框架分支
A RePlugin branch supports AndroidX 支持AndroidX的RePlugin框架分支
官方2.3.4出来了,能支持吗。
问题详细描述 Detailed description of the problem
编译demo中的插件报错:
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'replugin-plugin-gradle-androidx']
groovy.lang.MissingPropertyException: No such property: taskManager for class: com.android.build.gradle.AppPlugin
其他:
win7 64
Android Studio 3.6.1
replugin-plugin-gradle-androidx:2.3.3.0
错误:android.content.res.Resources$NotFoundException: Resource ID #0x7f070000 type #0x5 is not valid
RePlugin.startActivity启动
宿主用了appcompatactivity
插件activity继承原生activity
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'replugin-plugin-gradle-androidx']
PluginDexClassLoader: loadClass ClassNotFoundException, from PluginClassLoader
官方的和您这个都试了,是什么原因,导包确认没问题呀,怎么找不到类?
具体如下:
第一条:Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'.
第二条:Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve io.github.froyohuang:replugin-plugin-gradle-androidx:2.3.3.0.
第三条:Caused by: org.gradle.api.resources.ResourceException: Could not get resource 'https://dl.bintray.com/froyo-github/Replugin-AndroidX/io/github/froyohuang/replugin-plugin-gradle-androidx/2.3.3.0/replugin-plugin-gradle-androidx-2.3.3.0.pom'.
具体引用:
distributionUrl=https://services.gradle.org/distributions/gradle-5.4.1-all.zip
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "io.github.froyohuang:replugin-plugin-gradle-androidx:2.3.3.0"
maven{
url "https://dl.bintray.com/froyo-github/Replugin-AndroidX"
}
apply plugin: 'replugin-plugin-gradle-androidx'
repluginPluginConfig {
pluginName = "demo1"
hostApplicationId = "com.qihoo360.replugin.sample.host"
hostAppLauncherActivity = "com.qihoo360.replugin.sample.host.MainActivity"
}
implementation "io.github.froyohuang:replugin-plugin-lib-androidx:2.3.3.0"
插件的配置应用成功,我将上面的换成宿主的参数是可以应用成功
IPluginHost 编译无法通过,加上资源没有迁移, 相当于无法使用这个项目
版本:2.3.3.0
详细描述:项目作为插件,接入阿里云的一键登录SDK,在移动卡调用接口时,一直报某一个图片资源找不到的Exception,该资源是属于一键登录SDK里的,打开Apk发现要找的资源其实是存在的,但就是找不到,导致一键登录功能无法正常使用。去掉依赖本插件后,又能正常使用。联系过阿里云的工程师,他们说是资源混淆的问题,但打开Apk看到的是所有资源都没被混淆过,也试过将找不到的图片直接放到本工程的drawable,也还是不行,不知大神有没有什么办法!
错误打印:
E/LoginAuthActivity: CMCC-SDK:android.content.res.Resources$NotFoundException: umcsdk_return_bg
W/System.err: android.content.res.Resources$NotFoundException: umcsdk_return_bg
W/System.err: at com.cmic.sso.sdk.utils.n.a(ResourceUtil.java:119)
W/System.err: at com.cmic.sso.sdk.utils.w.a(UmcActivityUtil.java:231)
W/System.err: at com.cmic.sso.sdk.widget.a.b(ServerClauseDialog.java:105)
W/System.err: at com.cmic.sso.sdk.widget.a.a(ServerClauseDialog.java:70)
W/System.err: at com.cmic.sso.sdk.widget.a.(ServerClauseDialog.java:37)
W/System.err: at com.cmic.sso.sdk.activity.LoginAuthActivity.d(LoginAuthActivity.java:165)
W/System.err: at com.cmic.sso.sdk.activity.LoginAuthActivity.onCreate(LoginAuthActivity.java:103)
W/System.err: at android.app.Activity.performCreate(Activity.java:7066)
W/System.err: at android.app.Activity.performCreate(Activity.java:7057)
W/System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1216)
W/System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931)
W/System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3061)
W/System.err: at android.app.ActivityThread.-wrap12(Unknown Source:0)
W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1747)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
W/System.err: at android.os.Looper.loop(Looper.java:192)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6842)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
host和plugin均使用'androidx.appcompat:appcompat:1.1.0',plugin继承PluginAppCompatActivity;host跳转到plugin会报错;
020-04-24 15:41:25.456 18918-18918/com.jxwdyf.host E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.jxwdyf.host, PID: 18918
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jxwdyf.host/com.jxwdyf.host.loader.a.ActivityN1NRNTS3}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2747)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2808)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:165)
at android.app.ActivityThread.main(ActivityThread.java:6375)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:696)
at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:659)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:552)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
at com.test.android.plugin1.MainActivity.onCreate(MainActivity.java:30)
at android.app.Activity.performCreate(Activity.java:6845)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2700
Android tools gradle version 3.5.x , gradle version 5.4.1+
Execution failed for task ':app:mergeDebugJavaResource'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
!File.isFile(): /xxx/libs/xxx.jar
项目编译报错
Could not resolve io.github.froyohuang:replugin-host-lib-androidx:2.3.3.0.
Could not get resource 'https://jitpack.io/io/github/froyohuang/replugin-host-lib-androidx/2.3.3.0/replugin-host-lib-androidx-2.3.3.0.pom'.
Could not HEAD 'https://jitpack.io/io/github/froyohuang/replugin-host-lib-androidx/2.3.3.0/replugin-host-lib-androidx-2.3.3.0.pom'. Received status code 401 from server: Unauthorized
引用插件到app.glide报了个401
1.是否满足在各种SDK版本上运行。
资源已经找不到,感觉应该迁移到MavenCentral了
https://dl.bintray.com/froyo-github/Replugin-AndroidX
访问401,地址不见啦亲,快点维护吧
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.