There is a crash bug in the aapt tool that happens till R12 (checked).
i'll give more details later, but for my question:
The bug happens on windows system, not on linux, it's not related to eclipse, i tried from the command line as well.
I want to debug the appt process under windows, will adding -g to the building fags in the android build tree (i'm using the trunk) solve the problem ? i want to see where the crash is and see if i can fix it but assembly code wont help me much and it doesn't reproduce on linux machines so i can't debug it in it's natural env.
(the tools are compiled for windows under linux using mingw32 library for linux, using sdk product with '_sdk_win' ).
Regardig the bug itself:
open an Android project under eclipse and call it 'a'
open the 'a' properties and check the 'Is Library' check box.
open another Android project and name it 'b'.
open it's properties and add 'a' as an android library it uses.
open the android plugin preferences and change the build from silent to verbose
clean both projects.
on linux everything is neat, on windows it crashes after the line:'baseFile zd has flavor (null)' which according to linux should be:'baseFile 0 has flavor ,,,,,,,,,,,hdpi,,,,,,,'
most chances null pointer exception occurs here, the question is why only on windows ?
The bug is gone from the next version (compiled from the trunk).
Related
I am trying to to run a application on my android device. The issue is that I get the PAClient error E0002 From my understanding profile names are only needed when running apps on Remote Devices, which I'm not doing. There are no profiles created for the PAClient and even if i try to create one the only option is Widows 64 and 32-Bit
I recently reinstalled the Android Common Files from Tools -> Manage Platforms. That could have something to do with it. I know there is another post here, but that post has no working answers.
Also here are my computers environment variables
My platform selector
So how do I fix this error?
The Answer:
The PAClient Error was caused by a compatibility issue with the device in question and the Android SDK Installed the computer.
To fix this issue go to C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\<Your Installed SDK>\ open SDK Manager.exe, remove the SDK installed (Ex: Android 10) and install the one corresponding to the Android Version on your phone (Android R Dev. Preview in my case). Then open Delphi, go to Tools -> Options -> Deployment -> Sdk Manager then change the path of the old SDKs to the new SDK path (They should have a exclamation mark next to them). Now the last thing you have to do is go to the Java Tab and change the Keytool and Jarsigner location to a valid one if its not already valid (something like C:\ProgramFiles\<your java installation>\<java jdk version>\bin\keytool.exe and C:\ProgramFiles\<your java installation>\<java jdk version>\bin\jarsigner.exe for the jarsigner).
That's all. Now you can compile & run your application on your device.
Note: You don't have to uninstall the old SDK if you still need it to make apps for other android versions. Only remove it if you don't need it.
I'm using VS2012 and I'm trying to build my application for Android, but APK file is not created when I build the application.
I'm doing this process using the Marmalade Hub and the "Package, Install and Run" option. Build process works fine and I get no errores, but when I process on the "Package, Install and Run" button I get the following message:
Please Build before deploying. To build, click "Build" or click "Open in IDE" and build GCC ARM Debug.
The following picture shows this process:
Picture
Please help, I cannot advance on my project because of this situation!
Thanks!
You're doing it wrong. The build process has to be in the IDE, not in the HUB. Open the project in IDE(VS2012 in your case) by either clicking Open in IDE button in Hub or double clicking the Mkb file. Build and run your code in x86 first to create the necessary bin files for groups and then build it using GCC release compiler. After that you can either run it using GCC compiler to open the deploy tool(default action for VS2010 and VS2012 desktop version) or running deploy tool from external tools (VS2012 for windows phone) or by running the deploy tool target (in XCode) directly. You can instead use package, install and run button in the hub if you've already filled the neccessary info deploy tool asked you.
Honestly I don't have trust on Hub and like to do the development using old school method with IDE and deploy tool. It always works.
I found the problem on the HUB that wasn't allowing me to run the "Package, Install and Run" process. For that matter, the actual problem was in the Package part of the process.
For some reason, when you use VS2012 to develop and you haven't installed Windows Phone for VS2012, the default option for the HUB is to check for "Windows Phone 8 C++ Development" tool installation and if not present, block Package build for Android. I also note that I'm using Windows 7, so I cannot install Windows Phone for 2012 module.
The solution I found was to simply configure Marmalade Hub correctly:
Open Marmalade Hub.
Press on Dependency Checker.
Depency Checker should start with the IDE's and Compilers tab opened. If not, open IDE's and Compilers tab.
Look for Windows Phone 8 C++ Development on the tab.
Choose "Work Without IDE" on the options.
Try to build the project again.
Best!
I started with cordova and I have some small problems.
I've created an android application. I have installed java, android SDK , Apache Ant and Apache Ant.
I have added android with cordova add platforms android and builded correctly.
1 - When I use cordova run android I get the following error:
an error occured while running the android project . Buildfile : ...Demo \ platforms \ android \ build.xml . ERROR : Failed to install apk to device
I think this is due to the fact that my application is not in debug mode. How to set the debug mode? (' cordova emulate android ' works and launches the emulator )
2 - When I want to load a project in eclipse . (New project - > Android Project from Existing Code) I have the error:
Invalid project description Reason : . Invalid project description
How to overcome this error ?
3 - I want to install external plugins, eg
- https://github.com/ClickInnovate/CordovaPhoneGapPlugins/tree/master/Android/SocialMessage
- https://github.com/phonegap/phonegap-plugins/tree/master/Android/StatusBarNotification
It is said that to copy the java files in the src folder , but, I copy the java files in the original project or one that is build ( in plateform directorie )
If you run cordova run android -d, you will see additional debugging information printed to the console which should hopefully help you narrow down the problem. I've never seen that error you are getting, but to set your device up for debugging you should follow these steps. Some steps may be different or unneeded based on your Android device and version:
Settings --> Click on "About Tablet" --> Click on Build Number 7 times to activate "Developer mode"
Settings --> Developer options --> USB Debugging (make sure it is checked)
Settings -->Security-->Unknown Sources` (make sure it is checked)
Storage --> Click the drop down on the top right --> USB computer connection --> Make sure "Camera (PTP)" is checked
Please ensure that you are following the Android platform guide. If you are getting "Invalid project description" you might just need to type in a project description in one of the boxes in Eclipse? Another thing, make sure you are doing Import-->Android-->Android Project from Existing Code. Finally, it sounds like this might be a goofy Eclipse environment issue, here is another question on SO about this problem.
The plugins that you listed are old, they were made before Cordova 3.X came out. In 3.X, a new plugin management system using Cordova CLI and Plugman is used to install plugins - the only problem is that the plugins need to be updated to use this new format. You could look around to see if somebody has updated those plugins (look on the Fork page on GitHub is one good way.) Otherwise if you can't find an updated plugin, you could try to update the plugin yourself following the upgrade guides on the doc website. To answer your question, the java files would be need to eventually be copied into the build folder. In 3.X, the files are stored in the /plugins/ folder, then copied to the /platforms/android/ folder when you run cordova prepare, and are built into the cordova.jar when you do cordova compile. You can also read about how to install plugins with just plugman.
So I'm using Eclipse 4.2 to build my projects which imports native functions in Java.
Everything build fine with eclipse and yesterday everything worked fine.
Today my eclipse stopped to resolve jni.h headers and others android header and shows me errors.
My project builds correctly but eclipse forbids me running application with message saying that there are errors in my application.
I have all paths to symbols in project paths and symbols c,cpp.
And it was working without errors... My only solution right now is to build project, then restart eclipse and run application...
EDIT: oh... It's funny... Now eclipse doesn't start android emulator when i click run as...
EDIT2: even when I create new project...
EDIT3: Its funny... I had to add in avd device... I don't know how it is possible but for two days I've been using it without device in avd and it was working... (I haven't change api or anything like this and I haven't touch AVD Manager)
EDIT4: Strange things happenes in eclipse... I still don't know why eclipse has problems with includes...
It's a bug in ADT 20. Refer http://code.google.com/p/android/issues/detail?id=33788
Go with Alex' adwise until ADT 21 or a patch for ADT 20 is released.
[edit] BTW: you can always simply delete errors in the Problem list ;-)
You can go to Project|Properties|C/C++ General|Code Analysis then uncheck everything in there. That will provide for running your app until you figure out the proper fix.
You can do this by choosing Properties for the project
Properties -> C/C++ General -> Preprocessor Include..-> Entries -> Setting Entries -> CDT User Setting Entries
Add -> Include Directory -> File System Path, and enter the path of the includes like:
${NDK_ROOT}\platforms\android-5\arch-arm\usr\include
Also I found that this working for me only if I checked "Contains system headers" checkbox.
Okay. I'm kind of at my wits' end here. I've been trying for about 2 days to set up Titanium Studio to recognize and connect to the Android SDK (Windows 7). I have tried multiple solutions (below) with no luck. There's got to be something I'm missing. I've tried Google and the Titanium developer guides. So this is my last straw. Any ideas?
Android SDK home path is C:\Android\android-sdk (to avoid spaces with "Program Files")
installed all SDKs (3,4,7,8,10,11,12,13,14,15), their Samples, and all Google APIs
installed all "Extras" packages
Added both the Android tools and platform-tools directories to Windows' PATH variable
Copied adb.exe from platform-tools to tools as Titanium likes to look there for adb
Installed the current master build of Titanium SDK for Mobile Devices
Created Android Virtual Devices (AVDs) for SDKs 7 and 8 (Titanium's required SDKs)
Restarted adb server and computer itself after each change
On the Titanium 'Dashboard' tab, under 'Configure', I get:
An Android SDK is missing. Titanium requires Android platforms 2.1.* and 2.2.*
When attempting to set the default Android SDK path in 'Preferences', I get:
Could not locate the Android SDK at the given path
Titanium log file output (sorry, kinda long):
!ENTRY com.appcelerator.titanium.mobile 4 0 2012-02-22 14:06:21.992
!MESSAGE (Build 1.0.0.1327639206) [ERROR] [ERROR] The system cannot find the path specified.
[ERROR] The system cannot find the path specified.
Traceback (most recent call last):
File "C:\Users\Stick\AppData\Roaming\Titanium\mobilesdk\win32\2.0.0.v20120221190136\android\avd.py", line 45, in <module>
print get_avds(sdk)
File "C:\Users\Stick\AppData\Roaming\Titanium\mobilesdk\win32\2.0.0.v20120221190136\android\avd.py", line 21, in get_avds
for line in run.run([sdk.get_android(),'list','target'],debug=False).split("\n"):
AttributeError: 'NoneType' object has no attribute 'split'
I have no idea what's missing. Eclipse recognizes everything just fine. ANY suggestions??
P.S.
I've noticed that when I attempt to run 'android' commands, i.e.
android
android list targets
I get what seems to be an error:
The system cannot find the path specified.
However, the commands still continue to run with no issues (I get a list of all the targets and the SDK Manager pops up). I'm not sure whether or not whatever is causing that message is also causing Titanium headaches.
I was facing the exact same issue, but now I have figured this out and it was working fine.
Basically, when I install Titanium Studio and I configure Android SDK it worked fine, but when I try to execute Project there was "javac not found" error. While resolving this issue I came across a Post where it was mentioned to include '%JAVA_HOME;%' in your Path. And when I did this the Android SDK was not longer detected by Titanium.
I removed the '%JAVA_HOME%' from Path Variable and then I include Java bin Folder Path to Path Variable and created a new variable 'JAVA_HOME' which points to root directory of Java installation. Everything works fine after doing this step.
I hope you will now get your Titanium Environment running. :-)
Thanks.
Newer version of Titanium have the Update Android SDK option in the Dashboard. Just make sure, the path is correct. Some cases like mine, there might be two Android SDK paths; one was obsolete and the other was active. So, please make sure of that path. When Titatnium is about to update the SDK software, looking in for newer versions, please select Cancel, as that wouldn't be required!
open titanium ide.
click on file-> titanium mobile project.
a window will show up with a link Set-up/Configure SDKs in the
bottom. click on this link.
now give android sdk home: c:\Androi\android-sdk (or browse to
android-sdk folder in your system)
select the default Android Sdk
click Apply
Click Ok.
You should be good to go.
Let me know if you face any problems.