needn'wouldn t have donee和didn't need to do 有什么不同

I did a lot of research and this seems to be a common error for many users but for very different reasons. None of which I found worked for me.
I'm getting
java.lang.RuntimeException: Unable to start activity ComponentInfo{
[...]/[...].activities.StartActivity}: android.view.InflateException:
Binary XML file line #173: Error inflating class [...].BannerAd
Caused by: android.view.InflateException: Binary XML file line #8: Error
inflating class com.google.android.gms.ads.AdView
Caused by: java.lang.ClassNotFoundException: Didn't find class
"com.google.android.gms.ads.AdView" on path: DexPathList[[zip file
"/data/app/[...]-1.apk"],nativeLibraryDirectories=[/data/app-lib/[...]-1,
/vendor/lib, /system/lib]]
I'm having the newest versions of ADT and SDK packages installed. I copied google-play-services_lib to my workspace and imported it as a Android project. I added it as a library to my app project. I checked everything under "Order and Export".
I'm having a banner_ad.xml:
&LinearLayout
xmlns:android="/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top"
android:orientation="vertical" &
&com.google.android.gms.ads.AdView
xmlns:ads="/apk/res-auto"
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="[...]" /&
&/LinearLayout&
And a BannerAd.java which I am using:
package [...];
import android.content.C
import android.util.AttributeS
import android.view.LayoutI
import android.widget.LinearL
import [...].R;
import [...].general.S
import com.google.android.gms.ads.AdR
import com.google.android.gms.ads.AdV
public class BannerAd extends LinearLayout {
public BannerAd(Context context, AttributeSet attrs) {
super(context, attrs);
if (!Settings.PRO) {
LayoutInflater mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mInflater.inflate(R.layout.banner_ad, this, true);
AdView adView = (AdView) this.findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);
Could it have something to do with proguard? I have no idea, this is my proguard-project.txt file, however:
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
# For more details, see
/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
-keep public class com.google.mon.internal.safeparcel.SafeParcelable {
public static final *** NULL;
-keepnames @com.google.mon.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.mon.annotation.KeepName *;
-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
Any ideas what I could try to fix this?
Edit: Sometimes, I also get such output in the console (but not every time I compile, only sometimes):
[ 12:49:05 - [...]] Dx
trouble processing:
[ 12:49:05 - [...]] Dx bad class file magic (cafebabe) or version ()
...while parsing com/google/android/gms/internal/mb.class
...while processing com/google/android/gms/internal/mb.class
[ 12:49:05 - [...]] Dx
trouble processing:
[ 12:49:05 - [...]] Dx bad class file magic (cafebabe) or version ()
...while parsing com/google/android/gms/internal/mc.class
...while processing com/google/android/gms/internal/mc.class
[ 12:49:05 - [...]] Dx
[Lots of similar warnings here]
trouble processing:
[ 12:49:25 - [...]] Dx bad class file magic (cafebabe) or version ()
...while parsing com/google/ads/mediation/customevent/CustomEventAdapter$a.class
...while processing com/google/ads/mediation/customevent/CustomEventAdapter$a.class
[ 12:49:25 - [...]] Dx
trouble processing:
[ 12:49:25 - [...]] Dx bad class file magic (cafebabe) or version ()
...while parsing com/google/ads/mediation/customevent/CustomEventServerParameters.class
...while processing com/google/ads/mediation/customevent/CustomEventServerParameters.class
[ 12:49:25 - [...]] Dx 2786 warnings
解决方案 I did what @user1684030 said (upgraded Android SDK Build T changed compiler to 1.7), but not worked for me. I've written the solution that I found in case it could help anyone with the same problem:
In the step 3 of
In your app project, reference Google Play services library project.
See Referencing a Library Project for Eclipse for more information on
how to do this.
Note: You should be referencing a copy of the library that you copied
to your development workspace—you should not reference the library
directly from the Android SDK directory.
Solution: Don't do the copy manually. Instead just check the box in Eclipse that says "Copy projects into workspace"
I did it so and everything worked again.
Thanks to this StackOverFlow question:
(Admob is part of Google Play Services)
本文地址: &
我做了很多的研究,这似乎是一个常见的错误对于许多用户,但非常不同的原因。其中无我发现很适合我。
了java.lang.RuntimeException:无法启动活动ComponentInfo {
[...] / [...] activities.StartActivity}:android.view.InflateException:
二进制XML文件行#173:错误充气类[...] BannerAd
致:android.view.InflateException:二进制XML文件中的行#8:错误
充气类com.google.android.gms.ads.AdView
抛出java.lang.ClassNotFoundException:产生的原因没有找到类
在路径“com.google.android.gms.ads.AdView”:DexPathList [zip文件
“/data/app/[...]-1.apk"],nativeLibraryDirectories=[/data/app-lib/[...]-1,
/供应商/ lib中/系统/ lib目录]
我在安装ADT和SDK软件包的最新版本。我复制了谷歌播放的,services_lib到我的工作区和进口它作为一个Android项目。我增加一条,作为一个库我的应用程序的项目。我在“排序和导出”。检查一切
我有一个banner_ad.xml:
<的LinearLayout
的xmlns:机器人=“/apk/res/android”
机器人:layout_width =“FILL_PARENT”
机器人:layout_height =“WRAP_CONTENT”
机器人:layout_gravity =“center_horizontal |顶”
机器人:方向=“垂直”>
< com.google.android.gms.ads.AdView
的xmlns:广告=“/apk/res-auto”
机器人:ID =“@ + ID / AD浏览报”
机器人:layout_width =“match_parent”
机器人:layout_height =“WRAP_CONTENT”
广告:adSize =“大旗”
广告:adUnitId =“[...]”/>
< / LinearLayout中>
和我正在使用BannerAd.java:
进口android.content.C
进口android.util.AttributeS
进口android.view.LayoutI
进口android.widget.LinearL
。进口[...] R;
进口[...] general.Settings。
进口com.google.android.gms.ads.AdR
进口com.google.android.gms.ads.AdV
公共类BannerAd扩展的LinearLayout {
公共BannerAd(上下文的背景下,ATTRS的AttributeSet){
超(背景下,ATTRS);
如果(!Settings.PRO){
LayoutInflater mInflater =(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mInflater.inflate(R.layout.banner_ad,这一点,真正的);
AD浏览报AD浏览报=(AD浏览报)this.findViewById(R.id.adView);
AdRequest adRequest =新AdRequest.Builder()建立()。
adView.loadAd(adRequest);
难道必须是与ProGuard的?我不知道,这是我的ProGuard-project.txt文件,但是:
#为ProGuard的在你的项目中,编辑project.properties
#为在该文件中描述的定义proguard.config财产。
#添加项目的具体ProGuard的规则在这里。
#默认情况下,该文件中的标志被附加到指定的标志
#在$ {sdk.dir} /tools/proguard/proguard-android.txt
#您可以编辑通过改变ProGuard的包含路径和秩序
#包括project.properties财产。
#详情请参阅
#/guide/developing/tools/proguard.html
#添加任何具体项目保持选择这里:
#如果你的项目使用的WebView与JS,取消以下
#并指定完全限定类名给JavaScript接口
#-keepclassmembers类fqcn.of.javascript.interface.for.webview {
-keep类*扩展java.util.ListResourceBundle {
保护的对象[] [] getContents();
-keep公共类com.google.mon.internal.safeparcel.SafeParcelable {
公共静态最终*** NULL;
-keepnames @ com.google.mon.annotation.KeepName类*
-keepclassmembernames类* {
@ com.google.mon.annotation.KeepName *;
-keepnames类*实现android.os.Parcelable {
公共静态最后的** CREATOR;
任何想法我可以尝试解决这一问题?
编辑:有时候,我也得到这样的输出在控制台(我每次编译但不是,只是有时):
[日12时49分05秒 -
[...]]霉素
故障处理:
[日12时49分○五秒 -
[...]]霉素不良类文件魔术(cafebabe)或版本()
......在解析COM /谷歌/安卓/ GMS /内部/ mb.class
...在处理COM /谷歌/安卓/ GMS /内部/ mb.class
[日12时49分○五秒 -
[...]]霉素
故障处理:
[日12时49分○五秒 -
[...]]霉素不良类文件魔术(cafebabe)或版本()
......在解析COM /谷歌/安卓/ GMS /内部/ mc.class
...在处理COM /谷歌/安卓/ GMS /内部/ mc.class
[日12时49分○五秒 -
[...]]霉素
[很多类似的警告这里]
故障处理:
[日12时49分25秒 -
[...]]霉素不良类文件魔术(cafebabe)或版本()
......在解析COM /谷歌/广告/调停/自定义事件/ CustomEventAdapter $的A.class
...在处理COM /谷歌/广告/调停/自定义事件/ CustomEventAdapter $的A.class
[日12时49分25秒 -
[...]]霉素
故障处理:
[日12时49分25秒 -
[...]]霉素不良类文件魔术(cafebabe)或版本()
......在解析COM /谷歌/广告/调停/自定义事件/ CustomEventServerParameters.class
...在处理COM /谷歌/广告/调停/自定义事件/ CustomEventServerParameters.class
[日12时49分25秒 -
[...]]霉素2786警告
解决方案 我做了@ user1684030所说的(升级后的Android SDK构建工具;改变编译器1.7),但不是为我工作。我已经写了我的情况下,发现它可以帮助任何人以同样的问题的解决方案:
在你的应用程序的项目,参照谷歌Play业务库项目。
请参阅引用库项目为Eclipse的更多信息
如何做到这一点。
注意:您要引用的库您复制一个副本
您的开发工作区,你不应该引用库
直接从Android SDK目录
解决方案:不要做手工复制。相反,只是检查了Eclipse中的盒子,上面写着“复制项目到工作区”
我做到了,那么,一切重新工作。
由于这个计算器的问题:How修复谷歌播放服务2库安装到Eclipse
(Admob的是谷歌播放服务的一部分)
本文地址: &
扫一扫关注官方微信Auth with social network:
We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Grammar & Function Look at the picture below and share your ideas. You needn’t have run so quickly. Why did the man say it? 1.The other man was running.
Published by
Download presentation
Copy to clipboard
Presentation on theme: "Grammar & Function Look at the picture below and share your ideas. You needn’t have run so quickly. Why did the man say it? 1.The other man was running."— Presentation transcript:
Grammar & Function
Look at the picture below and share your ideas. You needn’t have run so quickly. Why did the man say it? 1.The other man was running too quickly. 2.The other man was running too slowly. 3.The other man was running quickly and it wasn’t necessary.
Look at the sentences below, then find out the differences between them. ? You didn’t need to speak slowly. ? You needn’t have spoken so slowly. didn’t need to do didn’t need to do 表示那件事不必做而且实际上那件事的确 没做。 表示那件事不必做而且实际上那件事的确 没做。 needn’t have done 表示虽然那件事不必做但实际上却做了。
Do you know them? ? can/could have done sth. ? can’t/couldn’t have done sth. ? must have done sth. ? may/might have done sth. ? should have done sth. ? shouldn’t have done sth. ? ought to have done ? ought not to have done 可能做了 … 不可能做了 … 一定做了 … 可能做了 … 应该做而没有做 … 本不该做而做了 … 应该做又没有做 … 不应该做却做了 …
? ? You needn’t have spoken so slowly. 1 1 Who said this – the tourist or the English person? 2 2 Why did she say It? Choose one of these possible reasons. a) a) The other person was speaking too quickly. b) b) The other person was speaking too slowly. c) c) The other person was speaking slowly and it wasn’t necessary. Read the sentence for the listening passage and answer the questions. The tourist
Rewrite these sentences using needn’t have done. 1. 1. It wasn’t necessary for you to bring some flowers! 2. 2. Thank you for tidying the room– but it wasn’t necessary. 3. 3. There was no need for you to buy the box of chocolates. You needn’t have brought some flowers. You needn’t have tidied the room. You needn’t have brought the box of chocolates.
Rewrite these sentences using needn’t have done. 4. 4. Why did you go to school? It’s Sunday! 5. 5. Thank you for bringing the book to show me, but I already have it. You needn’t have gone to school. It’s Sunday. You needn’t have brought the book to show me. I already have it.
Read the sentence and decide which endings are possible. ? ? I didn’t need to buy a gift for my host family______. a) a) because I already had one b) b) so I didn’t get one c) c) so I bought one d) d) so I took it back and got a refund
Complete the sentences using didn’t need to or needn’t have done. 1. 1. We brought some food to the party but there was too much, so we _____________________ (bring) any. 2. 2. My friend spoke good Mandarin so I (translate) ___________________ the speech for him. 3. 3. The office had already opened when we arrived so we ______________ (wait) outside in the street. 4. 4. I got to the party at 6 p.m. but there was no one there, so I __________________ (arrive) so early. 5. 5. I told the host all about my home town and then he told me he’d been there. I ________________ (tell) him anything! needn’t have brought didn’t need to translate didn’t need to wait needn’t have to arrived needn’t have told
Practice 1.I have lost one of my gloves. I ____ it somewhere. A. must drop B. must have dropped C. must be dropping D. must have been dropped C. must be dropping D. must have been dropped 2. Oh, I’m not feeling well in the stomach. I _____ so much fried chicken just now. A. shouldn’t eat B. mustn’t have eaten A. shouldn’t eat B. mustn’t have eaten C. shouldn’t have eaten D. mustn’t eat C. shouldn’t have eaten D. mustn’t eat
3. Mr. White _______ at 8:30 for the meeting, but he didn’t show up. A. should have arrived B. should arrive A. should have arrived B. should arrive C. should have had arrived D. should be arriving C. should have had arrived D. should be arriving 4. It was r You ___ him seriously. A. might have injured B. should have injured A. might have injured B. should have injured C. must injure D. need have injured C. must injure D. need have injured
5. Why didn’t you make me a telephone call yesterday? I _______ about it. yesterday? I _______ about it. A. ought to tell B. ought to have been told A. ought to tell B. ought to have been told C. might have told D. might have been told C. might have told D. might have been told 6. It is not like Jack to be unfriendly, so he ___ you when you called. you when you called. A. mustn’t have seen B. should not have seen A. mustn’t have seen B. should not have seen C. couldn’t have seen D. need not have seen C. couldn’t have seen D. need not have seen
7. --Look, John’s fallen sleep. --Oh, he _______ too late last night. --Oh, he _______ too late last night. A. might sit up B. should have sat up A. might sit up B. should have sat up C. could sit up D. must have sat up C. could sit up D. must have sat up 8. --John walked straight into a wall. --He _____ where he was going. --He _____ where he was going. A. can’t have looked A. can’t have looked B. mustn’t have looked B. mustn’t have looked C. couldn’t have been looking C. couldn’t have been looking D. mightn’t have been looking D. mightn’t have been looking
Talking about obligation or lack of obligation a You must arrive on time at a party. You have to arrive on time at a party. Question: Which of the following is true about the first pair of sentences? a) a) They both indicate an obligation. b) b) They are only suggestions about what to do. c) c) The first one is an obligation, the second one is a suggestion.
b. You mustn’t take yellow flowers for the host. You don’t have to take yellow flowers for the host. 2. Which of the following is true about the second pair of sentences? a) They mean the same thing. b) The first one is an obligation, the second one indicates a lack of obligation. c) The first one indicates that something is against the law.
3. Which of the following is true about the third pair of sentences? C. You don’t have to take a lift. You don’t need to take a gift. a) They mean the same thing. b) The first one is an obligation, the second one isn’t. c) The second one is an obligation, the first one isn’t.
Write three rules for a social event in my country. (The answers are open.) If you go to a social event in my country, 1 you have to _______________________. 2 2 you don’t have to __________________. 3 3 you mustn’t _______________________.
Look at the two sentences and decide which explanation is correct. 1 We all know each other. We don’t need to worry about small talk. This means _____. a) a) it isn’t necessary to worry about it b) b) unfortunately we worry about it 2 The party is informal. You needn’t wear a tie. This means ________. a) a) we must not wear a tie b) b) we can wear a tie if we choose a b
Complete the sentences with verbs to express obligation. 1. 1. Stop! You ____________________ give yellow flowers to the host! It’s unlucky! 2. 2. Don’t worry. You ________________ eat anything you don’t like. 3. 3. I’m sorry, you can’t leave. You __________ wait until the prizes have been given. 4. 4. _____ I _____________ take some food to the party? 5. 5. You ___________________________take a gift to the host, but she will be very pleased if you do. mustn’t / can’t / shouldn’t don’t have to / needn’t must / have to Do have to / need to don’t have to / don’t need to
Ads by Google您所在位置: &
&nbsp&&nbsp&nbsp&&nbsp
Module1SmallTalkGrammar:needn’thavedonedidn’tneedtodo课件(外研版选修6).ppt 29页
本文档一共被下载:
次 ,您可全文免费在线阅读后下载本文档。
下载提示
1.本站不保证该用户上传的文档完整性,不预览、不比对内容而直接下载产生的反悔问题本站不予受理。
2.该文档所得收入(下载+内容+预览三)归上传者、原创者。
3.登录后可充值,立即自动返金币,充值渠道很便利
需要金币:150 &&
Module1SmallTalkGrammar:needn’thavedonedidn’tneedtodo课件(外研版选修6).ppt
你可能关注的文档:
··········
··········
need既可用作实义动词,也可用作情态动词。
一、need用作情态动词
1.need作为情态动词,主要用于否定句、疑问句及表示疑问的从句中。
That’s all settled. It needn’t be talked about.
已完全解决,不必谈了。
Why need you go today?你为什么今天就得走?;2.回答由need引导的问句时,肯定回答一般用must,否定回答时用needn’t。
—Need I come?我需要来吗?
—Yes,you must.是的,你必须来。(—No,you needn’t.不,你不必来。) ;二、need用作实义动词
1.need用作及物动词和不定式及名词、代词等连用,可用于各种结构。
Do we need to buy tickets in advance?
我们需要预先购票吗?
I don’t need your comments. Thank you.
谢谢,我不需要你来评头论足。
He needs to win this game to stay in the match.
他得赢下这场比赛以免被淘汰出局。 ;2.在个别情况下,need作为及物动词和情态动词的句子在意思上略有差别。
He doesn’t need to be told. 不必告诉他了(告诉他没好处)。
He needn’t be told.无需告诉他(他已经知道了)。
3.当主语为“物”的名词时,用need后的动词的主动形式表被动意义, need doing=need to be done,用法同want/require。
The floor needs cleaning/to be cleaned.
地板需要打扫了。
The garden doesn’t need watering/ it rained last night.花园无需浇水,昨晚下雨了。;4.didn’t need to do与needn’t have done
(1)didn’t need to do sth表示过去没有必要干某事。
I didn’t need to go to the bank after all—Mary lent me the money.我终究不必去银行了——玛丽借给我钱了。
(2)needn’t have done sth表示“本没有必要干某事”。即事情已经做了,但现在看来没必要。
You needn’t have worked that late last night. It was harmful to your health.
你昨晚不必工作到那么晚,那对你的身体没好处。
He didn’t need to worry.
他不必担心。(是否担心,我们不知道)
He needn’t have worried.
他本不必担心。(不必做的事情已经做了);【单项填空】
—John looks sad. Did you tell him about his grandpa’s passing away?
—Yes, but I ________ him just before the college entrance examination.                  
A.ought to have told
B.needn’t have told
C.can’t have told
D.shouldn’t have told
答案 D [答句句意:是的,但是我本不该在大学入学考试前告诉他的。shouldn’t have done表示“本不该做……(而实际上做了)”,符合语境。];写一封电子邮件
【写作任务】
假设你叫李华,下面海报是你校英语角的一次活动安排。请根据海报内容用英语写一封120词左右的电子邮件,邀请你的外校朋友李明前来参加。;The English Corner invites you to come and see an English movie
——————————
Uncle Tom’s Cabin
A movie by Gezavon Rad Vanyi
(with Chinese subtitles)
——————————
October 26, 2012
No. 1 Lecture Hall 3:30~5:30 p.m.
Free popcorn & soft drinks!
Ready help from native speakers of English
Good chance to learn English
正在加载中,请稍后...}

我要回帖

更多关于 needn t have done 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信