|
Exactly so. I was previously setting mine to the lower level and that failed, but by sticking with the defaults that eclipse sets it seems to work. Unfortunately, I am still learning as well so I cannot offer a better suggestion. You may like to look at some of the recent offerings in the Android articles section as there are quite a few targetting beginners, so some of the authors may be able to help.
|
|
|
|
|
R refers to your application Resources. All UI elements are assigned a unique ID which you can then use in your applicaition code to refer to the UI element. All these IDs are part of the Resource class.
|
|
|
|
|
I am working on app in which I am reading data from a specific port of android. Some one send data on port from web back end and i read it on android device.I want to set a receiver for this but i dont know what action is required for this. My code is here.
public class MainActivity extends Activity {
Socket socket;
private ServerSocket serverSocket;
BufferedReader in = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
new Task().execute();
}
private class Task extends AsyncTask
<void, integer,="" void=""> {
@Override
protected Void doInBackground(Void... params) {
try {
serverSocket = new ServerSocket(6066);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
while (true) {
socket = serverSocket.accept();
try {
in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
String msg = null;
try {
StringBuilder total = new StringBuilder();
String line;
while ((line = in.readLine()) != null) {
total.append(line);
}
msg = total.toString();
Log.d("NETWORK-RECEIVE","Message readed!:"+msg);
} catch (IOException e) {
e.printStackTrace();
Log.d("NETWORK-RECEIVE", "Something goes wrong: IOException");
}
} finally {
socket.close();
}
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
finally {
try {
serverSocket.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return null;
}
}
}
can some one help me in this how i can set out a broadcast receiver for this pupose,and what intent action is required for this?
|
|
|
|
|
Hai
I create app in Api 10 (2.3.5) for option menu
I use this code
Xml called MainMenu was created
public bool onCreateOptionsMenu(Menu menu)
{
MenuInflater inflater = getMenuInflater();
inflater.inflate(Resource.Layout.MainMenu, menu);
return true;
}
I get getMenuInflater() not exists in current context
please tell me what is the problem.
thanks
|
|
|
|
|
You are most likely missing a using statement.
|
|
|
|
|
Thanks for reply
I use these namespace
using System;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Android.Graphics;
using Android.App;
please tell me which is missing
|
|
|
|
|
There's no need to use getMenuInflater() . In Xamarin, MenuInflater is already a property of your Activity .
/ravi
|
|
|
|
|
thanks for reply
please can you tell me the syntax to create menu in xamarin
-- modified 20-Aug-14 12:16pm.
|
|
|
|
|
Xamarin is no different from Java (for the most part). It's just that you express your logic in C# vs. Java, like so:
public override bool OnPrepareOptionsMenu
(IMenu menu)
{
this.MenuInflater.Inflate (Resource.Layout.MainMenu, menu);
return base.OnPrepareOptionsMenu (menu);
}
/ravi
|
|
|
|
|
Thank You very much
its working
|
|
|
|
|
/ravi
|
|
|
|
|
hi,
I am a php developer. I was given a task of testing a small size android application developed by an android developer. I have written php web services for it to store data in mysql.
The application is crashing some times and for some inputs.
I don't know, how to test it properly?
What techniques i should use to test an andriod app?
|
|
|
|
|
pandu web dev wrote: The application is crashing some times and for some inputs. Then you need to go back to the Android developer and get him/her to fix the application.
|
|
|
|
|
I'm trying to do a "myfirstapp" example and in just creating the application, without any code from me, I have 7 errors, below are a few examples.
Being used to Visual Studio and Csharp, I'm a little confused as to why it is so difficult just to get a hello world type application going and trying to debug/test it in the virtual environment?
Can someone help me get to a baseline place, so I can start creating applications and learning how to write for the Android OS?
Quote: Description Resource Path Location Type
error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. styles.xml /MyFirstApp/res/values-v14 line 8 Android AAPT Problem
Quote: Description Resource Path Location Type
error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. styles.xml /MyFirstApp/res/values line 7 Android AAPT Problem
Quote: Description Resource Path Location Type
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project MyFirstApp Unknown Java Problem
Quote: Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor.
Quote: org.eclipse.core.runtime.CoreException: Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor.
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:273)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:269)
at org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.java:235)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:319)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPart(CompatibilityPart.java:262)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPart(CompatibilityEditor.java:61)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:299)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:861)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:841)
at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:113)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:321)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:242)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:161)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:141)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:894)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:629)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:731)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:702)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:696)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:681)
at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1115)
at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:98)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:645)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:731)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:702)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:696)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:681)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:59)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:641)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$6.run(PartRenderingEngine.java:520)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:505)
at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(ElementReferenceRenderer.java:74)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:894)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:629)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:731)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:702)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:696)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:681)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:59)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:641)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:731)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:702)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:696)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:681)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:59)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:641)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:731)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:702)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:696)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:681)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:59)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:641)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:731)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:702)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:696)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:681)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:59)
at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveRenderer.processContents(PerspectiveRenderer.java:59)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:641)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:731)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:702)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:696)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:681)
at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.showTab(PerspectiveStackRenderer.java:103)
at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:98)
at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.postProcess(PerspectiveStackRenderer.java:77)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:645)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:731)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:702)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:696)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:681)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:59)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:641)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:731)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:702)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:696)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:681)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:59)
at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.processContents(WBWRenderer.java:644)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:641)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:731)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:702)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:696)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:681)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:987)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle com.android.ide.eclipse.adt (2).
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.core.internal.events.BuildManager.instantiateBuilder(BuildManager.java:894)
at org.eclipse.core.internal.events.BuildManager.initializeBuilder(BuildManager.java:847)
at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:538)
at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:567)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:237)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: org.osgi.framework.BundleException: Exception in com.android.ide.eclipse.adt.AdtPlugin.start() of bundle com.android.ide.eclipse.adt.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
... 28 more
Caused by: java.lang.NullPointerException
at org.eclipse.jface.resource.JFaceResources.getResources(JFaceResources.java:207)
at org.eclipse.jface.resource.ImageRegistry.<init>(ImageRegistry.java:152)
at org.eclipse.jface.resource.ImageRegistry.<init>(ImageRegistry.java:124)
at org.eclipse.ui.internal.WorkbenchImages.initializeImageRegistry(WorkbenchImages.java:641)
at org.eclipse.ui.internal.WorkbenchImages.getDescriptors(WorkbenchImages.java:530)
at org.eclipse.ui.internal.WorkbenchImages.getImageDescriptor(WorkbenchImages.java:566)
at org.eclipse.ui.internal.SharedImages.getImageDescriptor(SharedImages.java:47)
at org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin(AbstractUIPlugin.java:671)
at com.android.ide.eclipse.adt.AdtPlugin.startEditors(AdtPlugin.java:1518)
at com.android.ide.eclipse.adt.AdtPlugin.start(AdtPlugin.java:265)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
... 34 more
|
|
|
|
|
Try Hello Android - The Hello World Application[^]. He usesAndroid Studio rather than eclipse but it's a good start. And if you go to the articles section you will find lots more samples, there is probably one or more that uses eclipse.
|
|
|
|
|
Thank you. I downloaded Android Studio and am trying to follow the OP's instructions, but I don't see the same menu items as he does, as noted in the comments section at the bottom of the article.
|
|
|
|
|
I have looked at those comments and cannot figure out what you are doing. I followed the tutorial and it all worked according to the article.
|
|
|
|
|
I even downloaded his project, opened it and did not touch anything. It does not have the right click options he described and when I click the run button, nothing happens?
I also cannot get to the configuration of the AVD, it is just greyed out?
Can you right click on the helloworld folder and get "new --> class" ?
What happens when you debug/compile his example? To my understanding, I followed his example exactly and also downloaded his example as a known good?
modified 18-Aug-14 13:20pm.
|
|
|
|
|
It all worked when I tried it, but I did have some issues with the installation. It sounds as though you may have some component(s) missing from your setup. I have to admit that setting up both Android Studio and Eclipse are somewhat less than straightforward, and you have to make some guesses along the way. Have you installed all the correct SDK components as listed in the article?
|
|
|
|
|
I believe I have.
This may be asking a lot, but could you list the steps with links that you installed/downloaded/configured, so I have a baseline and do not have any room for error with guesses?
|
|
|
|
|
Sorry, no, I did not make a note of them. All you can do is try re-installing and carefully following the steps in the tutorial. If it helps there are a number of other tutorials in the same section which might help to clarify things.
|
|
|
|
|
Thanks anyway. This is too difficult to do, just to write code (which should be the more difficult part) so I'm not going to waste anymore time on this. I'll stick to Visual Studio and C#, I can't imagine anyone going through this frustration to write Android applications.
|
|
|
|
|
Well you are half right. Yes it is a pain when something goes wrong during installation/setup, but Android is not the only system to have issues like this: have you ever tried to setup SQL server? And, once you have it all set up the actual programming side is not such a struggle, although there is (obviously) a lot to learn.
|
|
|
|
|
**********************************************
I. lucky Cases if theif is innocent & swithed on the mobile & start using.
1.Case when internet is on.
I found mobile theft has become more serious problem now a days.
Tracing the lost/stolen devices with already connected with internet & gmail account is easier now.
2.Case when internet is off
Lucky if installed the mobile tracking apps which can be operated with SMS
**********************************************
II. Un-lucky if theif is smart [using the original IMEI]
He will surely switch off the phone, remove the SIM & google to Hard reset the device which swipe all the gmail accounts, fb accounts ,data etc
means the tracing apps already installed or going to be installed using the synced gmails wont work.
In this case mobile tracking can only done by Cyber Police.
But i found in India like country where police will have no interest in tracing the device.
So what an individual do even his device is so smarter but still a it does't recognise his owner.
[i am one of the suffered with lost]
Suggestion:
in this case google/OS providers should add a feature as described below:
1. A google/ facebook/ Iphone account should be synced with IMEI.
so that even if Hard reset the device,its IMEI will not be lost & his all accounts should not be erased.
2. If really owner intention to sell the device to other person,
then device should ask online OTP password sent to his any of the synced device accounts to erase all of his synced accounts from that device.
3. Every SIM change info should be sent to any synced accounts [no disabled option for this feature].
4. Every SIM change info should be sent to if any alternate phone number.
**********************************************
III. Un-lucky if theif is very/too smart [erasing the original IMEI/Flashing the device which replaces the original IMEI]
1. Erasing the original IMEI:
a. I think in this case IMEI change history should be maintained from the device side.
b. Every change should be reported to synced device accounts/ cell alternate numbers.
2. Flashing the device which replaces the original IMEI
a. for flashing device should ask the password otherwise it should not flash.
b. in case if forgetten & needed the password,then user should switch on the device & ask for flash pin from device to be send to any of the synced device account or SMS to his cell number.
**********************************************
Please please please, please let me know if more good suggesions can be added. & implemented.
I strongly suggest both Google or phone manufacturing company should implement this feature
|
|
|
|
|
raheemsyed wrote: I strongly suggest both Google or phone manufacturing company should implement this feature And why are you posting it here?
|
|
|
|