[aerogear-dev] Android: Eclipse issue with the "Push"

Matthias Wessendorf matzew at apache.org
Wed Jul 3 01:58:04 EDT 2013


Looks like Tommy and Christos ran into similar issues, when reviewing/doing
the Android tutorial.

See  https://issues.jboss.org/browse/AGPUSH-21  (added the review thread to
the JIRA ticket).

-Matthias



On Sat, Jun 22, 2013 at 5:20 PM, Matthias Wessendorf <matzew at apache.org>wrote:

> App works fine!
> On Jun 21, 2013 5:17 PM, "Matthias Wessendorf" <matzew at apache.org> wrote:
>
>> Thank you! :)
>>
>> that did the trick.
>>
>> I filed two new JIRAs to cover the "issues" in the guide/docs
>>
>>
>> -Matthias
>>
>>
>> On Fri, Jun 21, 2013 at 4:58 PM, Summers Pittman <supittma at redhat.com>wrote:
>>
>>>  On 06/21/2013 10:46 AM, Matthias Wessendorf wrote:
>>>
>>>
>>>
>>>
>>> On Fri, Jun 21, 2013 at 4:35 PM, Summers Pittman <supittma at redhat.com>wrote:
>>>
>>>>  On 06/21/2013 10:31 AM, Matthias Wessendorf wrote:
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, Jun 21, 2013 at 4:16 PM, Summers Pittman <supittma at redhat.com>wrote:
>>>>
>>>>>  Eclipse + Maven + Android is a series of long sighs best avoided.
>>>>> The idea with the Android project is we declared the compile time
>>>>> dependencies for the application and they SHOULD be dropped into your /libs
>>>>> folder after running `mvn dependency:copy`.  After that Eclipse SHOULD pick
>>>>> them up correctly.
>>>>>
>>>>
>>>>  ah... ok. the "mvn dependency:copy" is missing on the README (will
>>>> file a JIRA/PR soon).
>>>>
>>>>    It isn't in the README, it is in the Eclipse doc.
>>>>
>>>>
>>>> https://github.com/aerogear/aerogear.org/blob/master/docs/guides/GetStartedAndroidEclipse.asciidoc#getting-the-source-with-git
>>>>
>>>> I don't want to muddle up the README with the n! ways of getting
>>>> AeroGear running ;).
>>>>
>>>
>>>  ah... OK. I missed that since I had the build already working, and
>>> directly went to the "Importing the project into Eclipse" section :)
>>>
>>>
>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> The second half of this is making sure you download the Android
>>>>> support library.
>>>>>
>>>>
>>>>  Ok, not really sure what you mean here
>>>>
>>>>    It is under the Android Tools submenu of the context menu in
>>>> Eclipse.
>>>>
>>>
>>>
>>>  OK, now this resolves fine for the "support" bits, e.g:
>>>
>>>  import android.support.v4.app.FragmentActivity;   <==== GOOD NOW :)
>>>
>>>
>>>  Let me file a JIRA to include the "Support Lib" on the Eclipse guide.
>>>
>>>  but still, this does not resovle:
>>>
>>>   import android.app.Fragment;
>>>
>>>    Hrm... It needs to be building against 4.0+ to resolve that.  It
>>> doesn't hurt backwards compatibility as long as developers use the right
>>> libraries APIs.
>>>
>>>
>>>
>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> Could you post the content of your libs directory?
>>>>>
>>>>
>>>>
>>>>  pluto:aerogear-android matzew$ ls -la libs/
>>>> total 4104
>>>> drwxr-xr-x   5 matzew  staff      170 Jun 21 16:24 .
>>>> drwxr-xr-x  17 matzew  staff      578 Jun 21 16:24 ..
>>>> -rw-r--r--   1 matzew  staff    13662 Jun 21 16:24 gcm-client-3.jar
>>>> -rw-r--r--   1 matzew  staff   189285 Jun 21 16:24 gson-2.2.2.jar
>>>>  -rw-r--r--   1 matzew  staff  1891110 Jun 21 16:24 guava-13.0.1.jar
>>>>
>>>>
>>>>
>>>>  now.... the google collection dependencies are resolved.
>>>>
>>>>  Only that these are now continuing issues:
>>>>
>>>> import android.app.Fragment;
>>>> import android.support.v4.app.FragmentActivity;
>>>>  as well as the "import com.google.android.gms.gcm.GoogleCloudMessaging;"
>>>> (and some others)
>>>>
>>>>    You need to use the Google API's build target instead of the
>>>> Android 2.3.3 build target.  The docs on aerogear.org (obviously)
>>>> havn't been updated for push yet ;)
>>>>
>>>
>>>
>>>  Hrm "Google APIs [Android 2.3.3]" does not help to resolve "Fragment"
>>> or "GoogleCloudMessaging" .
>>>
>>>
>>>  For fun, I changed to "Google APIs [Android 4.2.2]". That resolved
>>> almost all issues, _except
>>> "import com.google.android.gms.gcm.GoogleCloudMessaging;". That guy is
>>> still a problem   :-)
>>>
>>>    Oh ok then :)
>>>
>>> GoogleCloudMessaging is provided by the Android SDK.  You need to import
>>> the Google Play Services project into Eclipse and reference the library
>>> from the AG project.  The Services project is in
>>> $ANDROID_HOME/extra/google/google-play-services.
>>>
>>>
>>>
>>>
>>>>
>>>>
>>>>
>>>>   -Matthias
>>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 06/21/2013 06:10 AM, Matthias Wessendorf wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>>  I did a download of the latest Android SDK
>>>>> (adt-bundle-mac-x86_64-20130522), and did follow our instructions here:
>>>>> https://github.com/aerogear/aerogear-android/blob/push/README.md
>>>>>
>>>>>  I did the maven-sdk-deployer etc, all good. the branch was compiling
>>>>> with Maven. Great!
>>>>>
>>>>>
>>>>>  Now, with Eclipse, I did follow these instructions:
>>>>>  http://staging.aerogear.org/docs/guides/GetStartedAndroidEclipse/
>>>>>
>>>>>  But once I finished these steps, I am getting compiler errors. For
>>>>> instance on the Pipeline.java, I am getting these issues:
>>>>>
>>>>>  import android.app.Fragment;
>>>>> import android.support.v4.app.FragmentActivity;
>>>>> import com.google.common.collect.HashMultimap;
>>>>> import com.google.common.collect.Multimap;
>>>>>
>>>>>
>>>>>  While I think that the android.** related import issues are most
>>>>> likely related to the fact that this is perhaps now wrong (2.3.3):
>>>>>
>>>>> http://staging.aerogear.org/docs/guides/img/android_eclipse_import_005.png
>>>>>
>>>>>
>>>>>  But the Google Collections are also not resolving.
>>>>>
>>>>>  I guess the "Import" in Eclipse is not really reflecting the
>>>>> description of the guava dependency in the pom.xml file.
>>>>>
>>>>>      Besides the google collections, I also noticed that other
>>>>> classes (like "com.google.android.gms.gcm.GoogleCloudMessaging") are
>>>>> not being resolved.
>>>>>
>>>>>
>>>>>
>>>>>  Is there a way that all these "required" dependencies are picked up
>>>>> automatically, by the Eclipse IDE?   Or do I have to import all
>>>>> dependencies, by hand ?
>>>>>
>>>>>
>>>>>
>>>>>  Thanks!
>>>>> Matthias
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>  --
>>>>> Matthias Wessendorf
>>>>>
>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>> twitter: http://twitter.com/mwessendorf
>>>>>
>>>>>
>>>>>  _______________________________________________
>>>>> aerogear-dev mailing listaerogear-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> aerogear-dev mailing list
>>>>> aerogear-dev at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>
>>>>
>>>>
>>>>
>>>>  --
>>>> Matthias Wessendorf
>>>>
>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>> sessions: http://www.slideshare.net/mwessendorf
>>>> twitter: http://twitter.com/mwessendorf
>>>>
>>>>
>>>> _______________________________________________
>>>> aerogear-dev mailing listaerogear-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> aerogear-dev mailing list
>>>> aerogear-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>
>>>
>>>
>>>
>>>  --
>>> Matthias Wessendorf
>>>
>>> blog: http://matthiaswessendorf.wordpress.com/
>>> sessions: http://www.slideshare.net/mwessendorf
>>> twitter: http://twitter.com/mwessendorf
>>>
>>>
>>> _______________________________________________
>>> aerogear-dev mailing listaerogear-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>
>>>
>>>
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> aerogear-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>


-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20130703/4a42fa6b/attachment-0001.html 


More information about the aerogear-dev mailing list