Tabbed activities not working - android

I have been trying to add three different activities each to a different tab ...
One activity is starting the bluetooth discovery and selection of a bluetooth device for pairing up
and second one will be a bluetooth based mousepad
i was following many online stuff ..basically this one http://www.androidhive.info/2011/08/android-tab-layout-tutorial/
But somehow it's showing this error
11-08 13:41:24.673: D/AndroidRuntime(22886): Shutting down VM
11-08 13:41:24.673: W/dalvikvm(22886): threadid=1: thread exiting with uncaught exception (group=0x40ab6228)
11-08 13:41:24.714: E/AndroidRuntime(22886): FATAL EXCEPTION: main
11-08 13:41:24.714: E/AndroidRuntime(22886): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.kant.BluetoothTest2/com.kant.BluetoothTest2.TabControllerActivity}: java.lang.RuntimeException: Your TabHost must have a FrameLayout whose id attribute is 'android.R.id.tabcontent'
11-08 13:41:24.714: E/AndroidRuntime(22886): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2194)
11-08 13:41:24.714: E/AndroidRuntime(22886): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2229)
11-08 13:41:24.714: E/AndroidRuntime(22886): at android.app.ActivityThread.access$600(ActivityThread.java:139)
11-08 13:41:24.714: E/AndroidRuntime(22886): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
11-08 13:41:24.714: E/AndroidRuntime(22886): at android.os.Handler.dispatchMessage(Handler.java:99)
11-08 13:41:24.714: E/AndroidRuntime(22886): at android.os.Looper.loop(Looper.java:154)
11-08 13:41:24.714: E/AndroidRuntime(22886): at android.app.ActivityThread.main(ActivityThread.java:4945)
11-08 13:41:24.714: E/AndroidRuntime(22886): at java.lang.reflect.Method.invokeNative(Native Method)
11-08 13:41:24.714: E/AndroidRuntime(22886): at java.lang.reflect.Method.invoke(Method.java:511)
11-08 13:41:24.714: E/AndroidRuntime(22886): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
11-08 13:41:24.714: E/AndroidRuntime(22886): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
11-08 13:41:24.714: E/AndroidRuntime(22886): at dalvik.system.NativeStart.main(Native Method)
11-08 13:41:24.714: E/AndroidRuntime(22886): Caused by: java.lang.RuntimeException: Your TabHost must have a FrameLayout whose id attribute is 'android.R.id.tabcontent'
11-08 13:41:24.714: E/AndroidRuntime(22886): at android.widget.TabHost.setup(TabHost.java:163)
11-08 13:41:24.714: E/AndroidRuntime(22886): at android.widget.TabHost.setup(TabHost.java:182)
11-08 13:41:24.714: E/AndroidRuntime(22886): at android.app.TabActivity.onContentChanged(TabActivity.java:135)
11-08 13:41:24.714: E/AndroidRuntime(22886): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:281)
11-08 13:41:24.714: E/AndroidRuntime(22886): at android.app.Activity.setContentView(Activity.java:1885)
11-08 13:41:24.714: E/AndroidRuntime(22886): at com.kant.BluetoothTest2.TabControllerActivity.onCreate(TabControllerActivity.java:16)
11-08 13:41:24.714: E/AndroidRuntime(22886): at android.app.Activity.performCreate(Activity.java:4531)
11-08 13:41:24.714: E/AndroidRuntime(22886): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071)
11-08 13:41:24.714: E/AndroidRuntime(22886): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2150)
11-08 13:41:24.714: E/AndroidRuntime(22886): ... 11 more
a help will be appreciated

As it says here :
11-08 13:41:24.714: E/AndroidRuntime(22886): Caused by: java.lang.RuntimeException: Your TabHost must have a FrameLayout whose id attribute is 'android.R.id.tabcontent'
You are missing the frameLayout with the correct id, So have a look at my code and try to do the same. Hope it helps :)
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/rootview"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TabHost
android:id="#+id/mainTabHost"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TabWidget
android:id="#android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
</TabWidget>
<FrameLayout
android:id="#android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<include layout="#layout/view_offer_tab1" />
<include layout="#layout/view_offer_tab2" />
</FrameLayout>
</LinearLayout>
</TabHost>

Related

Zbar : startPreview failed in galaxy S3

I have used ZBAR library to scan bar code in my Application.
And I got this error log while opening camera on Samsung Galaxy S3 :
java.lang.RuntimeException: startPreview failed
at android.hardware.Camera.startPreview(Native Method)
at com.SGID.MainApp.ScanningFragment.engageCamera(ScanningFragment.java:184)
at com.SGID.MainApp.ScanningFragment.access$10(ScanningFragment.java:154)
at com.SGID.MainApp.ScanningFragment$4.run(ScanningFragment.java:111)
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:4898)
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:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.SGID.MainApp/com.SGID.MainApp.AllTabsActivity}
: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2100)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
at android.app.ActivityThread.access$600(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
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:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.SGID.MainApp.ParametersFragment.onCreateView(ParametersFragment.java:78)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1478)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1086)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1877)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:552)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1167)
at android.app.Activity.performStart(Activity.java:5216)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2073)
... 11 more
EDIT :
Getting error at this line :
CameraPreview mPreview = new CameraPreview(getActivity(), mCamera, previewCb,
autoFocusCB);
Can Anyone help me to resolve this error??
Thanks in advance..

Android Google Maps v2: ClassNotFoundExeption: com.google.android.gms.maps.MapFragment

Fist of all sorry for my bad english.
I have a problem with my sample maps activity. I think I saw thousands of topics about this problem but none of them solve my problem. I tried in all ways I found here and still nothing. Please help!
Here is my xml:
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.MapFragment"/>
My manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.my.package"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<permission
android:name="com.my.package.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.my.package.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.my.package.Main"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Holo.Light" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyA2AofgQEL0kvT9-LL5NufV1sPlGHqKZC8" />
</application>
</manifest>
My Main:
package com.my.package;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
public class Main extends Activity
{
#Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
#Override
public boolean onCreateOptionsMenu(Menu menu)
{
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
My LogCat:
11-08 21:55:45.802: E/AndroidRuntime(8319): FATAL EXCEPTION: main
11-08 21:55:45.802: E/AndroidRuntime(8319): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.my.package/com.my.package.Main}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2070)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2095)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.app.ActivityThread.access$600(ActivityThread.java:135)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.os.Handler.dispatchMessage(Handler.java:99)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.os.Looper.loop(Looper.java:137)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.app.ActivityThread.main(ActivityThread.java:4849)
11-08 21:55:45.802: E/AndroidRuntime(8319): at java.lang.reflect.Method.invokeNative(Native Method)
11-08 21:55:45.802: E/AndroidRuntime(8319): at java.lang.reflect.Method.invoke(Method.java:511)
11-08 21:55:45.802: E/AndroidRuntime(8319): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
11-08 21:55:45.802: E/AndroidRuntime(8319): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
11-08 21:55:45.802: E/AndroidRuntime(8319): at dalvik.system.NativeStart.main(Native Method)
11-08 21:55:45.802: E/AndroidRuntime(8319): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
11-08 21:55:45.802: E/AndroidRuntime(8319): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:411)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.app.Activity.setContentView(Activity.java:2087)
11-08 21:55:45.802: E/AndroidRuntime(8319): at com.my.package.Main.onCreate(Main.java:13)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.app.Activity.performCreate(Activity.java:5236)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1082)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2034)
11-08 21:55:45.802: E/AndroidRuntime(8319): ... 11 more
11-08 21:55:45.802: E/AndroidRuntime(8319): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.google.android.gms.maps.MapFragment: make sure class name exists, is public, and has an empty constructor that is public
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.app.Fragment.instantiate(Fragment.java:584)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.app.Fragment.instantiate(Fragment.java:552)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.app.Activity.onCreateView(Activity.java:4884)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
11-08 21:55:45.802: E/AndroidRuntime(8319): ... 20 more
11-08 21:55:45.802: E/AndroidRuntime(8319): Caused by: java.lang.ClassNotFoundException: com.google.android.gms.maps.MapFragment
11-08 21:55:45.802: E/AndroidRuntime(8319): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
11-08 21:55:45.802: E/AndroidRuntime(8319): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
11-08 21:55:45.802: E/AndroidRuntime(8319): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
11-08 21:55:45.802: E/AndroidRuntime(8319): at android.app.Fragment.instantiate(Fragment.java:574)
11-08 21:55:45.802: E/AndroidRuntime(8319): ... 23 more
you Need to import Google Play Services library as a library project in your app
see this link how to import a library
http://developer.android.com/tools/support-library/setup.html#add-library
Maybe your fragment declaration is incorrect? The example at http://developer.android.com/reference/com/google/android/gms/maps/MapFragment.html uses class="com.google.android.gms.maps.MapFragment" instead of android:name="com.google.android.gms.maps.MapFragment".

android error IllegalArgumentException

I can't find following error in my code. It looks like the problem is in the asynctask onpostexecute.
java.lang.IllegalArgumentException: View not attached to window manager
at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:672)
at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:368)
at android.view.WindowManagerImpl$CompatModeWrapper.removeView(WindowManagerImpl.java:160)
at android.app.Dialog.dismissDialog(Dialog.java:319)
at android.app.Dialog.dismiss(Dialog.java:302)
at www.mobilezar.mn.Advertisements$InitialLoading.onPostExecute(Advertisements.java:216)
at www.mobilezar.mn.Advertisements$InitialLoading.onPostExecute(Advertisements.java:1)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
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:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)

Android application wont run on emulator(p 1000) :(

I am new to android programming, and i wrote an app to add two integers. However, upon execution i recieve an error 'application (com.android.xxxx) has stopped unexpectedly. The log is as posted below. Please help me debug and understand the issue:
11-08 02:02:17.671: E/AndroidRuntime(328): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-08 02:02:17.671: E/AndroidRuntime(328): at dalvik.system.NativeStart.main(Native Method)
11-08 02:02:17.671: E/AndroidRuntime(328): Caused by: java.lang.NullPointerException
11-08 02:02:17.671: E/AndroidRuntime(328): at com.android.add.AdditionActivity.onCreate(AdditionActivity.java:17)
11-08 02:02:17.671: E/AndroidRuntime(328): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
11-08 02:02:17.671: E/AndroidRuntime(328): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
11-08 02:02:17.671: E/AndroidRuntime(328): ... 11 more
11-08 02:35:42.461: D/AndroidRuntime(1153): Shutting down VM
11-08 02:35:42.461: W/dalvikvm(1153): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
11-08 02:35:42.501: E/AndroidRuntime(1153): FATAL EXCEPTION: main
11-08 02:35:42.501: E/AndroidRuntime(1153): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.add/com.android.add.AdditionActivity}: java.lang.NullPointerException
11-08 02:35:42.501: E/AndroidRuntime(1153): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
11-08 02:35:42.501: E/AndroidRuntime(1153): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
11-08 02:35:42.501: E/AndroidRuntime(1153): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
11-08 02:35:42.501: E/AndroidRuntime(1153): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
11-08 02:35:42.501: E/AndroidRuntime(1153): at android.os.Handler.dispatchMessage(Handler.java:99)
11-08 02:35:42.501: E/AndroidRuntime(1153): at android.os.Looper.loop(Looper.java:123)
11-08 02:35:42.501: E/AndroidRuntime(1153): at android.app.ActivityThread.main(ActivityThread.java:4627)
11-08 02:35:42.501: E/AndroidRuntime(1153): at java.lang.reflect.Method.invokeNative(Native Method)
11-08 02:35:42.501: E/AndroidRuntime(1153): at java.lang.reflect.Method.invoke(Method.java:521)
11-08 02:35:42.501: E/AndroidRuntime(1153): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-08 02:35:42.501: E/AndroidRuntime(1153): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-08 02:35:42.501: E/AndroidRuntime(1153): at dalvik.system.NativeStart.main(Native Method)
11-08 02:35:42.501: E/AndroidRuntime(1153): Caused by: java.lang.NullPointerException
11-08 02:35:42.501: E/AndroidRuntime(1153): at com.android.add.AdditionActivity.onCreate(AdditionActivity.java:17)
11-08 02:35:42.501: E/AndroidRuntime(1153): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
11-08 02:35:42.501: E/AndroidRuntime(1153): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
11-08 02:35:42.501: E/AndroidRuntime(1153): ... 11 more
You have a NullPointerException on line 17 of AdditionActivity.java, which prevents your activity from starting up.

Error updating spinner

I have this code on an Activity, I go back and again to this activity and update ArrayList datos.
{ArrayAdapter<String> adaptador =
new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item, datos);
spinnerD = (Spinner)findViewById(R.id.spinner1);
adaptador.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinnerD.setAdapter(adaptador);
when I try to open the spinner after "reopening" the activity I get the following Error:
11-08 04:13:14.313: ERROR/AndroidRuntime(272): FATAL EXCEPTION: main
11-08 04:13:14.313: ERROR/AndroidRuntime(272): java.lang.NullPointerException
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:355)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.ArrayAdapter.getDropDownView(ArrayAdapter.java:376)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.Spinner$DropDownAdapter.getDropDownView(Spinner.java:329)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.Spinner$DropDownAdapter.getView(Spinner.java:325)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.AbsListView.obtainView(AbsListView.java:1294)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.ListView.measureHeightOfChildren(ListView.java:1198)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.ListView.onMeasure(ListView.java:1109)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.view.View.measure(View.java:8171)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.LinearLayout.measureVertical(LinearLayout.java:381)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.view.View.measure(View.java:8171)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.LinearLayout.measureVertical(LinearLayout.java:381)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at com.android.internal.widget.WeightedLinearLayout.onMeasure(WeightedLinearLayout.java:60)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.view.View.measure(View.java:8171)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.view.View.measure(View.java:8171)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.view.View.measure(View.java:8171)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.view.ViewRoot.performTraversals(ViewRoot.java:801)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.os.Handler.dispatchMessage(Handler.java:99)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.os.Looper.loop(Looper.java:123)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at android.app.ActivityThread.main(ActivityThread.java:4627)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at java.lang.reflect.Method.invokeNative(Native Method)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at java.lang.reflect.Method.invoke(Method.java:521)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-08 04:13:14.313: ERROR/AndroidRuntime(272): at dalvik.system.NativeStart.main(Native Method)
11-08 04:13:16.052: ERROR/MetadataRetrieverClient(33): failed to extract an album art
spinnerD.setAdapter(adaptador1);
what is adaptador1, you are creating 'adaptador' and then you are setting adaptador1 to your spinnerD.setAdapter(adaptador1). is this correct ? 'adaptador1' might be null/empty..

Categories

Resources