Compile apk from source? - Java for Android App Development

Hi ive searched quite a bit to try to figure this out but i cant find anything.
Im wondering how do you compile an app from github source?
For example how would i compile this apps source. I've already cloned it to my pc (ubuntu), and i just need some guidance on how to compile it.
Thanks

First of all, setup your environment. You will need Eclipse and the Android SDK: http://developer.android.com/sdk/index.html
Then import the project into the workspace as an existing Android project. Run it as an Android application.

nikwen said:
First of all, setup your environment. You will need Eclipse and the Android SDK: http://developer.android.com/sdk/index.html
Then import the project into the workspace as an existing Android project. Run it as an Android application.
Click to expand...
Click to collapse
Thanks. I imported it but there are about 50 errors and therefore i cant run it. Is this normal? Do i have to manually fix each error?

chromium96 said:
Thanks. I imported it but there are about 50 errors and therefore i cant run it. Is this normal? Do i have to manually fix each error?
Click to expand...
Click to collapse
I will have a look at it.
---------- Post added at 09:47 PM ---------- Previous post was at 09:37 PM ----------
Could you please tell me one or more errors?
I have also had errors when I wanted to mod the Clock app of AOKP. The problem is that it has dependencies on the system, that means the framework and probably other system apps. Maybe it is different with this app.

nikwen said:
I will have a look at it.
---------- Post added at 09:47 PM ---------- Previous post was at 09:37 PM ----------
Could you please tell me one or more errors?
I have also had errors when I wanted to mod the Clock app of AOKP. The problem is that it has dependencies on the system, that means the framework and probably other system apps. Maybe it is different with this app.
Click to expand...
Click to collapse
I dont think this app has any system dependencies. Its just a wallpaper app. Heres the errors im getting:
Code:
Description Resource Path Location Type
Fragment cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 146 Java Problem
The method getCount() of type Wallpaper.SectionsPagerAdapter must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 159 Java Problem
The method getPageTitle(int) of type Wallpaper.SectionsPagerAdapter must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 164 Java Problem
Fragment cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 169 Java Problem
FragmentPagerAdapter cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 136 Java Problem
FragmentManager cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 140 Java Problem
Fragment cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 145 Java Problem
The method getItem(int) of type Wallpaper.SectionsPagerAdapter must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 145 Java Problem
SimpleOnPageChangeListener cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 112 Java Problem
The method invalidateOptionsMenu() is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 118 Java Problem
The method getResources() is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 124 Java Problem
The method getPackageName() is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 125 Java Problem
ViewPager cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 110 Java Problem
The method findViewById(int) is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 110 Java Problem
ViewPager cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 111 Java Problem
ViewPager cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 112 Java Problem
The method getSupportFragmentManager() is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 105 Java Problem
The method setContentView(int) is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 102 Java Problem
ViewPager cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 110 Java Problem
Type mismatch: cannot convert from Wallpaper to Context Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 107 Java Problem
ViewPager cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 66 Java Problem
FragmentActivity cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 48 Java Problem
FragmentActivity cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 101 Java Problem
The method onCreate(Bundle) of type Wallpaper must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 100 Java Problem
The import android.support cannot be resolved Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 33 Java Problem
The import android.support cannot be resolved Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 32 Java Problem
The import android.support cannot be resolved Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 35 Java Problem
The import android.support cannot be resolved Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 34 Java Problem
The import android.support cannot be resolved Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 31 Java Problem
The import android.support cannot be resolved Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 30 Java Problem
FragmentActivity cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 323 Java Problem
The method onCreateOptionsMenu(Menu) of type Wallpaper must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 319 Java Problem
FragmentActivity cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 300 Java Problem
The method getResources() is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 293 Java Problem
The method getString(int) is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 262 Java Problem
The method getResources() is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 253 Java Problem
The method onOptionsItemSelected(MenuItem) of type Wallpaper must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 248 Java Problem
FragmentActivity cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 244 Java Problem
The method onPrepareOptionsMenu(Menu) of type Wallpaper must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 243 Java Problem
The method getString(int) is undefined for the type Wallpaper.WallpaperLoader Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 238 Java Problem
The method finish() is undefined for the type Wallpaper.WallpaperLoader Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 233 Java Problem
The method getArguments() is undefined for the type Wallpaper.WallpaperFragment Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 175 Java Problem
The method onCreateView(LayoutInflater, ViewGroup, Bundle) of type Wallpaper.WallpaperFragment must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 173 Java Problem

chromium96 said:
I dont think this app has any system dependencies. Its just a wallpaper app. Heres the errors im getting:
Code:
Description Resource Path Location Type
Fragment cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 146 Java Problem
The method getCount() of type Wallpaper.SectionsPagerAdapter must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 159 Java Problem
The method getPageTitle(int) of type Wallpaper.SectionsPagerAdapter must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 164 Java Problem
Fragment cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 169 Java Problem
FragmentPagerAdapter cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 136 Java Problem
FragmentManager cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 140 Java Problem
Fragment cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 145 Java Problem
The method getItem(int) of type Wallpaper.SectionsPagerAdapter must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 145 Java Problem
SimpleOnPageChangeListener cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 112 Java Problem
The method invalidateOptionsMenu() is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 118 Java Problem
The method getResources() is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 124 Java Problem
The method getPackageName() is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 125 Java Problem
ViewPager cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 110 Java Problem
The method findViewById(int) is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 110 Java Problem
ViewPager cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 111 Java Problem
ViewPager cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 112 Java Problem
The method getSupportFragmentManager() is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 105 Java Problem
The method setContentView(int) is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 102 Java Problem
ViewPager cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 110 Java Problem
Type mismatch: cannot convert from Wallpaper to Context Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 107 Java Problem
ViewPager cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 66 Java Problem
FragmentActivity cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 48 Java Problem
FragmentActivity cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 101 Java Problem
The method onCreate(Bundle) of type Wallpaper must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 100 Java Problem
The import android.support cannot be resolved Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 33 Java Problem
The import android.support cannot be resolved Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 32 Java Problem
The import android.support cannot be resolved Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 35 Java Problem
The import android.support cannot be resolved Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 34 Java Problem
The import android.support cannot be resolved Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 31 Java Problem
The import android.support cannot be resolved Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 30 Java Problem
FragmentActivity cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 323 Java Problem
The method onCreateOptionsMenu(Menu) of type Wallpaper must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 319 Java Problem
FragmentActivity cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 300 Java Problem
The method getResources() is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 293 Java Problem
The method getString(int) is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 262 Java Problem
The method getResources() is undefined for the type Wallpaper Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 253 Java Problem
The method onOptionsItemSelected(MenuItem) of type Wallpaper must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 248 Java Problem
FragmentActivity cannot be resolved to a type Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 244 Java Problem
The method onPrepareOptionsMenu(Menu) of type Wallpaper must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 243 Java Problem
The method getString(int) is undefined for the type Wallpaper.WallpaperLoader Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 238 Java Problem
The method finish() is undefined for the type Wallpaper.WallpaperLoader Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 233 Java Problem
The method getArguments() is undefined for the type Wallpaper.WallpaperFragment Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 175 Java Problem
The method onCreateView(LayoutInflater, ViewGroup, Bundle) of type Wallpaper.WallpaperFragment must override or implement a supertype method Wallpaper.java /Wallpaper/src/com/paranoid/ParanoidWallpapers line 173 Java Problem
Click to expand...
Click to collapse
Thank you. I will try it myself.

Ichigo said:
Some apps use external jars and other tools in their apps, but they are not included in the source. Like, I use Root Tools(Stericson) and UrlImageHelper(Koush) in my app, but those tools are located on my c:/, so if you were to download the source, you'd get errors in the build path.
Click to expand...
Click to collapse
thanks but i dont think this app does that. Or does it? Its just an app that contains some wallpapers.

You will need to add the v4 support library to the build path.
Download it using the SDK Manager. Afterwards it is located there: <sdk>/extras/android/support/v4/android-support-v4.jar
Create a folder libs in the project and copy the library to that location.
Then there will be an error with the WallpaperFragment. Choose "add a Supress Warning to WallpaperFragment".
---------- Post added at 10:07 PM ---------- Previous post was at 09:58 PM ----------
Working for me now.

nikwen said:
You will need to add the v4 support library to the build path.
Download it using the SDK Manager. Afterwards it is located there: <sdk>/extras/android/support/v4/android-support-v4.jar
Create a folder libs in the project and copy the library to that location.
Then there will be an error with the WallpaperFragment. Choose "add a Supress Warning to WallpaperFragment".
---------- Post added at 10:07 PM ---------- Previous post was at 09:58 PM ----------
Working for me now.
Click to expand...
Click to collapse
thanks soo much. All i had to do was add the support library, then add android-support-v4.jar to the build path.
Thanks again

chromium96 said:
thanks soo much. All i had to do was add the support library, then add android-support-v4.jar to the build path.
Thanks again
Click to expand...
Click to collapse
You are welcome.
I am glad that it worked for you.

I have the same problem trying to copile keyguard.apk :/
With eclipse using android sdk, i have 1271 errors :/
someone can help me too please ?

Related

[Q] Changing smali using apktool gives problem with r.Java

I've been stuck for a while now, trying to add some new functionality (day counter) to an existing apk (widget).
What I've done so far:
- unpacked the apk using apktool (using apktool d -d)
- start new project in netbeans with the specific source
- adding the java class to the existing package
The java code introduces some new parameters. I've added the parameters to different xml's. When I try to rebuild I keep getting the message:
cannot find symbol
symbol : variable layout
location: class fr.gdi.android.news.R
remoteViews = new RemoteViews(context.getPackageName(), R.layout.main);
Can anyone give me a hint what to do?
some additional info. This is the class I'm trying to add:
Code:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fr.gdi.android.news;
/**
*
* @author John
*/
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Timer;
import java.util.TimerTask;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.ComponentName;
import android.content.Context;
import android.widget.RemoteViews;
public class CountDays extends AppWidgetProvider {
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
Timer timer = new Timer();
timer.scheduleAtFixedRate(new MyTime(context, appWidgetManager), 1, 60000);
}
private class MyTime extends TimerTask {
RemoteViews remoteViews;
AppWidgetManager appWidgetManager;
ComponentName thisWidget;
public MyTime(Context context, AppWidgetManager appWidgetManager) {
this.appWidgetManager = appWidgetManager;
remoteViews = new RemoteViews(context.getPackageName(), R.layout.main);
thisWidget = new ComponentName(context, CountDays.class);
}
@Override
public void run() {
Date date1 = new Date();
Calendar calendar = new GregorianCalendar(2010, 11,25);
long days = (((calendar.getTimeInMillis()- date1.getTime())/1000))/86400;
remoteViews.setTextViewText(R.id.days,""+ days);
appWidgetManager.updateAppWidget(thisWidget, remoteViews);
}
}
}
1. Apktool does not support writing your code in Java right now. Whole story is here: http://code.google.com/p/android-apktool/issues/detail?id=88 . If you want to use Java, it's possible, but you will have to use a workaround. It's not that hard to implement, but requires you to understand, how Java/javac/bytecode works. Workaround is described in above link, if you don't want to read full story, instructions start at "My script is here".
2. I think (but maybe I'm wrong) that you misunderstand, how R references work. These R.drawables.xxx strings aren't magically converted to resIDs at compile or run time. To use them you have to generate proper R class using SDK. If you use Eclipse or Netbeans, you don't have to do that, cause IDE regenerates R.java file each time you modify something in resources, so you can use R references in your code whenever you want.
In app decoded by apktool you have to manage resIDs manually. It's caused by the fact, that if you want to use some resources in smali, you can't let SDK generate ids for these resources automatically, cause resIDs are stored in smali in numerical form, i.e. "const v0, 0x7f012345", not something like "const v0, R.drawables.xxx". So if you would add e.g. "const v0, 0x7f012345" line to smali and resIDs would be regenerated, your line might reference other resource, that you want.
Of course that's not the case if you want to use resources from Java code, but as I said, this feature isn't fully supported by apktool. Also I think it would be good to add possibility to generate resIDs automatically, even for smali code, cause managing resIDs manually is very inconvenient. But that's future.
For now if you want to add new resource and use it from your Java/smali code, you have to modify public.xml file, add that resource with next free resID and then use that resID from your code.
If you want to know more, you could read this: http://forum.xda-developers.com/showthread.php?p=7380557#post7380557
@Brut.all: Thanks for your extensive answer! I will read the stuff you mention and get back at it.
@Brut.all: I think you're right about me not understanding R.java completely. But what I understand from your story is this. When I want a new resource to use in a new class and to be used in the existing xml, I would have to do the following:
- add a line to the res/values/ids.xml, for example:
Code:
<item type="id" name="main">false</item>
- add a line to the res/values/public.xml, for example:
Code:
<public type="id" name="main" id="0x7f0a0034" />
- add a line to the R$id.java and R$layout.java (don't exactly know which one)
Code:
.field public static final main:I = 0x7f0a0034
first: is this correct? second: How can I refer to the newly added resource in my new class. R.layout.main doesn't work, R$layout.main doesn't work.
Code:
remoteViews = new RemoteViews(context.getPackageName(), R$layout.main);
john37 said:
- add a line to the res/values/ids.xml, for example:
Code:
<item type="id" name="main">false</item>
Click to expand...
Click to collapse
You don't have to do that. If you add new drawable, XML or @+id/something value, then it's ok.
john37 said:
- add a line to the res/values/public.xml, for example:
Code:
<public type="id" name="main" id="0x7f0a0034" />
Click to expand...
Click to collapse
Yes.
john37 said:
- add a line to the R$id.java and R$layout.java (don't exactly know which one)
Code:
.field public static final main:I = 0x7f0a0034
Click to expand...
Click to collapse
No ;-)
If you want to use these resources in smali, then you could use them as is, e.g.: "const v0, 0x7f0a0034".
If you want to use my workaround to work in Java, then you could do the same, as above, e.g.:
Code:
int id = 0x7f0a0034;
or you could do this cleaner and generate R class manually: remove all existing R*.java classes (they aren't used) and create single R.java file:
Code:
public final class R {
public static final class id {
public static final int main = 0x7f0a0034;
}
}
and then you could use it as "R.id.main" in your code.
But first you have to implement workaround to use any Java code.
@Brut.all: thanks again for your reply. I think I didn't understand your previous story fully. I am 'developing' on windows, so your workaround is going to be tricky. Do you know if anyone has ported your script to windows?
Some additional info: I don't want to use a new resource in the existing smali code. What I want is a new resource, say @id/main, to be used in the xml files and in a java class, which describes the method that should be invoked when the widget updates.
What I've done now is that I've made a new R$main class with the resources I want to use. I also made the java class with the method and it refers to the resources mentioned in the R$main class. This way I can build it without problems in Netbeans. But when I want to use apktool, I keep getting the message:
Code:
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" java.lang.NullPointerException
at org.jf.util.PathUtil.getRelativeFile(Unknown Source)
at org.jf.smali.smaliFlexLexer.getSourceName(Unknown Source)
at org.jf.smali.smaliFlexLexer.getErrorHeader(Unknown Source)
at org.jf.smali.smaliFlexLexer.nextToken(Unknown Source)
at org.antlr.runtime.CommonTokenStream.fillBuffer(Unknown Source)
at org.antlr.runtime.CommonTokenStream.LT(Unknown Source)
at org.jf.smali.smaliParser.smali_file(Unknown Source)
at brut.androlib.mod.SmaliMod.assembleSmaliFile(Unknown Source)
at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.buildFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.Androlib.buildSourcesSmali(Unknown Source)
at brut.androlib.Androlib.buildSources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Maybe I'm completely on the wrong track...
Sometimes I get NullPointerException instead of real smali errors, when I'm doing "apktool b". I think it's a bug in the apktool. Try to smali "smali" dir normally, without apktool to see errors.
But I don't really see much sense in adding any Java classes, because they just can't work without additional steps. What my script does, is:
javac all files from brut.iface
javac all files from brut.src against compiled brut.iface
convert compiled brut.src to smali. This is done in two steps:
dx them to classes.dex
baksmali them using baksmali or apktool
Most of commands from my script (javac, dx, apktool/baksmali) should work on a Windows. File operations, i.e. mkdir, rm, cp should be easily portable. I don't know, how to replace "find" command.
You could try to use Cygwin - then you should be able to run my script on a Windows.
To do this properly, I'm installing Linux now, so my next reply could take a while...

[Q] Android RSS FEED Reader issues

I want to developer RSS FEED reader for android. I am following this tutorial : http://www.ibm.com/developerworks/xml/tutorials/x-androidrss/downloads.html
I am not getting any error in the program but not getting desired output
**This is my logcat:**
Code:
07-20 16:12:23.531: ERROR/Zygote(33): setreuid() failed. errno: 2
07-20 16:12:35.101: ERROR/Zygote(33): setreuid() failed. errno: 17
07-20 16:12:37.031: ERROR/BatteryService(59): usbOnlinePath not found
07-20 16:12:37.031: ERROR/BatteryService(59): batteryVoltagePath not found
07-20 16:12:37.031: ERROR/BatteryService(59): batteryTemperaturePath not found
07-20 16:12:37.061: ERROR/SurfaceFlinger(59): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
07-20 16:12:47.381: ERROR/EventHub(59): could not get driver version for /dev/input/mouse0, Not a typewriter
07-20 16:12:47.412: ERROR/EventHub(59): could not get driver version for /dev/input/mice, Not a typewriter
07-20 16:12:47.812: ERROR/System(59): Failure starting core service
07-20 16:12:47.812: ERROR/System(59): java.lang.SecurityException
07-20 16:12:47.812: ERROR/System(59): at android.os.BinderProxy.transact(Native Method)
07-20 16:12:47.812: ERROR/System(59): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
07-20 16:12:47.812: ERROR/System(59): at android.os.ServiceManager.addService(ServiceManager.java:72)
07-20 16:12:47.812: ERROR/System(59): at com.android.server.ServerThread.run(SystemServer.java:184)
07-20 16:12:49.591: ERROR/SoundPool(59): error loading /system/media/audio/ui/Effect_Tick.ogg
07-20 16:12:49.591: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressStandard.ogg
07-20 16:12:49.602: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressSpacebar.ogg
07-20 16:12:49.612: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressDelete.ogg
07-20 16:12:49.622: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressReturn.ogg
07-20 16:12:52.672: ERROR/ThrottleService(59): Could not open GPS configuration file /etc/gps.conf
07-20 16:12:54.551: ERROR/logwrapper(145): executing /system/bin/tc failed: No such file or directory
07-20 16:12:54.691: ERROR/logwrapper(147): executing /system/bin/tc failed: No such file or directory
07-20 16:12:54.781: ERROR/logwrapper(149): executing /system/bin/tc failed: No such file or directory
07-20 16:13:17.789: ERROR/HierarchicalStateMachine(59): TetherMaster - unhandledMessage: msg.what=3
07-20 16:13:38.669: INFO/ActivityManager(59): Start proc com.svox.pico for broadcast com.svox.pico/.VoiceDataInstallerReceiver: pid=268 uid=10028 gids={}
07-20 16:13:38.689: WARN/RecognitionManagerService(59): no available voice recognition services found
07-20 16:13:39.370: DEBUG/dalvikvm(59): GC_EXPLICIT freed 9347 objects / 593752 bytes in 302ms
07-20 16:13:39.590: DEBUG/dalvikvm(165): GC_EXPLICIT freed 2883 objects / 156272 bytes in 1275ms
07-20 16:13:39.659: INFO/installd(35): unlink /data/dalvik-cache/[email protected]@[email protected]
07-20 16:13:39.782: DEBUG/AndroidRuntime(118): Shutting down VM
07-20 16:13:39.789: DEBUG/jdwp(118): adbd disconnected
07-20 16:13:39.809: INFO/AndroidRuntime(118): NOTE: attach of thread 'Binder Thread #3' failed
07-20 16:13:39.879: INFO/ActivityThread(268): Publishing provider com.svox.pico.providers.SettingsProvider: com.svox.pico.providers.SettingsProvider
07-20 16:13:40.131: DEBUG/KeyguardViewMediator(59): pokeWakelock(5000)
07-20 16:13:40.429: DEBUG/KeyguardViewMediator(59): pokeWakelock(5000)
07-20 16:13:40.511: DEBUG/AndroidRuntime(278): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
07-20 16:13:40.511: DEBUG/AndroidRuntime(278): CheckJNI is ON
07-20 16:13:41.740: INFO/ActivityManager(59): Displayed activity com.android.launcher/com.android.launcher2.Launcher: 50234 ms (total 50234 ms)
07-20 16:13:42.340: DEBUG/AndroidRuntime(278): --- registering native functions ---
07-20 16:13:43.790: INFO/ActivityManager(59): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.msi.androidrss/.ShowDescription }
07-20 16:13:43.890: DEBUG/AndroidRuntime(278): Shutting down VM
07-20 16:13:43.910: DEBUG/jdwp(278): adbd disconnected
07-20 16:13:43.960: INFO/AndroidRuntime(278): NOTE: attach of thread 'Binder Thread #3' failed
07-20 16:13:44.099: INFO/ActivityManager(59): Start proc com.msi.androidrss for activity com.msi.androidrss/.ShowDescription: pid=286 uid=10042 gids={1015}
07-20 16:13:45.939: INFO/ARMAssembler(59): generated scanline__00000077:03545404_00000004_00000000 [ 47 ipp] (67 ins) at [0x2ff7e0:0x2ff8ec] in 7962326 ns
07-20 16:13:46.670: INFO/ActivityManager(59): Displayed activity com.msi.androidrss/.ShowDescription: 2691 ms (total 2691 ms)
**This is my manifest.xml**
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.msi.androidrss"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".RSSReader"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
</intent-filter>
</activity>
</application>
</manifest>
**This is one of my .java program "RSSReader.java"**
Code:
package com.msi.androidrss;
import android.app.Activity;
import android.os.Bundle;
import android.view.*;
import android.widget.TextView;
import android.widget.ListView;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.AdapterView.OnItemClickListener;
import android.util.Log;
import java.net.URL;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import android.content.Intent;
import com.msi.androidrss.ShowDescription;
public class RSSReader extends Activity implements OnItemClickListener
{
public final String RSSFEEDOFCHOICE = "http://www.ibm.com/developerworks/views/rss/customrssatom.jsp?zone_by=XML&zone_by=Java&zone_by=Rational&zone_by=Linux&zone_by=Open+source&zone_by=WebSphere&type_by=Tutorials&search_by=&day=1&month=06&year=2007&max_entries=20&feed_by=rss&isGUI=true&Submit.x=48&Submit.y=14";
private static final int SELECT = 0;
private static final int REFRESH = 1;
public final String tag = "RSSReader";
private RSSFeed feed = null;
/** Called when the activity is first created. */
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
// go get our feed!
feed = getFeed(RSSFEEDOFCHOICE);
// display UI
UpdateDisplay();
}
private RSSFeed getFeed(String urlToRssFeed)
{
try
{
// setup the url
URL url = new URL(urlToRssFeed);
// create the factory
SAXParserFactory factory = SAXParserFactory.newInstance();
// create a parser
SAXParser parser = factory.newSAXParser();
// create the reader (scanner)
XMLReader xmlreader = parser.getXMLReader();
// instantiate our handler
RSSHandler theRssHandler = new RSSHandler();
// assign our handler
xmlreader.setContentHandler(theRssHandler);
// get our data via the url class
InputSource is = new InputSource(url.openStream());
// perform the synchronous parse
xmlreader.parse(is);
// get the results - should be a fully populated RSSFeed instance, or null on error
return theRssHandler.getFeed();
}
catch (Exception ee)
{
// if we have a problem, simply return null
return null;
}
}
public boolean onCreateOptionsMenu(Menu menu)
{
super.onCreateOptionsMenu(menu);
menu.add(0, RSSReader.SELECT, 0, "Choose RSS Feed").setIcon(android.R.drawable.ic_menu_mapmode);
//menu.add(0,0,"Choose RSS Feed");
//menu.add(0,1,"Refresh");
menu.add(0, RSSReader.REFRESH, 0, "Refresh").setIcon(android.R.drawable.ic_menu_mapmode);
Log.i(tag,"onCreateOptionsMenu");
return true;
}
@Override
public boolean onMenuItemSelected(final int featureId, final MenuItem item) {
switch (item.getItemId()) {
case RSSReader.SELECT:
Log.i(tag,"Set RSS Feed");
return true;
case RSSReader.REFRESH:
Log.i(tag,"Refreshing RSS Feed");
return true;
}
return false;
}
private void UpdateDisplay()
{
TextView feedtitle = (TextView) findViewById(R.id.feedtitle);
TextView feedpubdate = (TextView) findViewById(R.id.feedpubdate);
ListView itemlist = (ListView) findViewById(R.id.itemlist);
if (feed == null)
{
feedtitle.setText("No RSS Feed Available");
return;
}
feedtitle.setText(feed.getTitle());
feedpubdate.setText(feed.getPubDate());
ArrayAdapter<RSSItem> adapter = new ArrayAdapter<RSSItem>(this,android.R.layout.simple_list_item_1,feed.getAllItems());
itemlist.setAdapter(adapter);
itemlist.setOnItemClickListener(this);
itemlist.setSelection(0);
}
public void onItemClick(AdapterView<?> parent, View v, int position, long id)
{
Log.i(tag,"item clicked! [" + feed.getItem(position).getTitle() + "]");
Intent itemintent = new Intent(this,ShowDescription.class);
Bundle b = new Bundle();
b.putString("title", feed.getItem(position).getTitle());
b.putString("description", feed.getItem(position).getDescription());
b.putString("link", feed.getItem(position).getLink());
b.putString("pubdate", feed.getItem(position).getPubDate());
itemintent.putExtra("android.intent.extra.INTENT", b);
startActivity(itemintent);
}
}
**This is one of my .java program "ShowDescription.java"**
Code:
package com.msi.androidrss;
import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;
import android.content.Intent;
import android.view.*;
public class ShowDescription extends Activity
{
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);
setContentView(R.layout.showdescription);
String theStory = null;
Intent startingIntent = getIntent();
if (startingIntent != null)
{
Bundle b = startingIntent.getBundleExtra("android.intent.extra.INTENT");
if (b == null)
{
theStory = "bad bundle?";
}
else
{
theStory = b.getString("title") + "\n\n" + b.getString("pubdate") + "\n\n" + b.getString("description").replace('\n',' ') + "\n\nMore information:\n" + b.getString("link");
}
}
else
{
theStory = "Information Not Found.";
}
TextView db= (TextView) findViewById(R.id.storybox);
db.setText(theStory);
Button backbutton = (Button) findViewById(R.id.back);
backbutton.setOnClickListener(new Button.OnClickListener()
{
public void onClick(View v)
{
finish();
}
});
}
}
**As an output I am getting "*"NO RSS FEED AVAILABLE"*", why ?**
**HELP!!!**
I found the IBM tutorial very hard to follow, I eventually read RSS through a simpler way. Here is a link to the tutorial I wrote after:
http://droidapp.co.uk/?p=166
eatmold said:
I found the IBM tutorial very hard to follow, I eventually read RSS through a simpler way. Here is a link to the tutorial I wrote after:
http://droidapp.co.uk/?p=166
Click to expand...
Click to collapse
Thanks, could you plz upload the full source code ?
Does it support images and clickable feed so that clicking any feed directs the user to the website ?
I will upload the full source of my app today.
It will read any section of the xml so if there are images you will be able to extract the URL and use it in your app. It does support clickable feed also, just by extracting the post URL again.
The app I made is for an audio podcast.
Here you go... hope it helps
http://dl.dropbox.com/u/6876950/EppyGibbonPodcast.zip
help
hello tony,
first thank you for the source code.
I tried running your source code but I am getting these error messages:
Code:
Description Resource Path Location Type
Project 'EppyGibbonPodcast' is missing required library: 'C:\Users\Tony.DZNT\AndroidDev\android-sdk-windows\extras\android\compatibility\v4\android-support-v4.jar' EppyGibbonPodcast Build path Build Path Problem
The project cannot be built until build path errors are resolved EppyGibbonPodcast Unknown Java Problem
Attribute minSdkVersion (4) is lower than the project target API level (10) AndroidManifest.xml /EppyGibbonPodcast line 1 Android ADT Problem
This is the version of my eclipse:
Code:
Eclipse IDE for Java Developers
Version: Helios Service Release 2
Build id: 20110218-0911
I am using 2.2 but I can see you created this code for 2.3. I do have API installed for 3.0 and 3.1 etc so I should be at-least able to run the program on virtual mobile (on PC thru eclipse) but getting the above error msgs.
Please Help.
I just found the file "android-support-v4.jar" in this location:
D:\Android\AndroidSDK\android-sdk-windows\extras\android\compatibility\v4
now how and where I can link this path ?
eatmold said:
I found the IBM tutorial very hard to follow, I eventually read RSS through a simpler way. Here is a link to the tutorial I wrote after:
http://droidapp.co.uk/?p=166
Click to expand...
Click to collapse
very clean and precise. i really like well compartmentalized code
iamsuper123 said:
I just found the file "android-support-v4.jar" in this location:
D:\Android\AndroidSDK\android-sdk-windows\extras\android\compatibility\v4
now how and where I can link this path ?
Click to expand...
Click to collapse
Sorry, I must have left that in from when I was playing with Fragments, it's not needed. You can remove it from the build path. Right click the project, properties, then find and remove from build path.
Hi tony,
I did try to remove it and now I am getting these errors:
Code:
Description Resource Path Location Type
FragmentActivity cannot be resolved to a type podcast.java /EppyGibbonPodcast/src/com/owentech/eppygibbonpodcast line 14 Java Problem
FragmentActivity cannot be resolved to a type podcast.java /EppyGibbonPodcast/src/com/owentech/eppygibbonpodcast line 19 Java Problem
The import android.support cannot be resolved podcast.java /EppyGibbonPodcast/src/com/owentech/eppygibbonpodcast line 8 Java Problem
The method findViewById(int) is undefined for the type podcast podcast.java /EppyGibbonPodcast/src/com/owentech/eppygibbonpodcast line 24 Java Problem
The method findViewById(int) is undefined for the type podcast podcast.java /EppyGibbonPodcast/src/com/owentech/eppygibbonpodcast line 27 Java Problem
The method findViewById(int) is undefined for the type podcast podcast.java /EppyGibbonPodcast/src/com/owentech/eppygibbonpodcast line 30 Java Problem
The method getIntent() is undefined for the type podcast podcast.java /EppyGibbonPodcast/src/com/owentech/eppygibbonpodcast line 32 Java Problem
The method onCreate(Bundle) of type podcast must override a superclass method podcast.java /EppyGibbonPodcast/src/com/owentech/eppygibbonpodcast line 17 Java Problem
The method setContentView(int) is undefined for the type podcast podcast.java /EppyGibbonPodcast/src/com/owentech/eppygibbonpodcast line 21 Java Problem
The method startActivity(Intent) is undefined for the type new View.OnClickListener(){} podcast.java /EppyGibbonPodcast/src/com/owentech/eppygibbonpodcast line 57 Java Problem
The method startActivity(Intent) is undefined for the type new View.OnClickListener(){} podcast.java /EppyGibbonPodcast/src/com/owentech/eppygibbonpodcast line 67 Java Problem
AdapterView is a raw type. References to generic type AdapterView<T> should be parameterized main.java /EppyGibbonPodcast/src/com/owentech/eppygibbonpodcast line 50 Java Problem
Attribute minSdkVersion (4) is lower than the project target API level (10) AndroidManifest.xml /EppyGibbonPodcast line 1 Android ADT Problem
The import com.owentech.eppygibbonpodcast.R is never used arrays.java /EppyGibbonPodcast/src/com/owentech/eppygibbonpodcast line 3 Java Problem
I would deeply appreciate if you could upload a fresh copy of source code without this fragment file / issue.
thank you
OK. I'll upload again tomorrow.
thanks i will keep an eye on your site and here
I have re-uploaded the source, now without the Fragment compatability.
http://dl.dropbox.com/u/6876950/EppyGibbonPodcast.zip
Let me know if you have any problems, but this should run fine now.
Tony
thank you very much tony
it does work now.
I just get these warnings:
Code:
Description Resource Path Location Type
AdapterView is a raw type. References to generic type AdapterView<T> should be parameterized main.java /EppyGibbonPodcast/src/com/owentech/eppygibbonpodcast line 50 Java Problem
AdapterView is a raw type. References to generic type AdapterView<T> should be parameterized rsstest.java /rsstest/src/com/owentech/eppygibbonpodcast line 50 Java Problem
Attribute minSdkVersion (4) is lower than the project target API level (10) AndroidManifest.xml /EppyGibbonPodcast line 1 Android ADT Problem
I tested the code and I think it only works for the RSS FEED that you added in the code.
I tried other rss feed like "http://rss.news.yahoo.com/rss/mostviewed" mentioned on your website (in comments) and few other rss feeds but nothing seems to be working.
(thanks once for all the help)
I wouldn't worry about those warnings.
The app I have uploaded is specifically for the Epileptic Gibbon Podcast, which is a wordpress site.
The code should just need slight changes to match the rss feed you want to use. I suggest you download the rss xml for Epileptic Gibbon and the rss xml for Yahoo and compare the differences.
really great code.
Thanks.
I could really use some help.
I would like to use this app to pull feeds for this site.
http://las-vegas-drunk-driving-attorney.com/
But have no idea how to add this to eclipse and then turn it in to an app.
Could someone help out with the steps to take?
Thank.

[Q] Write to file (not sdcard)

How can you write to a file that is not in the sdcard, it's a highscore text file that I just want my int "clicked" to go in there.
(Lol yeah.)
I doubt you can write text into a file that is NOT in the sdcard, unless you have root permission. However, you can store those highscores etc in a SQLite Database or SharedPreferences.
frenzyboi said:
I doubt you can write text into a file that is NOT in the sdcard, unless you have root permission. However, you can store those highscores etc in a SQLite Database or SharedPreferences.
Click to expand...
Click to collapse
Okey, thanks! Then how would I be able to write to SharedPreferences (as it seems it is much easier than SQLiteDatabase?)
I read the site but couldn't manage it.
Create a SharedPreferences.Editor object and use its put... methods with a tag for your int. Then call apply() or commit() and retrieve the value later with a PreferenceManager (setDefaultValues(this, R.xml.whatever, false) and getDefaultSharedPreferences (this) ... ). It's the usual way to get preferences, same as if you saved them in a PreferenceActivity.
You CAN create a text file on the /data directory without root permissions!
However, this can be done just in the directory of your app. Check this tutorial: http://developer.android.com/training/basics/data-storage/files.html#WriteInternalStorage
It IS possible!
For SharedPreferences:
Instantiate a new SharedPreferences:
Code:
SharedPreferences prefs = this.getSharedPreferences("com.example.app", Context.MODE_PRIVATE);
To edit a value:
Code:
prefs.edit().putString("highscore", "12345").commit();
where "putString" can be "putInt", "putLong" and "highscore" can be any words you want.
To read the value:
Code:
String highscore = prefs.getString("highscore, "0");
where "highscore" must be the same value a the one when you're editing, and 0 is the default value if there is no value stored previously.
To save a file like what Nikwen said:
http://stackoverflow.com/questions/13161470/saving-file-in-internal-storage-android
----------------
However in my opinion, I think SharedPreference is easier as everything is handled by the OS itself, without you needing to read the file line by line, parse the data and get what you need.
frenzyboi said:
For SharedPreferences:
Instantiate a new SharedPreferences:
Code:
SharedPreferences prefs = this.getSharedPreferences("com.example.app", Context.MODE_PRIVATE);
To edit a value:
Code:
prefs.edit().putString("highscore", "12345").commit();
where "putString" can be "putInt", "putLong" and "highscore" can be any words you want.
To read the value:
Code:
String highscore = prefs.getString("highscore, "0");
where "highscore" must be the same value a the one when you're editing, and 0 is the default value if there is no value stored previously.
To save a file like what Nikwen said:
http://stackoverflow.com/questions/13161470/saving-file-in-internal-storage-android
----------------
However in my opinion, I think SharedPreference is easier as everything is handled by the OS itself, without you needing to read the file line by line, parse the data and get what you need.
Click to expand...
Click to collapse
how can we access the committed data from another class?
You can only get access to the SharedPreferences from an activity or a class with an activity context like a dialog with getActivity(). Then use the SharedPreferences prefs = this.getSharedPreferences("com.whatever",...)
frenzyboi said:
For SharedPreferences:
Instantiate a new SharedPreferences:
Code:
SharedPreferences prefs = this.getSharedPreferences("com.example.app", Context.MODE_PRIVATE);
To edit a value:
Code:
prefs.edit().putString("highscore", "12345").commit();
where "putString" can be "putInt", "putLong" and "highscore" can be any words you want.
To read the value:
Code:
String highscore = prefs.getString("highscore, "0");
where "highscore" must be the same value a the one when you're editing, and 0 is the default value if there is no value stored previously.
To save a file like what Nikwen said:
http://stackoverflow.com/questions/13161470/saving-file-in-internal-storage-android
----------------
However in my opinion, I think SharedPreference is easier as everything is handled by the OS itself, without you needing to read the file line by line, parse the data and get what you need.
Click to expand...
Click to collapse
What means with "com.example.app"? Is that just my package? And where should the file be placed in eclipse before running?
If I got like a number that is changing each time I click a button, and then I timer that counts from 60 down to 0, when it's on 0 I have onFinish method, what should I put there to make the text inside highscore.txt file to edit to what my int is (clicked)?
It's hard to explain.. :/
Edit:
I have this code:
Code:
SharedPreferences prefs = getSharedPreferences("com.SAH.clickr", Context.MODE_PRIVATE);
String highscore = prefs.getString("highscore", "0");
final TextView text2 = (TextView) findViewById(R.id.highscore);
text2.setText("Highscore: " + highscore);
When running it has to force close upon start (this code is in the onCreate method).
I get this error in the logcat:
Code:
06-24 14:03:58.187: I/Process(275): Sending signal. PID: 275 SIG: 9
06-24 14:04:05.886: W/ActivityThread(290): Application com.SAH.clickr can be debugged on port 8100...
06-24 14:04:06.226: D/AndroidRuntime(290): Shutting down VM
06-24 14:04:06.226: W/dalvikvm(290): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
06-24 14:04:06.236: E/AndroidRuntime(290): FATAL EXCEPTION: main
06-24 14:04:06.236: E/AndroidRuntime(290): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.SAH.clickr/com.SAH.clickr.MainActivity}: java.lang.NullPointerException
06-24 14:04:06.236: E/AndroidRuntime(290): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
06-24 14:04:06.236: E/AndroidRuntime(290): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-24 14:04:06.236: E/AndroidRuntime(290): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-24 14:04:06.236: E/AndroidRuntime(290): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-24 14:04:06.236: E/AndroidRuntime(290): at android.os.Handler.dispatchMessage(Handler.java:99)
06-24 14:04:06.236: E/AndroidRuntime(290): at android.os.Looper.loop(Looper.java:123)
06-24 14:04:06.236: E/AndroidRuntime(290): at android.app.ActivityThread.main(ActivityThread.java:4627)
06-24 14:04:06.236: E/AndroidRuntime(290): at java.lang.reflect.Method.invokeNative(Native Method)
06-24 14:04:06.236: E/AndroidRuntime(290): at java.lang.reflect.Method.invoke(Method.java:521)
06-24 14:04:06.236: E/AndroidRuntime(290): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-24 14:04:06.236: E/AndroidRuntime(290): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-24 14:04:06.236: E/AndroidRuntime(290): at dalvik.system.NativeStart.main(Native Method)
06-24 14:04:06.236: E/AndroidRuntime(290): Caused by: java.lang.NullPointerException
06-24 14:04:06.236: E/AndroidRuntime(290): at com.SAH.clickr.MainActivity.onCreate(MainActivity.java:72)
06-24 14:04:06.236: E/AndroidRuntime(290): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-24 14:04:06.236: E/AndroidRuntime(290): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
06-24 14:04:06.236: E/AndroidRuntime(290): ... 11 more
NullPointer, where is that?
addemod said:
What means with "com.example.app"? Is that just my package? And where should the file be placed in eclipse before running?
If I got like a number that is changing each time I click a button, and then I timer that counts from 60 down to 0, when it's on 0 I have onFinish method, what should I put there to make the text inside highscore.txt file to edit to what my int is (clicked)?
It's hard to explain.. :/
Edit:
I have this code:
Code:
SharedPreferences prefs = getSharedPreferences("com.SAH.clickr", Context.MODE_PRIVATE);
String highscore = prefs.getString("highscore", "0");
[/CODE ]
[/QUOTE]
Your shared preferences object is null I guess try SharedPreferences prefs = PreferenceManager.getDefaultSharedPreference(this) ;
I suggest use a sqlite database for highscore shared preferences can easily be tampred
Sent from my GT-S5302 using Tapatalk 2
Click to expand...
Click to collapse
sak-venom1997 said:
Your shared preferences object is null I guess try SharedPreferences prefs = PreferenceManager.getDefaultSharedPreference(this) ;
I suggest use a sqlite database for highscore shared preferences can easily be tampred
Sent from my GT-S5302 using Tapatalk 2
Click to expand...
Click to collapse
I was about to try SQLite Db but I guess it's too hard for a beginner like me, if you can't explain a little bit how to do it?
addemod said:
I were about to try SQLite Db but I guess it's too hard for a beginner like me, if you can't explain a little bit how to do it?
Click to expand...
Click to collapse
It requires understanding of SQL databases read about it Implementation of it in android is easy but meanwhile try the SharedPreference
Sent from my GT-S5302 using Tapatalk 2
sak-venom1997 said:
It requires understanding of SQL databases read about it Implementation of it in android is easy but meanwhile try the SharedPreference
Sent from my GT-S5302 using Tapatalk 2
Click to expand...
Click to collapse
I can understand sql / mysql with tables and such. I understand it when I read it but I can never write it out of my mind.
addemod said:
I can understand sql / mysql with tables and such. I understand it when I read it but I can never write it out of my mind.
Click to expand...
Click to collapse
To avoid Sql and
To prevent tampering of highscore data try simple encoding like representing 1 by 'a' in the shared preference value or something else of that kind
Sent from my GT-S5302 using Tapatalk 2
nikwen said:
You CAN create a text file on the /data directory without root permissions!
However, this can be done just in the directory of your app. Check this tutorial: http://developer.android.com/training/basics/data-storage/files.html#WriteInternalStorage
It IS possible!
Click to expand...
Click to collapse
Did you see this?
In my opinion it is the easiest method.
nikwen said:
Did you see this?
In my opinion it is the easiest method.
Click to expand...
Click to collapse
Yeah I tried but it didn't really work out that well :/
As said, I am very beginner to Android Development
addemod said:
Yeah I tried but it didn't really work out that well :/
As said, I am very beginner to Android Development
Click to expand...
Click to collapse
Do you still have your code. Post it and I will look at it.
nikwen said:
Do you still have your code. Post it and I will look at it.
Click to expand...
Click to collapse
Nah, I removed the code but I can try again and see if I can get it to work or not
nikwen said:
Do you still have your code. Post it and I will look at it.
Click to expand...
Click to collapse
Forget everything below, I fixed it, I just put "inputStream.read()" instead of inputStream in "if(inputStream > clicked)"
Thx everyone.
Now, it just says that I didn't beat my highscore even if it is a 0 inside the text file.. :/
!!OLD BELOW!!
Okey so here's the code that should work, the only thing that is not working is that I want it to write to the file ONLY if the int "clicked" value is higher than the value inside the file.
Code:
Code:
String filename = "highscore.txt";
FileOutputStream outputStream;
FileInputStream inputStream;
try {
outputStream = openFileOutput(filename, Context.MODE_PRIVATE);
inputStream = openFileInput(filename);
if(inputStream > clicked){
outputStream.write(clicked);
outputStream.close();
}
}catch (Exception e) {
e.printStackTrace();
}
addemod said:
Forget everything below, I fixed it, I just put "inputStream.read()" instead of inputStream in "if(inputStream > clicked)"
Thx everyone.
Now, it just says that I didn't beat my highscore even if it is a 0 inside the text file.. :/
!!OLD BELOW!!
Okey so here's the code that should work, the only thing that is not working is that I want it to write to the file ONLY if the int "clicked" value is higher than the value inside the file.
Code:
Code:
String filename = "highscore.txt";
FileOutputStream outputStream;
FileInputStream inputStream;
try {
outputStream = openFileOutput(filename, Context.MODE_PRIVATE);
inputStream = openFileInput(filename);
if(inputStream > clicked){
outputStream.write(clicked);
outputStream.close();
}
}catch (Exception e) {
e.printStackTrace();
}
Click to expand...
Click to collapse
You cannot compare ints and InputStreams.
You need to read the value from the file as a String using a BufferedReader and then get it as an int using Integer.parseInt().
Then you can compare the values.

[REQ] Firefox OS on Xperia U

Hello guys
Can anyone help this devoloper for Firefox OS on Xperia U ? http://forum.xda-developers.com/showthread.php?t=2296751
Thanks
feherneoh said:
Please anyone who see this post and want to help in development or just want to get FirefoxOS running on STE devices (Xperia P, U, Sola, Go), join us in the thread linked by @gigitux
Click to expand...
Click to collapse
What is your problem for Xperia U ?
feherneoh said:
1: I don't have U
2: my PC is way too weak
3: I'm not an experienced dev
Last problem I can remember was a build error in libpng
Error was zlib related
Click to expand...
Click to collapse
Is there possibility that i compile Firefox OS, it's work ?
feherneoh said:
you can help if you have a strong PC
You will need Ubuntu running on it
Please head over to ROM thread
Click to expand...
Click to collapse
Yeah... i try with BBQLinux http://www.bbqlinux.org/
feherneoh said:
seems to be okay
Click to expand...
Click to collapse
I will compile firefox OS today. Just ends, i will try it and i will update this thread
UPDATE: I download source, but at repo sync i have this error:
Code:
fatal: unable to write new index file
Traceback (most recent call last):
File "/home/gigitux/B2G/.repo/repo/main.py", line 414, in <module>
_Main(sys.argv[1:])
File "/home/gigitux/B2G/.repo/repo/main.py", line 390, in _Main
result = repo._Run(argv) or 0
File "/home/gigitux/B2G/.repo/repo/main.py", line 138, in _Run
result = cmd.Execute(copts, cargs)
File "/home/gigitux/B2G/.repo/repo/subcmds/sync.py", line 630, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/gigitux/B2G/.repo/repo/project.py", line 1060, in Sync_LocalHalf
self._InitWorkTree()
File "/home/gigitux/B2G/.repo/repo/project.py", line 1991, in _InitWorkTree
raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree
Repo sync failed
I will try to compile the same
UPDATE 2: I resolve a this problem. I will continue to compile
Don't work
This is a output:
Code:
ERGEDIR=out/target/product/kumquat/obj/objdir-gecko/b2g/locales/merge-$LOCALE ; \
done && \
make -C out/target/product/kumquat/obj/objdir-gecko package && \
mkdir -p out/target/product/kumquat/obj/DATA/gecko_intermediates && cp out/target/product/kumquat/obj/objdir-gecko/dist/b2g-*.tar.gz out/target/product/kumquat/obj/DATA/gecko_intermediates/gecko
make -C gecko -f client.mk -s
Adding client.mk options from /home/gigitux/B2G/gonk-misc/default-gecko-config:
AUTOCLOBBER=1
MOZ_OBJDIR=/home/gigitux/B2G/out/target/product/kumquat/obj/objdir-gecko
MOZ_MAKE_FLAGS=-s -j16
/home/gigitux/B2G/gecko/client.mk:281: *** Could not find autoconf 2.13. Stop.
make[1]: *** [build] Error 2
make: *** [out/target/product/kumquat/obj/DATA/gecko_intermediates/gecko] Error 2
[[email protected] B2G]$
gigitux said:
Don't work
This is a output:
Code:
ERGEDIR=out/target/product/kumquat/obj/objdir-gecko/b2g/locales/merge-$LOCALE ; \
done && \
make -C out/target/product/kumquat/obj/objdir-gecko package && \
mkdir -p out/target/product/kumquat/obj/DATA/gecko_intermediates && cp out/target/product/kumquat/obj/objdir-gecko/dist/b2g-*.tar.gz out/target/product/kumquat/obj/DATA/gecko_intermediates/gecko
make -C gecko -f client.mk -s
Adding client.mk options from /home/gigitux/B2G/gonk-misc/default-gecko-config:
AUTOCLOBBER=1
MOZ_OBJDIR=/home/gigitux/B2G/out/target/product/kumquat/obj/objdir-gecko
MOZ_MAKE_FLAGS=-s -j16
/home/gigitux/B2G/gecko/client.mk:281: *** Could not find autoconf 2.13. Stop.
make[1]: *** [build] Error 2
make: *** [out/target/product/kumquat/obj/DATA/gecko_intermediates/gecko] Error 2
[[email protected] B2G]$
Click to expand...
Click to collapse
add the autoconf file
check the client.mk at line 218
Sent from my S500 using xda app-developers app
How do i add it?
Excuse me but I'm a noobie on compilation of Android
Sent from my ST25i using xda app-developers app
gigitux said:
How do i add it?
Excuse me but I'm a noobie on compilation of Android
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
can you upload client.mk?
i dont have firefox os synched at the moment
Sent from my S500 using xda app-developers app
It looks to me like you don't have all of the required toolchain installed. Take a look at the link below down the page where it says "Requirements for Linux" and lists all of the packages you need to have. I don't know how BBQLinux works so you'll have to translate what it does for Ubuntu-Fedora-Arch into whatever package manager you're using.
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites
SpaceCaker said:
can you upload client.mk?
i dont have firefox os synched at the moment
Sent from my S500 using xda app-developers app
Click to expand...
Click to collapse
This is client.mk http://www.mediafire.com/download/fy9r6urjw8mhpgo/client.mk
trwrt said:
It looks to me like you don't have all of the required toolchain installed. Take a look at the link below down the page where it says "Requirements for Linux" and lists all of the packages you need to have. I don't know how BBQLinux works so you'll have to translate what it does for Ubuntu-Fedora-Arch into whatever package manager you're using.
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites
Click to expand...
Click to collapse
BBQLinux is Arch based
gigitux said:
This is client.mk http://www.mediafire.com/download/fy9r6urjw8mhpgo/client.mk
BBQLinux is Arch based
Click to expand...
Click to collapse
try a repo sync or launch ur device again
as it should be generated
trwrt said:
It looks to me like you don't have all of the required toolchain installed. Take a look at the link below down the page where it says "Requirements for Linux" and lists all of the packages you need to have. I don't know how BBQLinux works so you'll have to translate what it does for Ubuntu-Fedora-Arch into whatever package manager you're using.
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites
Click to expand...
Click to collapse
SpaceCaker said:
can you upload client.mk?
i dont have firefox os synched at the moment
Sent from my S500 using xda app-developers app
Click to expand...
Click to collapse
Guys, I have a BIG problem:
An installed 64 bit GNU/Linux distribution (we recommend Ubuntu 12.04).
I'm on VirtualBox, becouse my distro is Fedora.
I transfer directory B2G form virtualbox to Fedora. Afer i will work on Fedora
feherneoh said:
then you can try their build-environment setup script. It will install required packages
Click to expand...
Click to collapse
Now i have transfered direcotry B2G from VirtualBox to Fedora. After i follow this instruction https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites and i try to compile Firefox OS
feherneoh said:
Use this to setup build environment
Click to expand...
Click to collapse
I don't understand. I follow this https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/Linux_Prerequisites or this https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites
feherneoh said:
Seems to be the same, sorry. I sent the URL I saved when I started working on this ROM
Click to expand...
Click to collapse
Actually i'm transfering B2G from VB to Fedora. I will update this post :laugh:
I'm compiling it. I hope *_*
I have got this problem:
Code:
sh: gperf: command not found
calling gperf failed: 32512 at ./makeprop.pl line 140.
make: *** [out/target/product/kumquat/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/css/CSSPropertyNames.h] Errore 25
I'm installing gperf
Stay tuned !
EDIT: Another problem :/
Code:
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(png.o): in function png_calculate_crc:external/libpng/png.c:239: error: undefined reference to 'crc32'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(png.o): in function png_reset_crc:external/libpng/png.c:213: error: undefined reference to 'crc32'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngpread.o): in function png_process_IDAT_data:external/libpng/pngpread.c:874: error: undefined reference to 'inflate'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngpread.o): in function png_push_read_zTXt:external/libpng/pngpread.c:1405: error: undefined reference to 'inflate'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngpread.o): in function png_push_read_zTXt:external/libpng/pngpread.c:1408: error: undefined reference to 'inflateReset'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngpread.o): in function png_push_read_zTXt:external/libpng/pngpread.c:1466: error: undefined reference to 'inflateReset'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_read_destroy:external/libpng/pngread.c:1485: error: undefined reference to 'inflateEnd'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_destroy_read_struct:external/libpng/pngread.c:1355: error: undefined reference to 'inflateEnd'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_configure_decoder:external/libpng/pngread.c:963: error: undefined reference to 'inflateEnd'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_configure_decoder:external/libpng/pngread.c:964: error: undefined reference to 'inflateCopy'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_read_row:external/libpng/pngread.c:769: error: undefined reference to 'inflate'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_build_index:external/libpng/pngread.c:1039: error: undefined reference to 'inflateCopy'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_read_init_3:external/libpng/pngread.c:333: error: undefined reference to 'inflateInit_'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_create_read_struct_2:external/libpng/pngread.c:164: error: undefined reference to 'inflateInit_'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngrutil.o): in function png_inflate:external/libpng/pngrutil.c:262: error: undefined reference to 'inflate'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngrutil.o): in function png_inflate:external/libpng/pngrutil.c:286: error: undefined reference to 'inflateReset'
collect2: ld returned 1 exit status
make: *** [out/target/product/kumquat/obj/SHARED_LIBRARIES/libwebcore_intermediates/LINKED/libwebcore.so] Errore 1
Any fix ?
EDIT: i try with linaro now.
EDIT2: It's same.
You have got my problem, right @feherneoh ?
EDIT 3: It's work, I'm compiling...
Stay tuned!
I have same error. How do I fix libpng?
Sent from my Xperia U using xda app-developers app
feherneoh said:
Could you post the error message?
Click to expand...
Click to collapse
Code:
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(png.o): in function png_calculate_crc:external/libpng/png.c:239: error: undefined reference to 'crc32'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(png.o): in function png_reset_crc:external/libpng/png.c:213: error: undefined reference to 'crc32'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngpread.o): in function png_process_IDAT_data:external/libpng/pngpread.c:874: error: undefined reference to 'inflate'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngpread.o): in function png_push_read_zTXt:external/libpng/pngpread.c:1405: error: undefined reference to 'inflate'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngpread.o): in function png_push_read_zTXt:external/libpng/pngpread.c:1408: error: undefined reference to 'inflateReset'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngpread.o): in function png_push_read_zTXt:external/libpng/pngpread.c:1466: error: undefined reference to 'inflateReset'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_read_destroy:external/libpng/pngread.c:1485: error: undefined reference to 'inflateEnd'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_destroy_read_struct:external/libpng/pngread.c:1355: error: undefined reference to 'inflateEnd'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_configure_decoder:external/libpng/pngread.c:963: error: undefined reference to 'inflateEnd'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_configure_decoder:external/libpng/pngread.c:964: error: undefined reference to 'inflateCopy'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_read_row:external/libpng/pngread.c:769: error: undefined reference to 'inflate'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_build_index:external/libpng/pngread.c:1039: error: undefined reference to 'inflateCopy'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_read_init_3:external/libpng/pngread.c:333: error: undefined reference to 'inflateInit_'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngread.o): in function png_create_read_struct_2:external/libpng/pngread.c:164: error: undefined reference to 'inflateInit_'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngrutil.o): in function png_inflate:external/libpng/pngrutil.c:262: error: undefined reference to 'inflate'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/kumquat/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a(pngrutil.o): in function png_inflate:external/libpng/pngrutil.c:286: error: undefined reference to 'inflateReset'
collect2: ld returned 1 exit status
make: *** [out/target/product/kumquat/obj/SHARED_LIBRARIES/libwebcore_intermediates/LINKED/libwebcore.so] Errore 1
Do you have zlib and zlib-devel packages installed? That's what it looks like to me.

attempt to invoke virtual method java lang string on a null object reference error

attempt to invoke virtual method java lang string on a null object reference error pop up message please help me fix my issues it pop up when ever it feel like it .

Categories

Resources