iT邦幫忙

1

FontFamilyFont, unable to find attribute android、 No resource identifier found for attribute

Android設定環境如下:
https://ithelp.ithome.com.tw/upload/images/20180608/20110232A4hWqxhV7k.png
https://ithelp.ithome.com.tw/upload/images/20180608/20110232GY0LUlHerH.png
https://ithelp.ithome.com.tw/upload/images/20180608/20110232lDlGteGzCC.png
https://ithelp.ithome.com.tw/upload/images/20180608/20110232FqbYkWneiv.png
程式用到的插件:
https://ithelp.ithome.com.tw/upload/images/20180608/20110232ts7HJQGozW.png
專案加入Android平台的AndroidManifest.xml:
https://ithelp.ithome.com.tw/upload/images/20180608/20110232CG7IgOFau5.png
專案加入Android平台的build.gradle:
https://ithelp.ithome.com.tw/upload/images/20180608/20110232oKOyoDDxGQ.png
https://ithelp.ithome.com.tw/upload/images/20180608/20110232uGUVZ3y8I6.png
專案加入Android平台的project.properties:
https://ithelp.ithome.com.tw/upload/images/20180608/20110232ijCMl64LZY.png

電腦是MAC,之前打包都是正常沒有錯誤,有一段時間沒用,最近要用時打包Android出錯(那時候沒截圖,忘了是什麼錯誤),有上網查沒查到解決方法,後來想說會不會是每次打開電腦提醒更新的緣故,於是就更新MAC系統,更新完後我是先打包IOS,因為要實機測試,手上iphone7 plus的IOS是11.4,必須更新Xcode至9.4才能實機安裝到IOS 11.4,於是更新Xcode後打包測試完上架,接著要打包Android時一樣有錯誤,但錯誤跟原本不一樣如下圖:
https://ithelp.ithome.com.tw/upload/images/20180608/201102322YXwRfhw5X.png
有上網查到很多解決方式:

  1. 插件的com.android.support一律改為一樣且不要有+號,移除Android平台,重新加入Android平台後打包。
  2. 在build.gradle最後面加入底下重新打包。
    configurations.all {
    resolutionStrategy {
    force 'com.android.support:support-v4:27.1.0'
    }
    }
  3. 改插件使用com.android.support:support-v4的版號,移除Android平台,重新加入Android平台後打包。
  4. 修改build.gradle的buildscript、allprojects的repositories。
  5. config.xml加上:
    <plugin spec="https://github.com/dpa99c/cordova-android-support-gradle-release" source="git" />

終端機下指令裝插件:
ionic plugin add cordova-android-support-gradle-release --save

試過都沒效,後來移除有用到com.android.support:support的插件,打包時錯誤訊息變成如下圖:
https://ithelp.ithome.com.tw/upload/images/20180608/20110232hB9tipJmMd.png

一樣沒查到解決方法。
移除的插件勢必要再加回去,不然程式執行會出錯,請問有人知道上面提到的2個錯誤如何解決嗎?

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友回答

立即登入回答