1. 程式人生 > >ReactNative android C:\Users\60186\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\0f5

ReactNative android C:\Users\60186\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\0f5

最近Studio升級到3.0 後,新建一個專案,什麼都沒有新增就報錯,煩都煩死了

錯誤日誌如下:

C:\Users\Administrator\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\6a8b09efde42f84982ba083742b4753d\res\values\values.xmlError:(1050, 5) error: resource style/Widget.AppCompat.DrawerArrowToggle (aka com.wcyq.wolfmvvmdemo:style/Widget.AppCompat.DrawerArrowToggle) not found.
Error:(862, 5) error: resource style/Widget.AppCompat.DrawerArrowToggle (aka com.wcyq.wolfmvvmdemo:style/Widget.AppCompat.DrawerArrowToggle) not found.

百度了一通;

搜到了這兩篇還可以的文章;

    在gradle.properties 檔案下新增 android.enableAapt2=false   在AS 的左上角 選擇 -->File-->invalidated and Restart 一下操作了,沒解決我的問題.

一時間搞得很煩躁.後來自己改了下依賴版本號,結果就好了,操

沒改之前; 這個是studio自動生成的.

  1. dependencies {
  2. implementation fileTree(dir: 'libs', include: ['*.jar'])
  3. implementation 'com.android.support:appcompat-<span style="color:#ff0000;">v7:26.+'</span>
  4. implementation 'com.android.support.constraint:constraint-layout:1.0.2'
  5. testImplementation 'junit:junit:4.12'
  6. androidTestImplementation 'com.android.support.test:runner:1.0.1'
  7. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  8. }

改了之後;

  1. dependencies {
  2. implementation fileTree(dir: 'libs', include: ['*.jar'])
  3. implementation 'com.android.support:appcompat-v<span style="background-color:rgb(255,0,0);">7:25.+</span>'
  4. implementation 'com.android.support.constraint:constraint-layout:1.0.2'
  5. testImplementation 'junit:junit:4.12'
  6. androidTestImplementation 'com.android.support.test:runner:1.0.1'
  7. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  8. }
 程式能跑起來了.真是斃了狗了,studio一升級,盡是些狗屁問題,建議沒有升級的還是不要升級這些新版本,問題搞的頭大!