eleme / Amigo

A hotfix library for Android platform, and not just this...
Other
1.37k stars 213 forks source link

在Android17之前的项目如何使用Amigo #230

Closed showedboy closed 7 years ago

showedboy commented 7 years ago

当制作使用android 17(4.2)之前的版本的APK的时候会报错 AndroidManifest.xml:29: error: No resource identifier found for attribute 'supportsRtl' in package 'android',怎么在4.0集成Amigo?

showedboy commented 7 years ago

另外在gradle3.3出现这个错误 16:32:41.366 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: java.lang.NullPointerException: Cannot invoke method entries() on null object 16:32:41.366 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at me.ele.amigo.AmigoPlugin.collectMultiDexInfo(AmigoPlugin.groovy:150) 16:32:41.366 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at me.ele.amigo.AmigoPlugin$_apply_closure1$_closure5$_closure7$_closure10.doCall(AmigoPlugin.groovy:114) 16:32:41.366 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:596) 16:32:41.366 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:577) 16:32:41.366 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:95) 16:32:41.366 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:76) 16:32:41.367 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] ... 78 more

JackCho commented 7 years ago

@showedboy 请先别用gradle 3.3版本,此处有坑,建议最好用2.14.1。 supportsRtl 这个东西看日志应不是Amigo的问题,建议你把buildtool版本和amigo一致的版本

showedboy commented 7 years ago

studio直接提示了错误位置,是debug生成的Amigo的AndroidManifest.xml文件中少了个属性supportsRtl,是android4.2之后才会出现的一个属性。Error:(50) No resource identifier found for attribute 'supportsRtl' in package 'android',好像Amigo插件自动构建用的是4.2之上的版本。