[Q] Ant Debuging - IDEs, Libraries, & Programming Tools

A newbie learning app development. I'm a beginner and while running the ant debugger I ran into an error. I'm building from the terminal, error says that aapt is not there but I physically found it in the right directory. Still I get the following error. I'd appreciate the help so I can get to the next step. BUILD FAILED
/home/daddybux/android-sdk-linux/tools/ant/build.xml:653: The following error occurred while executing this line:
/home/daddybux/android-sdk-linux/tools/ant/build.xml:698: Execute failed: java.io.IOException: Cannot run program "/home/daddybux/android-sdk-linux/build-tools/21.1.0/aapt": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at java.lang.Runtime.exec(Runtime.java:617)
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
at com.android.ant.AaptExecTask.execute(AaptExecTask.java:703)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at com.android.ant.IfElseTask.execute(IfElseTask.java:120)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
... 46 more
Total time: 1 second
[email protected]:~/workspace/ThisOneApp$

Related

Error message when installing x1 software updater.

I'm having problems updating my Xperia x1 Rom software.
I've downloaded the installation software, but when I try to install it the installation fails and gives me the message:
An error has occurred.See log file
C:\Program Files\Sony Ericsson\Update Service\workspace\.metadata\.log
what does this mean an how do I update my phone's software ?
The error log file reads:
eclipse.buildId=unknown
java.version=1.6.0_11
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: -performupdate -useralias=US
Command-line arguments: -os win32 -ws win32 -arch x86 -performupdate -useralias=US
!ENTRY org.eclipse.osgi 4 0 2009-03-12 14:48:37.177
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException
at com.sonyericsson.cs.ma3.c.b.f.a(Unknown Source)
at com.sonyericsson.cs.ma3.c.b.f.a(Unknown Source)
at com.sonyericsson.cs.ma3.c.b.h.a(Unknown Source)
at com.sonyericsson.cs.ma3.c.b.i.a(Unknown Source)
at com.sonyericsson.cs.ma3.c.b.i.b(Unknown Source)
at com.sonyericsson.cs.ma3.c.b.i.d(Unknown Source)
at com.sonyericsson.cs.ma3.c.b.i.a(Unknown Source)
at com.sonyericsson.cs.ma3.c.b.p.b(Unknown Source)
at com.sonyericsson.cs.ma3.client.us.a.c.a(Unknown Source)
at com.sonyericsson.cs.ma3.client.us.f.start(Unknown Source)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
I have tried installing the updater software on 3 different machines so far, but i get error messages on each one.
Does anyone know what this error means ?
I have this problem too , plz someone help

APK Manager Issue

So I am useing APK Manager for the first time. I put the apk file that I want to modify in the place-apk-here-for-modding folder. I then select 22 and pick the apk then I hit 9 and get an error. This is from the error log. Any idea as to what is wrong?
--------------------------------------------------------------------------
|Mon 10/04/2010 -- 13:03:47.34|
--------------------------------------------------------------------------
java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
Could Not Find C:\android\APK Manager\place-apk-here-for-modding\../place-apk-he
re-for-modding/signedcom.htc.resources.apk
Could Not Find C:\android\APK Manager\place-apk-here-for-modding\../place-apk-he
re-for-modding/unsignedcom.htc.resources.apk
java.lang.UnsupportedClassVersionError: brut/apktool/Main (Unsupported major.min
or version 50.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)

[Q] trouble recompiling apks

I am getting the following errors when I attempt to decompile GoogleLatinIME.apk(copied directly from system- app) and SamsungIME.apk(downloaded from xda thread) with apktool I put the framework-res.apk and SystemUI.apk into the framework folder by running command prompt - apktool if .... , also I tried adding twframework-res.apk to the framework folder in apktool. I am running http://forum.xda-developers.com/ver.../rom-eclipse-s5-tw-v1-0-12-8-14-real-t2967151
The possibility exists that I have no idea what I am doing so any help is much appreciated. Thanks!!!
C:\Users\GLEN\apktools\phone\apktool>apktool d GoogleLatin.apk
Input file (GoogleLatin.apk) was not found or was not readable.
C:\Users\GLEN\apktools\phone\apktool>apktool d GoogleLatinIME.apk
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode ars
c file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
ources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:44)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
2)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 8 more
C:\Users\GLEN\apktools\phone\apktool>apktool d SamsungIME.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.Direc
toryException: java.util.zip.ZipException: error in opening zip file
at brut.androlib.ApkDecoder.hasSources(ApkDecoder.java:199)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:83)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: brut.directory.DirectoryException: java.util.zip.ZipException: error
in opening zip file
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:55)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:38)
at brut.androlib.res.util.ExtFile.getDirectory(ExtFile.java:55)
at brut.androlib.ApkDecoder.hasSources(ApkDecoder.java:197)
... 3 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)
... 6 more
C:\Users\GLEN\apktools\phone\apktool>

Widget problem

I have a problem with widgets on AOKP 8.1 from 03.04. When i wan't to put a Widget on Homescreen with some i get the message "Problem loading widget" and other widgets from the same app is working fine. Anyone knows how to fix it, i searched on google, but didnt found a solution.
I take a logcat here what i get:
updateAppWidget couldn't find any view, using error view
android.view.InflateException: Binary XML file line #159: Binary XML file line #159: Error inflating class android.widget.ListView
Caused by: android.view.InflateException: Binary XML file line #159: Error inflating class android.widget.ListView
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
at android.view.LayoutInflater.createView(LayoutInflater.java:647)
at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:720)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:788)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.widget.RemoteViews.inflateView(RemoteViews.java:3498)
at android.widget.RemoteViews.-wrap1(Unknown Source:0)
at android.widget.RemoteViews$AsyncApplyTask.doInBackground(RemoteViews.java:3600)
at android.widget.RemoteViews$AsyncApplyTask.doInBackground(RemoteViews.java:3596)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
at android.os.Handler.<init>(Handler.java:204)
at android.os.Handler.<init>(Handler.java:118)
at android.widget.AbsListView$1.<init>(AbsListView.java:3936)
at android.widget.AbsListView.<init>(AbsListView.java:3936)
at android.widget.ListView.<init>(ListView.java:227)
at android.widget.ListView.<init>(ListView.java:223)
at android.widget.ListView.<init>(ListView.java:219)
... 24 more

App crash / force close java.lang.NullPointerException, help

Hello everyone, I open this thread here because I know much of the people here have more experience and may be can help with the problem.
I have a tablet Chuwi with Intel Celeron (x86-x64) with Windows and now I make dual boot with "Phoenix OS Thunder Lite v4.5 Android x86", every think work as expected but main app which I use crash. I investigate the problem and with the another port "Prime OS Thunder Lite v1.0" the issue doesn't present and work like a charm. But with Prime OS i have very short life time, in Phoenix OS is greatly improved. After a coup of port I considered the something in Phoenix OS (no matter which port or mod) have this issue. I have a log with the error, generated by the application + video of the problem.
The quote of the log:
Code:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cnnlaunch.x431.pro3S/com.cnlaunch.x431pro.activity.diagnose.CarIconActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.drawable.Drawable.setAlpha(int)' on a null object reference
Full log:
Spoiler: Full log
Devices Model: Thunder OS
Devices SDK Version: 25
Software Version Name: 66 AG
Software Version Code: 129
Software Type: X431PADII
Crash Time: 2021-01-18,19-47-22
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cnnlaunch.x431.pro3S/com.cnlaunch.x431pro.activity.diagnose.CarIconActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.drawable.Drawable.setAlpha(int)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2713)
at android.app.ActivityThread.startActivityNow(ActivityThread.java:2503)
at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:136)
at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:348)
at com.cnlaunch.x431pro.activity.MainActivity.c(Unknown Source)
at com.cnlaunch.x431pro.utils.bs.a(Unknown Source)
at com.cnlaunch.x431pro.utils.d.f.a(Unknown Source)
at com.cnlaunch.x431pro.activity.ap.d(Unknown Source)
at com.cnlaunch.x431pro.activity.ap.c(Unknown Source)
at com.cnlaunch.x431pro.activity.ah.onClick(Unknown Source)
at android.view.View.performClick(View.java:5638)
at android.view.View$PerformClick.run(View.java:22435)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6300)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:887)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:777)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.drawable.Drawable.setAlpha(int)' on a null object reference
at com.cnlaunch.x431pro.widget.a.db.<init>(Unknown Source)
at com.cnlaunch.x431pro.activity.diagnose.CarIconFragmentForAll.onActivityCreated(Unknown Source)
at android.app.Fragment.performActivityCreated(Fragment.java:2362)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1014)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)
at android.app.BackStackRecord.run(BackStackRecord.java:816)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1578)
at android.app.FragmentController.execPendingActions(FragmentController.java:371)
at android.app.Activity.performStart(Activity.java:6724)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2676)
... 18 more
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.drawable.Drawable.setAlpha(int)' on a null object reference
at com.cnlaunch.x431pro.widget.a.db.<init>(Unknown Source)
at com.cnlaunch.x431pro.activity.diagnose.CarIconFragmentForAll.onActivityCreated(Unknown Source)
at android.app.Fragment.performActivityCreated(Fragment.java:2362)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1014)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)
at android.app.BackStackRecord.run(BackStackRecord.java:816)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1578)
at android.app.FragmentController.execPendingActions(FragmentController.java:371)
at android.app.Activity.performStart(Activity.java:6724)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2676)
at android.app.ActivityThread.startActivityNow(ActivityThread.java:2503)
at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:136)
at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:348)
at com.cnlaunch.x431pro.activity.MainActivity.c(Unknown Source)
at com.cnlaunch.x431pro.utils.bs.a(Unknown Source)
at com.cnlaunch.x431pro.utils.d.f.a(Unknown Source)
at com.cnlaunch.x431pro.activity.ap.d(Unknown Source)
at com.cnlaunch.x431pro.activity.ap.c(Unknown Source)
at com.cnlaunch.x431pro.activity.ah.onClick(Unknown Source)
at android.view.View.performClick(View.java:5638)
at android.view.View$PerformClick.run(View.java:22435)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6300)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:887)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:777)
Video link with the problem -
App link - https://drive.google.com/file/d/15gLSmf2SxzSZ5XmOXVQh4D4lWKMlDl6w/view?usp=sharing
Thanks!

Categories

Resources