didi / VirtualAPK

A powerful and lightweight plugin framework for Android
Apache License 2.0
8.99k stars 1.52k forks source link

生成插件apk时报错?Virtual不支持Android X吗? #364

Closed Petterpx closed 4 years ago

Petterpx commented 4 years ago

疑惑的是,复制的网上一样的代码在非Android X版本可以正常运行,VirtualAPK 不支持Android X吗?

Petterpx commented 4 years ago

降低sdk版本也是不行的。

Petterpx commented 4 years ago

又测试了一遍,的确不支持Android X。 在support 包可以正常工作,当切换到Android x时,就会出现 Failed to notify task execution listener.的问题。

具体版本问题如下:

Android Sdk 29.0.2

* What went wrong:
Failed to notify task execution listener.
> Required entry 'coordinatorLayoutStyle' but got 'contentInsetStartWithNavigation', This is seems to unsupport the buildToolsRevision: 29.0.2.

Android Sdk 28.0.3

* What went wrong:
Failed to notify task execution listener.
> Required entry 'coordinatorLayoutStyle' but got 'contentInsetStartWithNavigation', This is seems to unsupport the buildToolsRevision: 28.0.3.

当 Android Sdk调至 28以下时,会存在以下报错:

AGPBI: {"kind":"error","text":"error: resource android:attr/dialogCornerRadius not found.","sources":[{"file":"/Users/petterp/.gradle/caches/transforms-1/files-1.1/appcompat-1.1.0.aar/90af32da26db8b4d96e1fd5c3474d2b4/res/values-v28/values-v28.xml","position":{"startLine":8,"startColumn":4,"startOffset":447,"endLine":11,"endColumn":12,"endOffset":684}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"error: resource android:attr/dialogCornerRadius not found.","sources":[{"file":"/Users/petterp/Desktop/didi/Didi/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v28/values-v28.xml","position":{"startLine":10}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"error: resource android:attr/fontVariationSettings not found.","sources":[{"file":"/Users/petterp/.gradle/caches/transforms-1/files-1.1/appcompat-1.1.0.aar/90af32da26db8b4d96e1fd5c3474d2b4/res/values/values.xml","position":{"startLine":69,"startColumn":4,"startOffset":4638,"endColumn":68,"endOffset":4702}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"error: resource android:attr/ttcIndex not found.","sources":[{"file":"/Users/petterp/.gradle/caches/transforms-1/files-1.1/appcompat-1.1.0.aar/90af32da26db8b4d96e1fd5c3474d2b4/res/values/values.xml","position":{"startLine":69,"startColumn":4,"startOffset":4638,"endColumn":68,"endOffset":4702}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"error: resource android:attr/textFontWeight not found.","sources":[{"file":"/Users/petterp/.gradle/caches/transforms-1/files-1.1/appcompat-1.1.0.aar/90af32da26db8b4d96e1fd5c3474d2b4/res/values/values.xml","position":{"startLine":69,"startColumn":4,"startOffset":4638,"endColumn":68,"endOffset":4702}}],"original":"","tool":"AAPT"}
/Users/petterp/Desktop/didi/Didi/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
/Users/petterp/Desktop/didi/Didi/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
/Users/petterp/Desktop/didi/Didi/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:308: error: resource android:attr/fontVariationSettings not found.
/Users/petterp/Desktop/didi/Didi/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:308: error: resource android:attr/ttcIndex not found.
/Users/petterp/Desktop/didi/Didi/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:395: error: resource android:attr/textFontWeight not found.

尝试了删除build文件和清除缓存重启Android Studio,均无效果。故Android x情况下,sdk28以下无法测试。

mayi203 commented 4 years ago

支持的,我就在用

Petterpx commented 4 years ago

支持的,我就在用

好的,可能是我打开的方式不对,再试试吧

LPhoenix365 commented 3 years ago

支持的,我就在用

你好问下,support28.0.0,是需要额外处理一些配置才可以吗?我这边升级到28.0.0 构建插件一直失败