Spark App Won't run in Eclips natively - 1 error

Okay, I am finally trying to work with Spark Android App. So I downloaded the master branch for Spark API App; created a new workspace for Eclips; and then imported the Spark Android App source without any errors.

I then click “Run” and this is what I get. “You application has errors. Please fix the errors”.

I found 1 error in App
src
io.spark.core.android.app
AppConfig.java
AppConfig
getSparkTokenCreationCredentials()

                public static String getSparkTokenCreationCredentials() {
	        return ctx.getString(R.string.spark_token_creation_credentials);
            }

Error: spark_token_creation_credentials cannot be resolved or is not a field


What is it that needs changed so I can make this run - recompile.

2 things you can try before the code wizard @zachary sees this :stuck_out_tongue:

  1. Clean the project and build again

  2. usually the R.java file causes problem and some files are not correctly called. See main.xml or AndroidManifest.xml and see if there is a link not found in the project file

1 Like

@kennethlimcp,

Thanks for reply and suggestions.

I ran Clean on Spark API App project and now these errors are displayed:

io.spark.core.android.app
SmartConfig.Java
SmartConfigService

package io.spark.core.android.smartconfig;
(ERROR: The import com.integrity_project cannot be resolved)
import com.integrity_project.smartconfiglib.FirstTimeConfig;
import com.integrity_project.smartconfiglib.FirstTimeConfigListener;

–> Multiple markers at this line
- FirstTimeConfigListener cannot be resolved
to a type
- FirstTimeConfig cannot be resolved to a type

–> FirstTimeConfig
ERROR: FirstTimeConfig cannot be resolved to a type

Is this added to the lib?

Required TI SmartConfig Library
You must add smartconfiglib.jar to the SparkCore/libs directory.

To get the SmartConfig library, go to the CC3000 Wi-Fi Downloads page. Search the page for the Android SmartConfig Application. Download and unpack the app, which will require Windows. :-/ You can find smartconfiglib.jar in the libs directory of TI's app.
4 Likes

@kennethlimcp, You fixed the SmartConfig error and based on your filename I did a search for Smartconfig and it came up with the README.MD file which discusses Eclips local building and changes needed. And I did all those.

When I went to Run Applicatione -> Android it said I needed to create A Virtual Device. I remembered from last month about having to import SDK Packages & tools in to Eclips for Android prior to this; so I ran SDK Manager and installed for Android 4 API 14.

Now I have new error in Eclips:

http://spydrop.com/files/android_update_not_working.jpg

http://spydrop.com/files/android_update_not_found.jpg

Do I have to now manually install Ver. 22.6.2 Android Dev Tookit (or above to fix Eclips)

Sorry to be a pain.

Maybe cos you’re trying to emulate it on your machine instead of a physical device?

I guess all you need is to create a virtual android device, select it and run and see hpw it goes!

1 Like

@kennethlimcp,

Thanks for helping me as I appreciate and hope someday I can do the same for you. Tomorrow I will try and compile the application and see if it will install and run Tinker. If it will I will Uninstall Eclips & start over and not upgrade to Android SDK 4.0 API 14.

Will post my success here.

Bobby

2 Likes

Hi Bobby,

I don’t see the reason why it would not run with your SDK version, since it does run here with V 22.3… but I was also able to download V 22.6.2 via Android SDK Manager.
In fact the ASM suggested this update along with some others and I just had to push the “Install x Packets” button and accept the terms and conditions.

1 Like

My SDK manager does not list V 22.6.2 as an option. I guess I need to import it manual; some how ?

When you have SDK Manager open, you should see as the top branch Tools and thereunder the top option is “Android SDK Tools” and in the Rev. column you should have 22.6.2 as current version.
TIck this checkbox and install it. Thereafter you might have to restart Eclipse and you might see the Android SDK dialog with “Check for Updates” again. Check for Updates should then succeed.

No, unfortuantly 22.6 does not appear and when I tried to manually select it and install it this is what happen. (It had 3 different repositories listed as source).

An error occurred while collecting items to be installed
session context was:(profile=profile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,com.android.ide.eclipse.adt,22.6.2.v201403212031-1085508
No repository found containing: osgi.bundle,com.android.ide.eclipse.adt.package,22.6.2.v201403212031-1085508
No repository found containing: osgi.bundle,com.android.ide.eclipse.base,22.6.2.v201403212031-1085508
No repository found containing: osgi.bundle,com.android.ide.eclipse.ddms,22.6.2.v201403212031-1085508
No repository found containing: osgi.bundle,com.android.ide.eclipse.gldebugger,22.6.2.v201403212031-1085508
No repository found containing: osgi.bundle,com.android.ide.eclipse.hierarchyviewer,22.6.2.v201403212031-1085508
No repository found containing: osgi.bundle,com.android.ide.eclipse.ndk,22.6.2.v201403212031-1085508
No repository found containing: osgi.bundle,com.android.ide.eclipse.traceview,22.6.2.v201403212031-1085508
No repository found containing: osgi.bundle,overlay.com.android.ide.eclipse.adt.overlay,22.6.2.v201403212031-1085508
No repository found containing: org.eclipse.update.feature,com.android.ide.eclipse.adt,22.6.2.v201403212031-1085508
No repository found containing: org.eclipse.update.feature,com.android.ide.eclipse.ddms,22.6.2.v201403212031-1085508
No repository found containing: org.eclipse.update.feature,com.android.ide.eclipse.gldebugger,22.6.2.v201403212031-1085508
No repository found containing: org.eclipse.update.feature,com.android.ide.eclipse.hierarchyviewer,22.6.2.v201403212031-1085508
No repository found containing: org.eclipse.update.feature,com.android.ide.eclipse.ndk,22.6.2.v201403212031-1085508
No repository found containing: org.eclipse.update.feature,com.android.ide.eclipse.traceview,22.6.2.v201403212031-1085508

That’s odd.

I suppose you have setup your Eclipse the way like it is outlined by this Android guideline
Then you may be better of with a fresh install of Eclipse using the bundle they offer at the link above.
(Make sure to use the correct version 32bit or 64bit)

Thanks for the link. I will do the fresh install and make sure SDK 22.6x is installed. Then I will make the Eclips setup for Spark API.

(I think my trouble starts with 3 letters. NSA :slight_smile: )

Hello spydrop! I have the same problem as you : I downloaded the Spark API App and when I click “Run”, my application has errors. I downloaded the Android SmartConfig Application. Errors disappeared but others have emerged ! You wrote that changes are needed and you did it. So I am interested in what are these changes and/or where did you find the README.MD file which explains them ?
Thanks