Forum » Programiranje » Ne zazna R.class -android
Ne zazna R.class -android
matej94 ::
Mavrik ::
Poglej kaj ti piše za napake v konzoli, to nam ne pove nič. Naredi še preventivno "Clean project".
The truth is rarely pure and never simple.
matej94 ::
Tole:
eclipse.buildId=I20120608-1400
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=sl_SI
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
Error
Thu Aug 30 11:36:09 CEST 2012
An internal error occurred during: "Launching New_configuration".
java.lang.IllegalArgumentException: Path for project must have only one segment.
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
at org.eclipse.core.internal.resources.WorkspaceRoot.getProject(WorkspaceRoot.java:184)
at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.getProject(LaunchConfigDelegate.java:368)
at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:117)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
eclipse.buildId=I20120608-1400
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=sl_SI
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
Error
Thu Aug 30 11:29:43 CEST 2012
Unhandled event loop exception
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(SWT.java:4361)
at org.eclipse.swt.SWT.error(SWT.java:4276)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: java.lang.NullPointerException
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.performSaveAs(AbstractDecoratedTextEditor.java:1580)
at org.eclipse.ui.texteditor.AbstractTextEditor.handleEditorInputChanged(AbstractTextEditor.java:4746)
at org.eclipse.ui.texteditor.StatusTextEditor.handleEditorInputChanged(StatusTextEditor.java:267)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.handleEditorInputChanged(AbstractDecoratedTextEditor.java:1502)
at org.eclipse.ui.texteditor.AbstractTextEditor.sanityCheckState(AbstractTextEditor.java:4905)
at org.eclipse.ui.texteditor.StatusTextEditor.sanityCheckState(StatusTextEditor.java:257)
at org.eclipse.ui.texteditor.AbstractTextEditor.safelySanityCheckState(AbstractTextEditor.java:4883)
at org.eclipse.ui.texteditor.AbstractTextEditor$ActivationListener.handleActivation(AbstractTextEditor.java:984)
at org.eclipse.ui.texteditor.AbstractTextEditor$ActivationListener.access$0(AbstractTextEditor.java:977)
at org.eclipse.ui.texteditor.AbstractTextEditor$10.run(AbstractTextEditor.java:1005)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
... 24 more
eclipse.buildId=I20120608-1400
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=sl_SI
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
Error
Thu Aug 30 11:36:09 CEST 2012
An internal error occurred during: "Launching New_configuration".
java.lang.IllegalArgumentException: Path for project must have only one segment.
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
at org.eclipse.core.internal.resources.WorkspaceRoot.getProject(WorkspaceRoot.java:184)
at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.getProject(LaunchConfigDelegate.java:368)
at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:117)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
eclipse.buildId=I20120608-1400
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=sl_SI
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
Error
Thu Aug 30 11:29:43 CEST 2012
Unhandled event loop exception
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(SWT.java:4361)
at org.eclipse.swt.SWT.error(SWT.java:4276)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: java.lang.NullPointerException
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.performSaveAs(AbstractDecoratedTextEditor.java:1580)
at org.eclipse.ui.texteditor.AbstractTextEditor.handleEditorInputChanged(AbstractTextEditor.java:4746)
at org.eclipse.ui.texteditor.StatusTextEditor.handleEditorInputChanged(StatusTextEditor.java:267)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.handleEditorInputChanged(AbstractDecoratedTextEditor.java:1502)
at org.eclipse.ui.texteditor.AbstractTextEditor.sanityCheckState(AbstractTextEditor.java:4905)
at org.eclipse.ui.texteditor.StatusTextEditor.sanityCheckState(StatusTextEditor.java:257)
at org.eclipse.ui.texteditor.AbstractTextEditor.safelySanityCheckState(AbstractTextEditor.java:4883)
at org.eclipse.ui.texteditor.AbstractTextEditor$ActivationListener.handleActivation(AbstractTextEditor.java:984)
at org.eclipse.ui.texteditor.AbstractTextEditor$ActivationListener.access$0(AbstractTextEditor.java:977)
at org.eclipse.ui.texteditor.AbstractTextEditor$10.run(AbstractTextEditor.java:1005)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
... 24 more
matej94 ::
Alpa še to :
An internal error occurred during: "Launching New_configuration".
Path for project must have only one segment.
An internal error occurred during: "Launching New_configuration".
Path for project must have only one segment.
Zgodovina sprememb…
- spremenilo: matej94 ()
draciel ::
Kar si prilepil tole zadnje ne. Tam ti piše da si vrednosti barv napačno vpisal in tako kot si vpisal, tako se je shranilo v R class. Ti bi moral barve napisati s hexadecimalno kodo npr tako:
#FFFFFFTo je npr bela barva. Generator kod lahko dobiš na tej strani.
Mavrik ::
Gledaš vse napačne stvari. Kot je draciel napisal - v "Problems" oknu imaš kup napak v XMLjih ker narobe pišeš barve ("Color value must start with #"). In ker imaš napake v XML se ti razred R s teh XMLjev sploh ne zgenerira.
The truth is rarely pure and never simple.
matej94 ::
Ne to je 200% vse prov so navedene v 16 kodi barve,..100%
Kaj mislite da bi vso kodo znova napisal, kot pa da se z tole napako srečujem:
Mi pa napiše:
In še hujši problem je da se napake izmenjujejo, enkrat ene drugič druge ;( ..Ko odpravim vse napake v javi se mi pojavi v xml-ju ali obratno..
Popravljam barve kaj pa je potem tukaj:
Kaj mislite da bi vso kodo znova napisal, kot pa da se z tole napako srečujem:
Mi pa napiše:
The import com.pragmatouch.calculator.R cannot be resolved import com.pragmatouch.calculator.R;
r.R cannot be resolved setContentView(R.layout.second);
In še hujši problem je da se napake izmenjujejo, enkrat ene drugič druge ;( ..Ko odpravim vse napake v javi se mi pojavi v xml-ju ali obratno..
Popravljam barve kaj pa je potem tukaj:
Exported activity does not require permission <activity android:name=".graf" android:label="@string/app_name"> <intent-filter> <action android:name="com.pragmatouch.calculator.CLEARSCREEN" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity>
Zgodovina sprememb…
- spremenilo: matej94 ()
draciel ::
a si mogoče kaj R class spreminjal kdaj, oziroma si posegal v njega na kakršenkoli način? Si odpiral kdaj R class datoteko?
matej94 ::
Alpa tole, kar v xml codi mi napko meče..
Ja sem enkrat sem mal ustvarju v njej potem sem pa zapru vse skupi pa je delal...
Včeraj pa r klasa sploh blo ni več ;( Sem vse skopiral v stari projekt pa je še enaka jebada, ...
Zgodovina sprememb…
- spremenilo: matej94 ()
draciel ::
Tisto ni napaka v xml kodi. Tisto te samo opozarja da uporabi raje drug "vir" za shranjevanje teksta, ki se shrani v String datoteko. Imaš jo pod /res/values in nato String. Tam notri shraniš željen tekst.
matej94 ::
Ob zagonu se naredi tole..
Ja pa tut klicaji vse skupaj,..Ampak pred tem je delala zadeva, sedaj pa kr nehala.. Se ti sanja, ti lahko projekt pošlem, koda bi mogla bit vsaj teoretično prava,..
Ja pa tut klicaji vse skupaj,..Ampak pred tem je delala zadeva, sedaj pa kr nehala.. Se ti sanja, ti lahko projekt pošlem, koda bi mogla bit vsaj teoretično prava,..
Zgodovina sprememb…
- spremenilo: matej94 ()
draciel ::
Človek ti imaš cel kup problemov. Nekaj te vprašam, a ti prilepiš drugo napako. Sploh ne vem kako naj ti pomagam.
edit: Kaj pa če bi na primer se lotil projekta na novo / svež projekt? Očitno si moral nekaj zbluzit, tudi takrat ko si R class spreminjal. Ne vem no, moj nasvet.
edit: Kaj pa če bi na primer se lotil projekta na novo / svež projekt? Očitno si moral nekaj zbluzit, tudi takrat ko si R class spreminjal. Ne vem no, moj nasvet.
Zgodovina sprememb…
- spremenil: draciel ()
matej94 ::
Sej sem zgoraj vprašal, pa mi nista odgovrila, se mi zdi bolj pametno da začnem od začetka :p ..
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | Eclipse in windows 8Oddelek: Pomoč in nasveti | 1226 (979) | mihibo5 |
» | [Android]Vprasanje glede GUI ter pripadajoce XML datotekeOddelek: Programiranje | 3484 (3370) | KernelPanic |
» | java datapool - derbyOddelek: Programiranje | 2319 (2168) | jlpktnst |
» | tomcat in datasourceOddelek: Programiranje | 1991 (1748) | infiniteLoop |
» | Java- hibernate.properties not foundOddelek: Programiranje | 1786 (1286) | xsenon |