android studio報錯: error: Apostrophe not preceded by

TextView控件常見問題

為了國際化需要,通常需要采用多種字體。

<TextView   
 android:text="@string/desc"   
 android:layout_margin="5dp"
 android:id="@+id/textView2"    
 android:layout_width="wrap_content"    
 android:layout_height="wrap_content"/>

    <string name="desc">We 're back with another Picasso transformation post. We are already shown you how to transform images in a previous post. There are a few implementations for Picasso transformations floating around on the Internet, but it is tedious work to find a good one for your need. In this blog post, we will show you how to integrate and use a collection of transformations.In case you want to catch up with previous Picasso topics, check out our extensive list of blog posts</string>

run后,報error: Apostrophe not preceded 的錯誤。

  • 解決辦法一:
    手工去掉所有‘的字符,例如can't轉換成can not,顯然這樣效率低下。
  • 解決辦法二:
    使用轉義字符,如We're...
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容