Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build problem #12

Closed
dalb8 opened this issue Sep 26, 2012 · 24 comments
Closed

Build problem #12

dalb8 opened this issue Sep 26, 2012 · 24 comments

Comments

@dalb8
Copy link

dalb8 commented Sep 26, 2012

Hi, I'm trying to build this for F-droid FOSS repo (which uses ant and platform tools v14). The setup is as follows:

Build Version:2.2.1,42,70d131637,subdir=SickStache,target=android-16,\ update=.;../JakeWharton-ActionBarSherlock-88fc341/library;../ViewPagerIndicator/library;../libSickBeard,\ prebuild=echo "android.library.reference.3=../JakeWharton-ActionBarSherlock-88fc341/library" >> project.properties
javac] Compiling 61 source files to /home/gerry/dalb8s-fdroiddata/build/org.sickstache/SickStache/bin/classes
[javac] /home/gerry/dalb8s-fdroiddata/build/org.sickstache/SickStache/src/org/sickstache/app/ExpandableLoadingListFragment.java:88: cannot find symbol
[javac] symbol : class BaseAdapter
[javac] location: class org.sickstache.app.ExpandableLoadingListFragment<GroupType,ItemType,Params,Progress,Result>
[javac] public class EasyExpandableListAdapter extends BaseAdapter {

@dmstocking
Copy link
Owner

I usually get a weird compile error like that when my java version was set to low. Granted your using Ant, but in Eclipse, it would default to like Java 1.5. It would say it couldn't find a ton of symbols unless I changed it to 1.6. Also, make sure you have the support library.

@dalb8
Copy link
Author

dalb8 commented Sep 26, 2012

java -version says 1.6. i copied to ABS support lib to libs/ but no joy.

@dmstocking
Copy link
Owner

Ok well "BaseAdapter" is a Android function since API level 1. So if I had to pinpoint a problem, I would say your not getting the android framework right? Does ant know where android.jar is?

On a side note, prebuild=echo "android.library.reference.3=../JakeWharton-ActionBarSherlock-88fc341/library" >> project.properties I don't know if you want to do that. Wont that add it to the file every time its ran?

@dalb8
Copy link
Author

dalb8 commented Sep 26, 2012

I hardly know what I'm doing but Ive built 150 apps for f-droid and any failures are I guess down to old repos that were using outdated platform tools. So I can't really add much else I'm afraid.

@dalb8
Copy link
Author

dalb8 commented Sep 26, 2012

Buttink notifications@github.com wrote:
I'm not sure what to do about that. I did check to see if it worked without all the duplicate lines though

On a side note, `prebuild=echo
"android.library.reference.3=../JakeWharton-ActionBarSherlock-88fc341/library"

project.properties` I don't know if you want to do that. Wont that
add it to the file every time its ran?


Reply to this email directly or view it on GitHub:
#12 (comment)

@johnou
Copy link
Collaborator

johnou commented Sep 26, 2012

Try moving the android.widget.BaseAdapter import above org.sickstache.app.ExpandableLoadingListFragment.EasyExpandableListAdapter.Pair in ExpandableLoadingListFragment

@dmstocking
Copy link
Owner

Do you have to have the source for F-Droid? Can you just use the precompiled apks I made?

@dalb8
Copy link
Author

dalb8 commented Sep 26, 2012

Johno Crawford notifications@github.com wrote:

Try moving the android.widget.BaseAdapter import above
org.sickstache.app.ExpandableLoadingListFragment.EasyExpandableListAdapter.Pair
in ExpandableLoadingListFragment


Reply to this email directly or view it on GitHub:
#12 (comment)

That works. And no we dont use prebuilt apks, unless its firefox or vlc

@dalb8
Copy link
Author

dalb8 commented Sep 26, 2012

That works. I take it you'll add that change soon, otherwise I'll have to try my hand at awk it looks like.

We only use binaries for things like firefox and vlc as well as apps that have been in there since day one.

@dmstocking
Copy link
Owner

You can make your own local changes. It wont affect my repository. You have your own repo that you can make changes to, then if you want ask for a pull request so I will merge them.

@dalb8
Copy link
Author

dalb8 commented Sep 27, 2012

I wont make a request, I was able to make the correction using ed

@dmstocking
Copy link
Owner

Did that actually make it compile?

@dalb8
Copy link
Author

dalb8 commented Sep 27, 2012

yep

@dmstocking
Copy link
Owner

Hopefully fix this because of the move to Maven.

@dalb8
Copy link
Author

dalb8 commented Oct 4, 2012

It's my first time trying maven so I could be missing something easy: Setup:

Build Version:2.2.2,43,f0939ad5e5,subdir=app,maven=yes,extlibs=android/android-support-v4.jar,\ init=sed -i '41\,47d' ../pom.xml #the support jar is no longer in $$SDK$$/extras/

ERROR:/home/gerry/dalb8s-fdroiddata/build/org.sickstache/app/src/main/java/org/sickstache/task/NotificationsTask.java:[170,43] cannot find symbol
symbol : class BigTextStyle
location: class android.support.v4.app.NotificationComp

@dmstocking
Copy link
Owner

Make sure your using revision 10 of the android-support-v4.jar. Btw, all you need is ANDROID_HOME environmental variable that points to your android sdk library and then you can change the location in the pom. Then, you can just mvn clean install. My support library was installed to extras. If its not by default anymore, Id like to know where it goes now so I can change it.

@dalb8
Copy link
Author

dalb8 commented Oct 4, 2012

I'm not sure why, but I had to export the variable. We don't normally get the support jar from the sdk directory because it's platform dependent. Anyway f-droid can't find the apk (common with maven) so we can't update it yet.

@dalb8
Copy link
Author

dalb8 commented Oct 4, 2012

Stick with extras/ for now. It used to be in sdk/android-compatiblity

@dmstocking
Copy link
Owner

The other possibility is to use the maven android sdk deployer and just use a normal dependency.

@dalb8
Copy link
Author

dalb8 commented Oct 31, 2012

F-droid.org has been updated now, but I have only just tested it. I crashes on startup :-(

--------- beginning of /dev/log/system
W( 1113) Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40a8cf80 (InputManagerService)
I( 1113) Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/.Launcher } from pid 1113 (ActivityManager)
I( 1113) No longer want android.process.acore (pid 22573): hidden #16 (ActivityManager)
W( 1113) Skipping unknown process pid 23095 (ProcessStats)
W( 1113) Skipping unknown process pid 23096 (ProcessStats)
--------- beginning of /dev/log/main
W( 1113) No keyboard for id 0 (KeyCharacterMap)
W( 1113) Using default keymap: /system/usr/keychars/qwerty.kcm.bin (KeyCharacterMap)
W(27764) Can't open keycharmap file (KeyCharacterMap)
W(27764) Error loading keycharmap file '/system/usr/keychars/nvodm_touch.kcm.bin'. hw.keyboards.65542.devname='nvodm_touch' (KeyCharacterMap)
W(27764) Using default keymap: /system/usr/keychars/qwerty.kcm.bin (KeyCharacterMap)
I( 1113) Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.ligi.fast/.SearchActivity } from pid 27764 (ActivityManager)
W( 1113) Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@4095a6b8 (uid=10030 pid=22873) (InputManagerService)
I(22873) Resume with true (FAST)
D(22873) GC_CONCURRENT freed 512K, 53% free 3350K/7047K, external 307K/794K, paused 2ms+2ms (dalvikvm)
D(23663) mLongPressDelay = 400 (LatinIME)
D(23663) mLongPressDelay = 400 (LatinKeyboardBaseView)
D(23663) mLongPressKeyTimeout = 400 (PointerTracker)
D(23663) mLongPressKeyTimeout = 400 (PointerTracker)
D(22873) GC_CONCURRENT freed 387K, 52% free 3438K/7047K, external 307K/794K, paused 2ms+2ms (dalvikvm)
D(22873) GC_CONCURRENT freed 424K, 52% free 3431K/7047K, external 307K/794K, paused 2ms+2ms (dalvikvm)
I( 1113) Starting: Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=org.sickstache/.HomeActivity } from pid 22873 (ActivityManager)
E( 1113) Style contains key with bad entry: 0x0101039c (ResourceType)
D(22873) couldn't save which view has focus because the focused view android.widget.EditText@405cb3a8 has no id. (PhoneWindow)
I( 1113) Start proc org.sickstache for activity org.sickstache/.HomeActivity: pid=23135 uid=10295 gids={3003, 1015} (ActivityManager)
W(23135) Unable to resolve superclass of Landroid/support/v4/app/_ActionBarSherlockTrojanHorse; (92) (dalvikvm)
W(23135) Link of class 'Landroid/support/v4/app/_ActionBarSherlockTrojanHorse;' failed (dalvikvm)
W(23135) Unable to resolve superclass of Lcom/actionbarsherlock/app/SherlockFragmentActivity; (103) (dalvikvm)
W(23135) Link of class 'Lcom/actionbarsherlock/app/SherlockFragmentActivity;' failed (dalvikvm)
W(23135) Unable to resolve superclass of Lorg/sickstache/HomeActivity; (238) (dalvikvm)
W(23135) Link of class 'Lorg/sickstache/HomeActivity;' failed (dalvikvm)
D(23135) Shutting down VM (AndroidRuntime)
W(23135) threadid=1: thread exiting with uncaught exception (group=0x40015560) (dalvikvm)
E(23135) FATAL EXCEPTION: main (AndroidRuntime)
E(23135) java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.sickstache/org.sickstache.HomeActivity}: java.lang.ClassNotFoundException: org.sickstache.HomeActivity in loader dalvik.system.PathClassLoader/data/app/org.sickstache-1.apk
E(23135) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1680) (AndroidRuntime)
E(23135) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784) (AndroidRuntime)
E(23135) at android.app.ActivityThread.access$1500(ActivityThread.java:123) (AndroidRuntime)
E(23135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939) (AndroidRuntime)
E(23135) at android.os.Handler.dispatchMessage(Handler.java:99) (AndroidRuntime)
E(23135) at android.os.Looper.loop(Looper.java:130) (AndroidRuntime)
E(23135) at android.app.ActivityThread.main(ActivityThread.java:3835) (AndroidRuntime)
E(23135) at java.lang.reflect.Method.invokeNative(Native Method) (AndroidRuntime)
E(23135) at java.lang.reflect.Method.invoke(Method.java:507) (AndroidRuntime)
E(23135) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) (AndroidRuntime)
E(23135) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622) (AndroidRuntime)
E(23135) at dalvik.system.NativeStart.main(Native Method) (AndroidRuntime)
E(23135) Caused by: java.lang.ClassNotFoundException: org.sickstache.HomeActivity in loader dalvik.system.PathClassLoader/data/app/org.sickstache-1.apk
E(23135) at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240) (AndroidRuntime)
E(23135) at java.lang.ClassLoader.loadClass(ClassLoader.java:551) (AndroidRuntime)
E(23135) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) (AndroidRuntime)
E(23135) at android.app.Instrumentation.newActivity(Instrumentation.java:1021) (AndroidRuntime)
E(23135) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1672) (AndroidRuntime)
E(23135) ... 11 more (AndroidRuntime)
W( 1113) Force finishing activity org.sickstache/.HomeActivity (ActivityManager)
W( 1113) Activity pause timeout for HistoryRecord{40add220 org.sickstache/.HomeActivity} (ActivityManager)
W( 1113) Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@4095a6b8 (uid=10030 pid=22873) (InputManagerService)
I(22873) Resume with true (FAST)
I(23135) Sending signal. PID: 23135 SIG: 9 (Process)
W( 1113) Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40534238 (InputManagerService)
I( 1113) Process org.sickstache (pid 23135) has died. (ActivityManager)
W(22873) Can't open keycharmap file (KeyCharacterMap)
W(22873) Error loading keycharmap file '/system/usr/keychars/nvodm_touch.kcm.bin'. hw.keyboards.65542.devname='nvodm_touch' (KeyCharacterMap)
W(22873) Using default keymap: /system/usr/keychars/qwerty.kcm.bin (KeyCharacterMap)
I( 1113) Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.jtb.alogcat/.LogActivity } from pid 22873 (ActivityManager)
D(22873) couldn't save which view has focus because the focused view android.widget.EditText@405cb3a8 has no id. (PhoneWindow)
D(23663) mLongPressDelay = 400 (LatinIME)
D(23663) mLongPressDelay = 400 (LatinKeyboardBaseView)
D(23663) mLongPressKeyTimeout = 400 (PointerTracker)
D(23663) mLongPressKeyTimeout = 400 (PointerTracker)
W( 1113) Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@4095a6b8 (uid=10030 pid=22873) (InputManagerService)

@dalb8
Copy link
Author

dalb8 commented Oct 31, 2012

This is what I used Build Version:2.2.2,43,f0939ad5e5,subdir=app,maven=yes,bindir=app/target,prebuild=\sed -i 's@${ANDROID_HOME}@$$SDK$$@g' ../pom.xml

@dalb8
Copy link
Author

dalb8 commented Oct 31, 2012

I couldn't export ANDROID_HOME for unknown reasons so I had to substitute it in pom.xml

@dmstocking
Copy link
Owner

A class not found exception. I hate these. Have you tried just using maven first, then f-droid? Maybe maven isn't importing the libraries? Even so how come it can't find "HomeActivity." I will think about this some more.

@dalb8
Copy link
Author

dalb8 commented Oct 31, 2012

if I use mvn package without changing anything it crashes too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants