I do not use any Android features of Qt, my only purpose is to program some little softwares for Windows with minGW and QMake, no other project configurations is relevant for my needs. I'm simply curious if I missed a part, it does not affect the fonctionnality.
Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable
to point to your Android NDK
And a bunch of other errors like that. Its my 4th clean install of 4 different version of Qt bundle, (now I carefully unselect everything except minGW32 and it still showing up!) God's sake why?
Did I missed a part on How to use Qt? Do I need extra-steps to remove it manually on a project creation?
If you want to code for Windows: just setting up your project with default setting (without Android/IOS setting).
If you want to code for Android: The problem was that the file wasn't the correct NDK file. Make sure you get the correct NDK from the website. Other than that it is pretty easy just unzip it and that directory is the root directory.
So if I understand, I can't remove "Android options" from Qt as it is pre-installed for all platforms.
Then yes, even if I don't use it, I must install Android NDK. Then continue to unselect the kit. Then these Error messages will disapear.
Related
Is there a way to build AOSP's /platform/frameworks/base package source or support library source separately in Android Studio.
I wanted to read the framework (base and support) code in Android Studio and since I didn't want to be bothered about the rest of the packages in AOSP, I only imported the mirrored repo of these two packages as two separate projects in Android Studio. I want to browse through the code by using "jump to source" shortcut (cmd/ctrl+click) of the IDE. But this handy feature won't simply work properly in Android Studio. When I try to jump to the method definition which belongs to a different java source file (It says - "Cannot find declaration to go to"). This limitation of source editor is due to gradle build failure. The project just won't build and throws the following error.
Error:You need a symlink in prebuilts/sdk/99 that points to
prebuilts/sdk/current.Without it, studio cannot understand current
SDK. ln -s ../../prebuilts/sdk/current ../../prebuilts/sdk/99
Is there a way to fix this. I know I can simply browse the source code on http://androidxref.com/ too, but it's not as convenient and powerful as your IDE.
This is possible (having Android Studio be able to show you the framework code and let you use the usual IDE tools), though compiling won't work.
But the detail in your question seems to indicate you don't actually care about compiling, just about viewing/editing.
The first steps listed here:
http://ronubo.blogspot.com/2016/01/debugging-aosp-platform-code-with.html
might work for you. Basically:
Build your AOSP platform
( . build/envsetup.sh && lunch - && make ...)
Create the Android Studio project for importing to
( mmm development/tools/idegen && development/tools/idegen/idegen.sh )
Import the project
( open android.ipr from Android Studio)
Not without a huge effort.
For very many reasons.Ex:
1.the framework depends on different HALs and libraries from system/bionic/external
2.Compiling the framework uses specific tools from linux(flex,bison,libgl etc..)
3.Framework is built using the Android.mk system and needs a lot of flags and compilation macros from build/
I also can't imagine a motivation to do what you are trying to do. If it's going to run on any device, bare in mind device manufacturers modify the framework heavily, even the small ones. Actually the chipset manufacturers modify it and give it to manufacturers that modify it even more.
Error:You need a symlink in prebuilts/sdk/99 that points to prebuilts/sdk/current.Without it, studio cannot understand current SDK. ln -s ../../prebuilts/sdk/current ../../prebuilts/sdk/99
This notice already tell you should run the command:
ln -s ../../prebuilts/sdk/current ../../prebuilts/sdk/99
To tell build system use 'current version sdk' in prebuilts/sdk/current directory replace the temp sdk version 99.
could you try it?
I am working on a Java application that will run on an embedded system - a custom android build or modified AOSP. It is built on a linux server.
I would love to use an IDE like Eclipse with all its goodies like code completion, source code checking etc. but it seems very complicated. I looked at Puri's blog here
for one, the build process of our custom android uses Android.mk makefiles.
How can I (Should I?) modify the Eclipse build process to build the custom android build?
You can use either eclipse or studio to maintain a custom, pre-installed application.
In either case, you will not use the IDE to build the actual application image. That will be built as part of the make from the root of the AOSP install(1)
You can, however, create a project whose root is the directory in either /device or /package that contains your app.
Once you've done that, read the Android.mk file to find dependencies. Add them to the project as you would for any other project, for your chosen IDE.
If you go for eclipse, I suggest that you put the build directory somewhere in /out, or outside the AOSP directory altogether. If the root make file finds it, it can be a problem.
When you need to test your app on a device or an emulator, use mm to build only your app.
Better yet, if possible, do most of the development for your app as you would any stand-alone app, so that you can easily install and test it. Only put it in the AOSP directory as part of the release process.
Note, you can use either eclipse or studio to kick off that system
build. In eclipse, use External Tools. Studio provides similar
capabilities
I want to create apps manually. Using eclipse is the easy way. Using just a text editor is the hard way, but ensure I will know exactly what I'm doing, which is how I like to work.
Are there any good tutorials out there?
EDIT 3:31pm 10/17/2011: I realized what my question should have really been after googling around: Are there any good resources that describe the directory contents of an Android project in detail? The idea here is to be able to create them manually.
Google tells you all about how to manage things from the command line here. Pretty straight forward.
That said, I think I'd have to recommend against going low level here. I used emacs and ant for several months while learning/tinkering with android programming, but it wasn't really that helpful. The whole android system seems designed for use in an IDE: use of XML for layout, automatically generated values in R.java, a big API with many similar sounding names (layouts vs views, OnTouchListener vs OnClickListener), etc. I can't say I really started to get the big picture of the system until I could see it all organized for me. I'm still on the command line for a lot of C/C++, and even some Java stuff too, but all it did for android was cause frustration.
EDIT
Just saw your edit for the directory structure. Check here.
If you must...
First install ant, then assuming sdk/tools is in your $PATH:
android create-project -n projectname -t android-13 -k here.namespace.your -a MyActivity -p projectname
Where android-13 is an installed platform, run android list targets to see which platforms you have. Then run ant release or ant debug to build, or just ant to get a list of possible targets. When you're ready to test, run ant install to install it onto a running emulator or attached device.
See Tools in the dev guide.
Intel xdk. Do the whole app in html, css, php, and javascript. Inel xdk can build it in different platforms.(android, iphone, and windows.)
Yes, there is a way.
See this link:-
http://animeshrivastava.blogspot.in/2017/07/generate-android-app-apk-on-shell-or.html
I am attaching the relevant parts :-
Generation of Android app at command prompt of Windows will be as follows:
Install Java .Only install version 6 standard edition as it is small size compatible with Android.
Next install Android in folder.
Run Android package manager and put Android API level 23 platform tools for version 6 of Android lollipop in directory
.This will have a file Android.jar containing all class files as a library jar for making a DALVIK-EXECUTABLE file run and execute as app on Android lollipop mobile.
Set path environment variable in advance system settings of Windows. Include java-installation in path variable.
Lets use shortcut mypro for my project. Mypkg means my package. Make directory folder
Note that com.pkg is a package where dot or period separates com and pkg sub directories.
In case your package doesn't have this dot or period, then during compilation no error but when you install in mobile, it will say invalid
Now we generate R class for res directory.
enter code hereaapt p -S res -J ./com/pkg -I android.jar
I need to edit the original Android Apps from packages
in terms make my own distro/mod..
I want to make changes to the In Call screen, lock screen, contacts, calendar etc..
I understand that for doing this I will have to build everything from
source,
however I need to edit the source and to do so I need to open the OS provided apps as
eclipse projects,
When I did I saw that there are
missing imports which are hidden in the SDK (or missing)
hidden parameters within the classes..
I don't want to use reflection since the whole code is here and
available, but how do you build a platform development kit..
or PDK ?:)
Can any one help?
You start by reading the documentation.
EDIT:
If you are trying to download some single project from AOSP and compile it using the SDK, odds are very strong that it will not work, and that you will encounter problems like the ones you cite. You do not build Android by building individual apps; you build Android ("my own distro/mod") by building the entire firmware. Most AOSP applications are not designed to be compiled by the SDK, but need the whole firmware.
Please check Using eclipse to browse and edit AOSP. You can atleast edit your code using eclipse, but you will have to use AOSP build system to build your distro.
You might also check Debugging Android Java Framework services as that would help debug your changes.
Just open Eclipse,
then go to "window" +"preferences" +"android"
there you will get sdk location,then give the appropriate path of the android sdk for proper run...
I'm having trouble setting up the Android SDK. I've set up Eclipse before but it didn't work, so I uninstalled it, but I'm trying again.
Does Eclipse need to be extracted to a particular folder for it to work? Where should I extract to?
Edit:
I'm using Eclipse 3.5 on Win7 Ultimate x64
Eclipse should be one of the most straightforward installs you have ever done. Make sure you have a Java SDK installed prior to extracting Eclipse. Otherwise it should work out of the box. Be sure not to move the eclipse executable out of the directory that you extract it to (make a shortcut to move instead).
The Android SDK should also be largely painless. Use the tool provided with the SDK download to setup the versions you want. The documentation is pretty good for this. (see Brian's link)
It can be much trickier to get the drivers for specific handsets working though, so you have that to look forward to down the road. They will come from the individual manufacturers developer websites.
Also is this for Win, Linux, or Mac? I will link you a walk through for the one you need.
Video tutorial for installing Android SDK on Win7 - http://www.youtube.com/watch?v=YeWH6Bj1DYw&feature=related
Installing Eclipse on Win 7 64bit:
http://lingpipe-blog.com/2009/03/05/eclipse-ide-for-64-bit-windows-and-64-bit-java/
How can I install eclipse on Windows 7 64-bit?
JVM - http://www.eclipse.org/downloads/moreinfo/jre.php
No, Eclipse can be extracted anywhere. Make sure you follow the steps detailed in the guide "Installing the SDK".
Ignore the last link to the JRE provided in Andrew's answer, you need the Sun JDK (5 or 6) instead of just the JRE (The Java Development Kit can contain multiple Java Runtime Environments). The official documentation Android provides makes this distinction quite clear. You need the JDK. --> http://developer.android.com/sdk/installing.html#Preparing
Also, the ADT plugin for eclipse sometimes doesn't update correctly. In that case, try to manually remove the 's' from the 'https://' and if that doesn't work, click on one of the tabs of the dialog and look for the checkbox which forces the use of secure mode, and then of course, make sure there is an 's' in the 'https://'.
Also make sure you've updated your system environment variable called 'path' to make sure the tools inside the tools/ folder from your android sdk folder are accessible from anywhere your command line/Eclipse might decide to call them from.