ADT import of android.media cannot be resolved - android

i try create my first android application for android 2.1 api level 7 in ADT. I wrote the following line to the default view and eclipse says, that android.media cannot be resolved:
import android.media;
how come, that this doesn't work?
thanks a lot

you cannot import android.media; because it is a package, try using:
import android.media.*;
or
import android.media.MediaPlayer; // if you want to import MediaPlayer
import android.media.Ringtone; // if you want to import Ringtone

Related

an equivalent to matheclipse in android studio

I am working with Android Studio and i want to use the library matheclipse.
Please, is there any library in Android Studio equivalent to "matheclipse" ?
import org.matheclipse.core.convert.AST2Expr;
import org.matheclipse.core.interfaces.IExpr;
import org.matheclipse.parser.client.Parser;
import org.matheclipse.parser.client.ast.ASTNode;
import org.matheclipse.parser.client.ast.FloatNode;
import org.matheclipse.parser.client.ast.FractionNode;
import org.matheclipse.parser.client.ast.FunctionNode;
import org.matheclipse.parser.client.ast.IntegerNode;
import org.matheclipse.parser.client.ast.StringNode;

Import android.bluetooth.BluetoothGatt cannot be resolved

I use Eclipse Luna and turns out I have a bunch of import * cannot be resolved errors.
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattDescriptor;
import android.bluetooth.BluetoothGattService;
import android.bluetooth.BluetoothManager;
I cleaned the project, i remove it and import it but i have the same error.
BluetoothGatt and other Bluetooth GATT Profile apis were added only in Api Level 18.
So in Project Properties -> Android - > Project Build target , select Target greater than 18.
or just edit project.properties to something like
target=android-20

the import android.media.image cannot be resolved

i'm getting the error
"import android.media.image cannot be resolved" I searched the web for solution but couldn't find any thing
would you tell me what to do in order to fix this problem
thanks
I think you cannot import android.media; because it is a package, try to add this line
import android.media.*;
or
import android.media.MediaPlayer; // if you want to import MediaPlayer
import android.media.Ringtone;`
Import as
import android.media.*;

Android Wheel Data picker

I want to use android wheel to choose from some items. I just downloaded some library code from google. I am using it in my app, but it is giving some error.
import kankan.wheel.widget.OnWheelChangedListener;
import kankan.wheel.widget.OnWheelScrollListener;
import kankan.wheel.widget.WheelView;
import kankan.wheel.widget.adapters.AbstractWheelTextAdapter;
import kankan.wheel.widget.adapters.ArrayWheelAdapter;
Giving following error:
The import kankan.wheel.widget cannot be resolved
Can anyone tell me why this error is coming.
Thanks.
I have also used that library in my code and it is working fine.
possibility of error
You can't configure lib properly
In build path add lib
Clean eclipse.
Restart eclipse
import kankan.wheel.widget.OnWheelChangedListener;
import kankan.wheel.widget.OnWheelScrollListener;
import kankan.wheel.widget.WheelView;
import kankan.wheel.widget.adapters.NumericWheelAdapter;
WheelView wheel = getWheel(id);

How to import BitmapTextureAtlas in Andengine?

i added this line.but it gives error.how to import it?
import org.andengine.opengl.texture.atlas.TextureAtlas;
TextureAtlas is an abstract class, try importing
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlas;
or
import org.andengine.opengl.texture.atlas.bitmap.BuildableBitmapTextureAtlas;
depending on which one you are using
If you using Eclipse and it is configured properly, you should be able to just delete that line and Eclipse will add the correct import statements - at least it does on my system.

Categories

Resources