How implement the mediation ad in android - android

I implement the mediation ad in android but it is not showing i use currently AdMob House Ads and Hunt Mobile Ads in Ad Network Mediation.
i implement both the xml and java coding way but neither work for me.
my xml code
<com.google.ads.AdView
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:id="#+id/ad"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
ads:adSize="SMART_BANNER"
ads:adUnitId="6cd435789dcc43c0"
ads:loadAdOnCreate="true" />
and the log cat error is
01-23 19:13:10.079: E/Ads(1771): Cannot find adapter class 'com.huntmads.admobadaptor.HuntMadsAdapter'. Did you link the ad network's mediation adapter? Skipping ad network.
01-23 19:13:10.079: E/Ads(1771): java.lang.ClassNotFoundException: com.huntmads.admobadaptor.HuntMadsAdapter
01-23 19:13:10.079: E/Ads(1771): at java.lang.Class.classForName(Native Method)
01-23 19:13:10.079: E/Ads(1771): at java.lang.Class.forName(Class.java:217)
01-23 19:13:10.079: E/Ads(1771): at java.lang.Class.forName(Class.java:172)
01-23 19:13:10.079: E/Ads(1771): at com.google.ads.g.a(SourceFile:133)
01-23 19:13:10.079: E/Ads(1771): at com.google.ads.i.run(SourceFile:116)
01-23 19:13:10.079: E/Ads(1771): at android.os.Handler.handleCallback(Handler.java:605)
01-23 19:13:10.079: E/Ads(1771): at android.os.Handler.dispatchMessage(Handler.java:92)
01-23 19:13:10.079: E/Ads(1771): at android.os.Looper.loop(Looper.java:137)
01-23 19:13:10.079: E/Ads(1771): at android.app.ActivityThread.main(ActivityThread.java:4424)
01-23 19:13:10.079: E/Ads(1771): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 19:13:10.079: E/Ads(1771): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 19:13:10.079: E/Ads(1771): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-23 19:13:10.079: E/Ads(1771): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-23 19:13:10.079: E/Ads(1771): at dalvik.system.NativeStart.main(Native Method)
01-23 19:13:10.079: E/Ads(1771): Caused by: java.lang.NoClassDefFoundError: com/huntmads/admobadaptor/HuntMadsAdapter
01-23 19:13:10.079: E/Ads(1771): ... 14 more
01-23 19:13:10.079: E/Ads(1771): Caused by: java.lang.ClassNotFoundException: com.huntmads.admobadaptor.HuntMadsAdapter
01-23 19:13:10.079: E/Ads(1771): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
01-23 19:13:10.079: E/Ads(1771): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
01-23 19:13:10.079: E/Ads(1771): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
01-23 19:13:10.079: E/Ads(1771): ... 14 more

It sounds like you have the Admob package downloaded, but you need to also download the .jar file for the other types of ads. Google provides instructions for all mediated ads, and the specific download link for the Huntmads jar.

Related

Showing fragment inside popup window

I'm working on showing fragment inside popup window. But I'm getting error in showing in that. I googled it for solution. But still not solving this one. Please help me. I'm new to android. My code is
MainActivity.java
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
View popUp = getLayoutInflater().inflate(R.layout.popup_item, null);
window = new PopupWindow(getApplicationContext());
window = new PopupWindow(popUp,LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT,true);
window.setAnimationStyle(android.R.style.Animation_Activity);
window.showAtLocation(popUp, Gravity.BOTTOM, 0, 0);
window.setFocusable(true);
window.setOutsideTouchable(true);
}
popupitem.xml //for showing fragment in MainActivity
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<fragment
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="#+id/popup_fragment"
android:name="com.example.popupemoji.PopupFragment"
android:tag=""/>
</LinearLayout>
I have a class extending Fragment with only two line of code on onCreateView
View view = inflater.inflate(R.layout.popup_item, container);
return view;
Am I wrong anywhere. Logcat error is
01-23 14:25:24.005: E/AndroidRuntime(2868): FATAL EXCEPTION: main
01-23 14:25:24.005: E/AndroidRuntime(2868): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.popupemoji/com.example.popupemoji.MainActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.ActivityThread.access$600(ActivityThread.java:141)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.os.Looper.loop(Looper.java:137)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.ActivityThread.main(ActivityThread.java:5041)
01-23 14:25:24.005: E/AndroidRuntime(2868): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 14:25:24.005: E/AndroidRuntime(2868): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 14:25:24.005: E/AndroidRuntime(2868): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
01-23 14:25:24.005: E/AndroidRuntime(2868): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
01-23 14:25:24.005: E/AndroidRuntime(2868): at dalvik.system.NativeStart.main(Native Method)
01-23 14:25:24.005: E/AndroidRuntime(2868): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-23 14:25:24.005: E/AndroidRuntime(2868): at com.example.popupemoji.PopupFragment.onCreateView(PopupFragment.java:15)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:900)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1082)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1184)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:291)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-23 14:25:24.005: E/AndroidRuntime(2868): at com.example.popupemoji.MainActivity.onCreate(MainActivity.java:18)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.Activity.performCreate(Activity.java:5104)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
01-23 14:25:24.005: E/AndroidRuntime(2868): ... 11 more
01-23 14:25:24.005: E/AndroidRuntime(2868): Caused by: java.lang.IllegalArgumentException: Binary XML file line #6: Duplicate id 0x7f080002, tag , or parent id 0x0 with another fragment for com.example.popupemoji.PopupFragment
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:296)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
If I am reading your code correctly, you are creating a View by inflating your popup_item.xml layout. This layout contains a Fragment, which also inflates the popup_item.xml.
Thus that Fragment will also have another Fragment inside of it with the popup_item.xml layout, and this will keep going on indefinitely.
Your error shows that the application is crashing because of this:
Caused by: java.lang.IllegalArgumentException: Binary XML file line #6:
Duplicate id 0x7f080002, tag , or parent id 0x0 with another fragment
for com.example.popupemoji.PopupFragment
Because of this popup_item.xml nesting, multiple Views have the same ID, which is a problem. Even if multiple Views could have the same ID, you would have an infinitely nesting Fragment, which would also be a problem.

admob -> ad network mediation with adfonic

I am getting error while using adfonic in admob. i am getting following error.
Cannot find adapter class 'com.google.ads.mediation.adfonic.AdfonicAdapter'. Did you link the ad network's mediation adapter? Skipping ad network.
detailed exception is bellow.
Cannot find adapter class 'com.google.ads.mediation.adfonic.AdfonicAdapter'. Did you link the ad network's mediation adapter? Skipping ad network.
The following was caught and handled:
java.lang.ClassNotFoundException: com.google.ads.mediation.adfonic.AdfonicAdapter
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:217)
at java.lang.Class.forName(Class.java:172)
at com.google.ads.g.a(SourceFile:133)
at com.google.ads.i.run(SourceFile:116)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4918)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: com/google/ads/mediation/adfonic/AdfonicAdapter
... 14 more
Caused by: java.lang.ClassNotFoundException: com.google.ads.mediation.adfonic.AdfonicAdapter
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
... 14 more Cannot find adapter class 'com.google.ads.mediation.adfonic.AdfonicAdapter'. Did you link the ad network's mediation adapter? Skipping ad network.
The following was caught and handled:
java.lang.ClassNotFoundException: com.google.ads.mediation.adfonic.AdfonicAdapter
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:217)
at java.lang.Class.forName(Class.java:172)
at com.google.ads.g.a(SourceFile:133)
at com.google.ads.i.run(SourceFile:116)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4918)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: com/google/ads/mediation/adfonic/AdfonicAdapter
... 14 more
Caused by: java.lang.ClassNotFoundException: com.google.ads.mediation.adfonic.AdfonicAdapter
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
... 14 more
You haven't included the Adfonic mediation adapter in your app. Include that and it will work.

Android EditText setText not working [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am trying to setText of edittext using java but it is not working and force closing my application, though i am not sure why
Java Code
EditText UserProfileFirstName;
UserProfileFirstName = (EditText) findViewById(R.id.userFirstName);
UserProfileFirstName.setText("John");
Xml
<EditText
android:id="#+id/userFirstName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:textSize="22sp"
android:layout_marginTop="40dp"
android:layout_marginBottom="15dp"
android:hint="First Name"
android:ems="10"
/>
LogCat Error
01-23 09:32:15.564: E/AndroidRuntime(4101): FATAL EXCEPTION: main
01-23 09:32:15.564: E/AndroidRuntime(4101): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.unext.unextlibrary/com.unext.unextlibrary.ProfileActivity}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.unext.unextlibrary/com.unext.unextlibrary.UserProfile}: java.lang.NullPointerException
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.access$600(ActivityThread.java:141)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.os.Looper.loop(Looper.java:137)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.main(ActivityThread.java:5039)
01-23 09:32:15.564: E/AndroidRuntime(4101): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 09:32:15.564: E/AndroidRuntime(4101): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 09:32:15.564: E/AndroidRuntime(4101): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
01-23 09:32:15.564: E/AndroidRuntime(4101): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
01-23 09:32:15.564: E/AndroidRuntime(4101): at dalvik.system.NativeStart.main(Native Method)
01-23 09:32:15.564: E/AndroidRuntime(4101): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.unext.unextlibrary/com.unext.unextlibrary.UserProfile}: java.lang.NullPointerException
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.startActivityNow(ActivityThread.java:2023)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:749)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.widget.TabHost.setCurrentTab(TabHost.java:413)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.widget.TabHost.addTab(TabHost.java:240)
01-23 09:32:15.564: E/AndroidRuntime(4101): at com.unext.unextlibrary.ProfileActivity.onCreate(ProfileActivity.java:105)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.Activity.performCreate(Activity.java:5104)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
01-23 09:32:15.564: E/AndroidRuntime(4101): ... 11 more
01-23 09:32:15.564: E/AndroidRuntime(4101): Caused by: java.lang.NullPointerException
01-23 09:32:15.564: E/AndroidRuntime(4101): at com.unext.unextlibrary.UserProfile.onCreate(UserProfile.java:57)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.Activity.performCreate(Activity.java:5104)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
01-23 09:32:15.564: E/AndroidRuntime(4101): ... 21 more
I searched on google and also saw SO answers but nothing seems to be working for me
Add
setContentView(R.layout.LAYOUTNAME); in oncreate, before you try to get view by
UserProfileFirstName = (EditText) findViewById(R.id.userFirstName);
// here LAYOUTNAME is your layout's name where you define this edittext

Android java.lang.NumberFormatException: Invalid int: "res/drawable-hdpi/ic_menu_share.png"

We released an App in the market yesterday and i see that it doesn't install on HTC/Sony Ericsson phones. i could finally get my hands on a HTC phone and got the following logcat but am not able to debug and retify the issue
Device Info
build.board: montblanc
build.bootloader: s1
build.brand: SEMC
build.cpu_abi: armeabi-v7a
build.cpu_abi2: armeabi
build.device: LT22i
build.display: 6.1.1.B.1.54
build.fingerprint: SEMC/LT22i_1261-6006/LT22i:4.0.4/6.1.1.B.1.54/ybt3zw:user/release-keys
build.hardware: st-ericsson
build.host: BuildHost
build.id: 6.1.1.B.1.54
build.manufacturer: Sony
build.model: LT22i
build.product: LT22i_1261-6006
build.radio: unknown
build.serial: CB5121XDB7
build.tags: release-keys
build.time: 1350305827000
build.type: user
build.user: BuildUser
version.codename: REL
version.incremental: ybt3zw
version.release: 4.0.4
version.sdk_int: 15
Log Cat
01-23 00:09:35.735 E/AndroidRuntime(29152): FATAL EXCEPTION: main
01-23 00:09:35.735 E/AndroidRuntime(29152): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.m7.nomad/com.m7.nomad.SplashActivity}: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.ActivityThread.access$600(ActivityThread.java:127)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.os.Looper.loop(Looper.java:137)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.ActivityThread.main(ActivityThread.java:4448)
01-23 00:09:35.735 E/AndroidRuntime(29152): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 00:09:35.735 E/AndroidRuntime(29152): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
01-23 00:09:35.735 E/AndroidRuntime(29152): at dalvik.system.NativeStart.main(Native Method)
01-23 00:09:35.735 E/AndroidRuntime(29152): Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.LayoutInflater.createView(LayoutInflater.java:606)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2712)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2772)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.Activity.setContentView(Activity.java:1835)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.m7.nomad.SplashActivity.onCreate(SplashActivity.java:46)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.Activity.performCreate(Activity.java:4465)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
01-23 00:09:35.735 E/AndroidRuntime(29152): ... 11 more
01-23 00:09:35.735 E/AndroidRuntime(29152): Caused by: java.lang.reflect.InvocationTargetException
01-23 00:09:35.735 E/AndroidRuntime(29152): at java.lang.reflect.Constructor.constructNative(Native Method)
01-23 00:09:35.735 E/AndroidRuntime(29152): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.LayoutInflater.createView(LayoutInflater.java:586)
01-23 00:09:35.735 E/AndroidRuntime(29152): ... 25 more
01-23 00:09:35.735 E/AndroidRuntime(29152): Caused by: java.lang.NumberFormatException: Invalid int: "res/drawable-hdpi/ic_menu_share.png"
01-23 00:09:35.735 E/AndroidRuntime(29152): at java.lang.Integer.invalidInt(Integer.java:138)
01-23 00:09:35.735 E/AndroidRuntime(29152): at java.lang.Integer.parse(Integer.java:375)
01-23 00:09:35.735 E/AndroidRuntime(29152): at java.lang.Integer.parseInt(Integer.java:366)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.content.res.TypedArray.getInt(TypedArray.java:254)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.View.<init>(View.java:2969)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.ViewGroup.<init>(ViewGroup.java:418)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.widget.LinearLayout.<init>(LinearLayout.java:178)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.widget.LinearLayout.<init>(LinearLayout.java:174)
01-23 00:09:35.735 E/AndroidRuntime(29152): ... 28 more
01-23 00:09:36.246 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:36.246 E/wpa_supplicant(11724): 53 49 47 4e 41 4c 5f 50 4f 4c 4c SIGNAL_POLL
01-23 00:09:39.239 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:39.239 E/wpa_supplicant(11724): 53 49 47 4e 41 4c 5f 50 4f 4c 4c SIGNAL_POLL
01-23 00:09:41.161 E/AndroidRuntime(29212): FATAL EXCEPTION: main
01-23 00:09:41.161 E/AndroidRuntime(29212): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.m7.nomad/com.m7.nomad.SplashActivity}: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.ActivityThread.access$600(ActivityThread.java:127)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.os.Looper.loop(Looper.java:137)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.ActivityThread.main(ActivityThread.java:4448)
01-23 00:09:41.161 E/AndroidRuntime(29212): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 00:09:41.161 E/AndroidRuntime(29212): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
01-23 00:09:41.161 E/AndroidRuntime(29212): at dalvik.system.NativeStart.main(Native Method)
01-23 00:09:41.161 E/AndroidRuntime(29212): Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.LayoutInflater.createView(LayoutInflater.java:606)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2712)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2772)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.Activity.setContentView(Activity.java:1835)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.m7.nomad.SplashActivity.onCreate(SplashActivity.java:46)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.Activity.performCreate(Activity.java:4465)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
01-23 00:09:41.161 E/AndroidRuntime(29212): ... 11 more
01-23 00:09:41.161 E/AndroidRuntime(29212): Caused by: java.lang.reflect.InvocationTargetException
01-23 00:09:41.161 E/AndroidRuntime(29212): at java.lang.reflect.Constructor.constructNative(Native Method)
01-23 00:09:41.161 E/AndroidRuntime(29212): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.LayoutInflater.createView(LayoutInflater.java:586)
01-23 00:09:41.161 E/AndroidRuntime(29212): ... 25 more
01-23 00:09:41.161 E/AndroidRuntime(29212): Caused by: java.lang.NumberFormatException: Invalid int: "res/drawable-hdpi/ic_menu_share.png"
01-23 00:09:41.161 E/AndroidRuntime(29212): at java.lang.Integer.invalidInt(Integer.java:138)
01-23 00:09:41.161 E/AndroidRuntime(29212): at java.lang.Integer.parse(Integer.java:375)
01-23 00:09:41.161 E/AndroidRuntime(29212): at java.lang.Integer.parseInt(Integer.java:366)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.content.res.TypedArray.getInt(TypedArray.java:254)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.View.<init>(View.java:2969)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.ViewGroup.<init>(ViewGroup.java:418)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.widget.LinearLayout.<init>(LinearLayout.java:178)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.widget.LinearLayout.<init>(LinearLayout.java:174)
01-23 00:09:41.161 E/AndroidRuntime(29212): ... 28 more
01-23 00:09:42.252 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:42.252 E/wpa_supplicant(11724): 53 49 47 4e 41 4c 5f 50 4f 4c 4c SIGNAL_POLL
01-23 00:09:45.255 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:45.255 E/wpa_supplicant(11724): 53 49 47 4e 41 4c 5f 50 4f 4c 4c SIGNAL_POLL
01-23 00:09:48.268 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:48.268 E/wpa_supplicant(11724): 53 49 47 4e 41 4c 5f 50 4f 4c 4c SIGNAL_POLL
01-23 00:09:51.261 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:51.261 E/wpa_supplicant(11724): 53 49 47 4e 41 4c 5f 50 4f 4c 4c SIGNAL_POLL
01-23 00:09:52.061 E/AndroidRuntime(29272): FATAL EXCEPTION: main
01-23 00:09:52.061 E/AndroidRuntime(29272): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.m7.nomad/com.m7.nomad.SplashActivity}: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.ActivityThread.access$600(ActivityThread.java:127)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.os.Looper.loop(Looper.java:137)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.ActivityThread.main(ActivityThread.java:4448)
01-23 00:09:52.061 E/AndroidRuntime(29272): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 00:09:52.061 E/AndroidRuntime(29272): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
01-23 00:09:52.061 E/AndroidRuntime(29272): at dalvik.system.NativeStart.main(Native Method)
01-23 00:09:52.061 E/AndroidRuntime(29272): Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.LayoutInflater.createView(LayoutInflater.java:606)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2712)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2772)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.Activity.setContentView(Activity.java:1835)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.m7.nomad.SplashActivity.onCreate(SplashActivity.java:46)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.Activity.performCreate(Activity.java:4465)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
01-23 00:09:52.061 E/AndroidRuntime(29272): ... 11 more
01-23 00:09:52.061 E/AndroidRuntime(29272): Caused by: java.lang.reflect.InvocationTargetException
01-23 00:09:52.061 E/AndroidRuntime(29272): at java.lang.reflect.Constructor.constructNative(Native Method)
01-23 00:09:52.061 E/AndroidRuntime(29272): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.LayoutInflater.createView(LayoutInflater.java:586)
01-23 00:09:52.061 E/AndroidRuntime(29272): ... 25 more
01-23 00:09:52.061 E/AndroidRuntime(29272): Caused by: java.lang.NumberFormatException: Invalid int: "res/drawable-hdpi/ic_menu_share.png"
01-23 00:09:52.061 E/AndroidRuntime(29272): at java.lang.Integer.invalidInt(Integer.java:138)
01-23 00:09:52.061 E/AndroidRuntime(29272): at java.lang.Integer.parse(Integer.java:375)
01-23 00:09:52.061 E/AndroidRuntime(29272): at java.lang.Integer.parseInt(Integer.java:366)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.content.res.TypedArray.getInt(TypedArray.java:254)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.View.<init>(View.java:2969)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.ViewGroup.<init>(ViewGroup.java:418)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.widget.LinearLayout.<init>(LinearLayout.java:178)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.widget.LinearLayout.<init>(LinearLayout.java:174)
01-23 00:09:52.061 E/AndroidRuntime(29272): ... 28 more
XML File (after making Changes)
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:contentDescription="Splash Screen"
android:gravity="center"
android:src="#drawable/splash_logo" />
XML before making changes
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/primary_color"
android:gravity="center"
android:orientation="vertical"
android:textAlignment="center" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:contentDescription="Splash Screen"
android:gravity="center"
android:src="#drawable/splash_logo" />
</RelativeLayout>
Please post your xml code here.
"Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget. LinearLayout". This line says there is something wrong at line 24.

gralloc_goldfish(634): Emulator without GPU emulation detected

I am using android SDK 4.0.3 and I'm trying to run a simple program in which I'm trying to switch from one page to another page using an Intent (By passing intent object as: Intent intent = new Intent(getApplicationContext(),SecondActivity.class);
startActivity(intent); )
[Also, I have 3GB RAM]
but when I run the program it gives something like this in DDMS:
01-23 01:58:23.892: D/gralloc_goldfish(634): Emulator without GPU emulation detected.
01-23 01:58:45.482: D/AndroidRuntime(634): Shutting down VM
01-23 01:58:45.492: W/dalvikvm(634): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
01-23 01:58:45.532: E/AndroidRuntime(634): FATAL EXCEPTION: main
01-23 01:58:45.532: E/AndroidRuntime(634): android.content.ActivityNotFoundException:
Unable to find explicit activity class {com.example.actionbar_demo/com.example.actionbar_demo.SecondActivity}; have you declared this activity in your AndroidManifest.xml?
01-23 01:58:45.532: E/AndroidRuntime(634): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1508)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.app.Activity.startActivityForResult(Activity.java:3190)
01-23 01:58:45.532: E/AndroidRuntime(634): at com.example.actionbar_demo.Actionbar_demoActivity$1.onClick(Actionbar_demoActivity.java:23)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.view.View.performClick(View.java:3511)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.view.View$PerformClick.run(View.java:14105)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.os.Handler.handleCallback(Handler.java:605)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.os.Handler.dispatchMessage(Handler.java:92)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.os.Looper.loop(Looper.java:137)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.app.ActivityThread.main(ActivityThread.java:4424)
01-23 01:58:45.532: E/AndroidRuntime(634): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 01:58:45.532: E/AndroidRuntime(634): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 01:58:45.532: E/AndroidRuntime(634): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-23 01:58:45.532: E/AndroidRuntime(634): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-23 01:58:45.532: E/AndroidRuntime(634): at dalvik.system.NativeStart.main(Native Method)
01-23 01:58:49.173: I/Process(634): Sending signal. PID: 634 SIG: 9
If you're worried about the:
Emulator without GPU emulation detected.
I wouldn't be. Given that a cursory search of the net turns it up quite a bit, and it's not related to the specific problems being discussed, I'd say it's just an indication that your emulator simply doesn't emulate the GPU. It's unlikely to be a problem.
That's supported by the fact it's a debug message (not even a warning, let alone an error) and also that there's a big 42-second gap between that and your actual problem.
The actual problem seems to be indicated by the line:
01-23 01:58:45.532: E/AndroidRuntime(634):
android.content.ActivityNotFoundException: Unable to find explicit activity
class {com.example.actionbar_demo/com.example.actionbar_demo.SecondActivity};
have you declared this activity in your AndroidManifest.xml?
So I have to ask: have you declared this activity in your AndroidManifest.xml?

Categories

Resources