I am trying to learn QC Android Hybrid and I like to replicate what I
have in iOS XCode Hybrid to Android QC Hybrid.
How do you open and run - UsingDB example in MotoDev Studio 3?
It seems that QC Android Hybrid 2.1 is quite different from QC Android
Hybrid 2.0.
I need steps on how do you open this UsingDB to get me started?
I am new to MotoDev as well.
Thanks.
Noli
This is different the video.
###########
Steps to create a QuickConnectFamily Hybrid Android application.
Do the following steps OR copy an existing example project.
1. Use MotoDev or eclipse to create a new Android application using
the Google APIs
2. Add the contents of the libs directory to your application's Build Path
3. Add maps.jar to the build path of your application for the API
level of your application. It can be found at <Android SDK
Installation>/add=ons/addon_google_apis_google_inc_<API level>/libs
4. In the build path editor select the Export tab and select all of
the jar files from the libs directory
5 Copy the contents of the Web Files directory into your
application's assets directory
6. Replace your application's res -> layout -> main.xml file with the
main.xml file in the QC Hybrid XML directory
7. Drag balloon_overlay.xml into your application's res -> layout directory
8. Replace the contents of your application's AndroidManifest.xml
file with the contents of the AndroidManifest.xml file in the XML
Files directory
9. Drag the raw directory into the res directory of your application
10. Drag the drawable directory into your application's res directory
11. Change the Activity of your Application to extends QCAndroid
12. Import the R class in your application's Activity Class.
13. Clean the project
14. Replace splash.png in the drawable directory with a background
image of your choice.
15. Modify the index.html, main.css, and the JavaScript files to
create the logic for your app
I don't know to get the UsingDB going.
Noli
Lee
Sent from my iPad
> --
> You received this message because you are subscribed to the Google Groups "QuickConnect" group.
> To post to this group, send email to quickconn...@googlegroups.com.
> To unsubscribe from this group, send email to quickconnectiPh...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/quickconnectiPhone?hl=en.
>
Now, trying to import.
Motodev / Eclipse
1. File -> Import -> General -> Existing Workspace ->Next
2.a Select root directory --(..Browse) ( selected the root directory - done!)
2.b Select the archival -- (..Browse)
What file should I select here? The selection is archive files (*.jar,
*.zip, etc.).
I could not see any jar files in Hybrid directory -->UsingDB directory.
Are the steps right?
Thanks.
Noli
I finally managed to import the UsingDB example,
1. by copying the folder UsingDB to my workspace and import from there.
2. Added the QCLib (library to the project).
- expand the QCLib
- highlighted the 4 jars -> Add path
3. Run - 4 errors (remove the path to /Users/Lee/Desktops
All most there, I got one error (below) Dalvik.
- Conversion to Dalvik format failed with error 1
Now, how to change from Android 1.6 to other Android SDK in the project?
Noli
Errors logs
[2011-10-03 14:50:30 - UsingDB] Dx
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added:
Lorg/quickconnect/json/JSONInputStream;
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.dx.dex.file.DexFile.add(DexFile.java:143)
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.dx.command.dexer.Main.processClass(Main.java:372)
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.dx.command.dexer.Main.processFileBytes(Main.java:346)
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.dx.command.dexer.Main.access$400(Main.java:59)
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:294)
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.dx.command.dexer.Main.processOne(Main.java:313)
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.dx.command.dexer.Main.processAllFiles(Main.java:233)
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.dx.command.dexer.Main.run(Main.java:185)
[2011-10-03 14:50:30 - UsingDB] Dx at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2011-10-03 14:50:30 - UsingDB] Dx at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[2011-10-03 14:50:30 - UsingDB] Dx at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[2011-10-03 14:50:30 - UsingDB] Dx at
java.lang.reflect.Method.invoke(Method.java:597)
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:179)
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:652)
[2011-10-03 14:50:30 - UsingDB] Dx at
com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:510)
[2011-10-03 14:50:30 - UsingDB] Dx at
org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
[2011-10-03 14:50:30 - UsingDB] Dx at
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
[2011-10-03 14:50:30 - UsingDB] Dx at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
[2011-10-03 14:50:30 - UsingDB] Dx at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
[2011-10-03 14:50:30 - UsingDB] Dx at
org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
[2011-10-03 14:50:30 - UsingDB] Dx at
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
[2011-10-03 14:50:30 - UsingDB] Dx at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
[2011-10-03 14:50:30 - UsingDB] Dx at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
[2011-10-03 14:50:30 - UsingDB] Dx at
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
[2011-10-03 14:50:30 - UsingDB] Dx at
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
[2011-10-03 14:50:30 - UsingDB] Dx at
org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
[2011-10-03 14:50:30 - UsingDB] Dx at
org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
[2011-10-03 14:50:31 - UsingDB] Dx 1 error; aborting
[2011-10-03 14:50:31 - UsingDB] Conversion to Dalvik format failed with error 1
# Project target.
target=Google Inc.:Google APIs:10
Now, I got 2 errors R related.
Errors (2 items)
R cannot be resolved to a variable -------------line 15
The import org.quickconnectfamily.hybrid ----line 6
Here the code in UsingDB.
package org.quickconnectfamily.usingdb;
import org.quickconnect.json.JSONException;
import org.quickconnect.json.JSONUtilities;
import org.quickconnectfamily.hybrid.QCAndroid;
import org.quickconnectfamily.hybrid.R;
import android.os.Bundle;
public class MainActivity extends QCAndroid {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
How do we fix these 2 errors.
What is the right SDK to run this example UsingDB using QCLib 2.1?
Thanks.
Noli
[2011-10-03 16:25:13 - UsingDB] Conversion to Dalvik format failed with error 1
How you solve this error?
Have clean and build in various SDK's did not solve this problem.
Anybody in the list using Android QC aside from Lee?
Very frustrating ... Aptana and now Motodev not working properly in my
side (Mac OS X)?
It seems that you cant import this UsingDB example, it will give you error.
[2011-10-03 16:25:13 - UsingDB] Conversion to Dalvik format failed with error 1
Solution:
Redo the project, create UsingDB and recreate everything to avoid -
Dalvik error (according to some people (i.e searching google for
solution).
One project is adding the maps.jar in the right directory Android.
I did not manage to put it in right directory.
Now, I got this last problem.
2011-10-03 20:07:06 - UsingDB] ------------------------------
[2011-10-03 20:07:06 - UsingDB] Android Launch!
[2011-10-03 20:07:06 - UsingDB] adb is running normally.
[2011-10-03 20:07:06 - UsingDB] Performing
org.quickconnectfamily.hybrid.QCAndroid activity launch
[2011-10-03 20:07:06 - UsingDB] Automatic Target Mode: launching new
emulator with compatible AVD 'my_Android3.1'
[2011-10-03 20:07:06 - UsingDB] Launching a new emulator with Virtual
Device 'my_Android3.1'
[2011-10-03 20:07:07 - Emulator] PANIC: Could not open:
/tmp/.android/avd/my_Android3.1.ini
I don't why this /tmp/ directory.
My installation is in
.android/avd/my_Android3.1.ini
How to do I solve this problem?
Anybody in the list knows how to solve this?
Thanks for replying.
I am trying to import the Using DB example again and following your advice.
Yes, we don't need to add maps.jar. It is added automatically when you
change the SDK (e.g. Android 2.3.3, I got usb.jar as well aside from
the android.jar and maps.jar).
The Dalvik problem still persisted, no matter what I do.
####################
Description Resource Path Location Type
Conversion to Dalvik format failed with error
1 UsingDB Unknown Android Packaging Problem
####################
Some folks (google search about this Dalvik problem) are saying this
common problem when you move from projects from platform to platform
(linux to mac or linux to windows). There must be something corrupted
in the files or whatever is causing it. No matter much - Clean and
Build cycle you do.
[2011-10-04 10:05:04 - UsingDB] Dx 1 error; aborting
[2011-10-04 10:05:04 - UsingDB] Conversion to Dalvik format failed with error 1
I think the only solution is to reconstruct everything by creating
UsingDB and adding the files again.
BTW, I solved my emulator problem. Motodev, Eclipse, Aptana does not
like to run in the root userspace.
I try to run UsingDB example first, then I probably encounter software
keyboard problem later on.
Lee, what might be the problem on this software keyboard not popping up?
Thanks again.
Noli
I have not solved this problem yet in my Mac OS X 10.6.4 Motodev.
To unsubscribe from this group and stop receiving emails from it, send an email to quickconnectiPh...@googlegroups.com.
Visit this group at http://groups.google.com/group/quickconnectiPhone.
For more options, visit https://groups.google.com/d/optout.