【发布时间】:2019-04-06 09:38:46
【问题描述】:
我正在手动编译一个 apk。但是使用aapt的时候打包有错误。
在 Android Studio 中创建一个简单的项目。然后用aapt打包他的资源。 命令如下:
aapt package -f -m -J build -S res -M AndroidManifest.xml
-I /SDK/platforms/android-28/android.jar
错误输出如下:
error: resource style/Theme.AppCompat.Light.NoActionBar (aka com.jz.myapplication:style/Theme.AppCompat.Light.NoActionBar) not found.
./res/values/styles.xml:6: error: style attribute 'attr/colorPrimary (aka com.jz.myapplication:attr/colorPrimary)' not found.
./res/values/styles.xml:7: error: style attribute 'attr/colorPrimaryDark (aka com.jz.myapplication:attr/colorPrimaryDark)' not found.
./res/values/styles.xml:8: error: style attribute 'attr/colorAccent (aka com.jz.myapplication:attr/colorAccent)' not found.
error: failed linking references.
【问题讨论】: