How can I add boot jar location in the device tree? - android-source

I have the mediatek-common.jar. I need to write a makefile to put the bootjar so that the following doesn't occur.
FAILED: ninja: 'out/soong/missing', needed by 'out/soong/ra6/dex_bootjars_input/
mediatek-common.jar', missing and no known rule to make it
12:28:59 ninja failed with: exit status 1
I have tried PRODUCT_COPY but still it says out/soong/missing is needed

In android 10,if you want to add boot jar,java lib must be source file not ".jar",and make sure your target java lib's Android.bp have this statement:installable: true

Related

Swift Package Manager failed extracting

I'm getting this Package Manager error, when switching to a different branch or cloning the project. Build fails and "Clean Build Folder" doesn't help.
Error:
failed extracting
'https://releases.amplify.aws/aws-sdk-ios/AWSConnect-2.26.6.zip'
which is required by binary target 'AWSConnect':
.../Library/Developer/Xcode/DerivedData/MyApp-cbgtlihuudupsqdzyjdbyvcwkilh/SourcePackages/artifacts/extract/AWSConnect
is not a directory
The following steps resolve the issue forcing all packages to download.
Product > Clean Build Folder
Delete DerivedData content (Preferences > Locations > Derived Data little arrow)
File > Packages > Reset Package Cache
Build
The Reset Package Cache step is the most important here. It forces all packages to download as if they where just added.
Another issue that can happen is if you have added a build configuration, make sure that you have replicated this build configuration name throughout all your in house libraries, frameworks and sub projects. If the project that uses your Library has no build configuration for the scheme you are building then it will not link and you will receive errors like:
failed extracting 'https://github.com/*.xcframework.zip' which is required by binary target 'BlahBlah': fchmod (file attributes) error: Operation not permitted

Bitbake understanding the EXCLUDE_FROM_WORLD mechanism

I'm developing on Yocto 2.4 rockowith a BSP given by my provider. I'm trying to build modemmanager from the meta-openembedded layer, included in the meta-oe sub layer.
The configure task fail and give me as error :
checking for gobject-introspection...
configure: error: gobject-introspection-1.0 is not installed
After some search I've installed the libgirepository1.0-dev package on my host machine. But the error is always present.
I've continued investigations, and find in my recipe log the line :
DEBUG: EXCLUDE FROM WORLD: virtual:native:/home/test/share/sc20_linux/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.52.1.bb
I've tried to find which recipe excludes the dependency, with no success.
Can you help me to understand how works the EXCLUDE_FROM_WORLD mechanism ?
Thanks for your help.
I suspect that is debug output and doesn't mean the recipe is excluded. Have you looked at the modemmanager recipe to see if it has a DEPENDS on gobject-introspection-native and perhaps gobject-introspection? If not, or the PACKAGECONFIG isn't set, try adding the DEPENDS or enabling the PACKGECONFIG?
Also, have you tried simply building "bitbake object-introspection-native" and "bitbake object-introspection". You should get an error about why they ar disabled if you try and build them directly and they are excluded/disabled for some reason.

Does a recipe provided as DEPENDS can have own do_install() in yocto?

I am trying to build a custom recipe with Yocto (Rocko) for my Linux i.MX6 based embedded system.
The main recipe had dependency on a other custom recipe(as the main recipe is using header-files from this recipe) which is also creating some binaries which needs to be included in the final image.
I have added other_recipe(nbdkit) in the "DEPENDS" of main_recipe.bb
DEPENDS += "nbdkit"
the main recipe is creating a .so with the help of its own source file which is including header-files from the 'kit' recipe. I am able to install the binaries & .so generated using this main_recipe by adding it in do_install().
Now in the other_recipe(nbdkit http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-support/nbdkit/nbdkit_git.bb?h=master), When I add do_install()to include the binaries generated from that recipe the main_recipe build gets failed with PKG_CONFIG error as follow,
| Package nbdkit was not found in the pkg-config search path.
| Perhaps you should add the directory containing `nbdkit.pc'
| to the PKG_CONFIG_PATH environment variable
| No package 'nbdkit' found
Other build errors says that the header-files of kit included in the main_recipe is not found.
app-nbdkit-plugin.c:2:10: fatal error: nbdkit-plugin.h: No such file or directory
Where app-nbdkit-plugin.c is source file of main_recipe & kit-plugin.h is header file of other_recipe.
The strange thing is, when I remove do_install() from other_recipe(nbdkit) the main_recipe is getting built successfully.
Now I doubt, Is it possible to set a recipe as DEPENDS of other recipe and at the same time it provides output file as do_install()?
Will sharing header-files from other_recipe to main_recipe resolves the issue? If yes, how to do that?
Thanks.
[EDIT] Added nbdkit recipe link.

Cannot get Cordova project building in VS2015 with the facebook connect plugin

I've tried everything, but cannot seem to get it working. I've done the following:
1.Remove the plugins with the variables via the config designer.
2.Update to Cordova 5.0.0 via the config designer (Platforms > Cordova CLI)
3.From the command line: 1.Go to your project directory.
2.Type the following substituting the plugin name for the plugin you wish to add:
3.npm install -g cordova
4.cordova plugin add nl.x-services.plugins.launchmyapp --variable URL_SCHEME=myscheme
But I still cannot build. Here is the detailed output from MSBUILD :
http://pastebin.com/7enSzCxs
And a highlight of some of the errors I'm getting
1> BUILD FAILED
1> C:\Users\Adam\AppData\Local\Android\android-sdk\tools\ant\build.xml:601: The following error occurred while executing this line:
1> F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\com.phonegap.plugins.facebookconnect\myapp2568ddfac877478fb806edc911cff37e-FacebookLib\custom_rules.xml:4: F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\com.phonegap.plugins.facebookconnect\myapp2568ddfac877478fb806edc911cff37e-FacebookLib\ant-build does not exist.
And
1> BUILD FAILED
1> C:\Users\Adam\AppData\Local\Android\android-sdk\tools\ant\build.xml:470: The following error occurred while executing this line:
1> C:\Users\Adam\AppData\Local\Android\android-sdk\tools\ant\build.xml:441: Unable to delete directory F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\com.phonegap.plugins.facebookconnect\myapp2568ddfac877478fb806edc911cff37e-FacebookLib\bin
And finally
1>
1> F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\cordova\node_modules\q\q.js:126
1> throw e;
1> ^
1> Error code 1 for command: cmd with args: /s /c "ant debug -f F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\build.xml"
1> Command finished with error code 8: F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\cordova\build.bat --debug,--ant,
1>MDAVSCLI : error : F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\cordova\build.bat: Command failed with exit code 8
1>Done executing task "MdaVsCli" -- FAILED.
1>Done building target "BuildMDA" in project "fbtest.jsproj" -- FAILED.
1>Build FAILED.
Any ideas at all? Using a fresh install of VS2015 with the tools for cordova, trying to build for android.
EDIT:
So after taking the advice of Kamil Pajdzik below, I used build.bat to compile it and found some issues with my path being waaay to long. I mapped a drive to cut down the length and it will now build AOK from the build.bat.
Still no dice in Visual studio though (I assume this is difference between build.bat using gradle and vs using ant).
My only error now is :
1> -code-gen:
1> [mergemanifest] Merging AndroidManifest files into one.
1> [mergemanifest] Manifest merger disabled. Using project manifest only.
1> [echo] Handling aidl files...
1> [aidl] No AIDL files to compile.
1> [echo] ----------
1> [echo] Handling RenderScript files...
1> [echo] ----------
1> [echo] Handling Resources...
1> [aapt] Generating resource IDs...
1> [aapt] Z:\fbtest\platforms\android\bin\AndroidManifest.xml:14: error: Error: No resource found that matches the given name (at 'value' with value '#string/fb_app_id').
1> [aapt]
1> [aapt] Z:\fbtest\platforms\android\bin\AndroidManifest.xml:15: error: Error: No resource found that matches the given name (at 'label' with value '#string/fb_app_name').
1> [aapt]
1>
1> BUILD FAILED
1> C:\Users\Adam\AppData\Local\Android\android-sdk\tools\ant\build.xml:653: The following error occurred while executing this line:
1> C:\Users\Adam\AppData\Local\Android\android-sdk\tools\ant\build.xml:698: null returned: 1
1>
Okay, this appears to be the issue. There are two problems. The first is a max path size issue on Windows. The issue is that it the plugin uses part of the the app's ID to create a folder, and VS by default uses a random identifier that is fairly long so this exacerbates the issue.
To resolve:
Update the ID for your project to something short (com.myproject.short)
Move the project to the root of your drive
Go to the project folder and re-add the android platform. From the command line:
cordova platform remove android
cordova platform add android
The second issue that then remains is an "Ant" build seems to be missing a folder which likely is a bug. If you add the "ant-build" folder in the location it complains about the build succeeds.
Also - Be sure plugins/fetch.json is included in your checkins since this is where your plugin variables are stored. If that file is deleted, you'll need to remove and re-add the plugin again. From your update it sounds like either VS is still set to use Cordova 4.3.0 and/or plugins/fetch.json does not contain your plugin variables. You should see something like this if the plugin was added using Cordova 5.0.0:
{
"com.phonegap.plugins.facebookconnect": {
"source": {
"type": "registry",
"id": "com.phonegap.plugins.facebookconnect"
},
"is_top_level": true,
"variables": {
"APP_ID": "123",
"APP_NAME": "nbaer"
}
}
}
The "variables" section is what may be missing.
Try running F:\GIT\CordovaFb\BlankCordovaApp1\fbtest\platforms\android\cordova\build.bat from a command line. It usually gives more information.
Cordova 5.0.0 requires Android SDK in version 22. You can check if you have that installed via SDK manager.
This particular plugin appears to have some challenges with Cordova 5.0.0. Android underwent significant changes in this release that may be causing issues.
https://github.com/Wizcorp/phonegap-facebook-plugin/issues/1010
I am seeing failures if you build either with Ant or Gradle using a pure Cordova command line interface project. Likely a plugin fix is required to resolve the issue. I reccomend adding comments to this defect to help the plugin author resolve the issue.
So thanks to Chucks help, I managed to get a build working. It was indeed a combination of path length exceeding 260 characters (which I solved by mapping my solution directory to a drive) and a couple of folders not being created.
They were in my case :
F:\Git\CordovaFb\FBTest\platforms\android\com.phonegap.plugins.facebookconnect\myapp7a29c6c80cee4b2aa0dc8a70dc57527d-FacebookLib\bin\classes
and
F:\Git\CordovaFb\FBTest\platforms\android\com.phonegap.plugins.facebookconnect\myapp7a29c6c80cee4b2aa0dc8a70dc57527d-FacebookLib\ant-build
I seem to have to manually recreate these from time to time as they get deleted on some builds...
So the full process is as follows (for others who have the same issue)
1) Create your solution in as short a path as possible (map a drive if you need to)
2) Add your cordova project to the solution, double click config.xml, goto platforms and change the CLI version to 5.0.0
3) Fire up a command prompt in the solutions root
4) Type the following cordova plugin add https://github.com/Wizcorp/phonegap-facebook-plugin.git --variable APP_ID="00000000" --variable APP_NAME="My App"
5) When its done you'll have the plugin in the plugins dir and the fetch.json file should contain the variables you entered for appid and appname
6) Do a full build and you'll get some errors (Exit code 8)
7) Manually create the following :
[Solution Route]\platforms\android\com.phonegap.plugins.facebookconnect\myapp7a29c6c80cee4b2aa0dc8a70dc57527d-FacebookLib\bin\classes`
and
[Solution Route]\platforms\android\com.phonegap.plugins.facebookconnect\myapp7a29c6c80cee4b2aa0dc8a70dc57527d-FacebookLib\bin\classes`
8) Your build should succeed! Check periodically if those paths still exist.
This should get you by until the next release of the cordova tools for VS (if they fix it)
platforms\android\AndroidManifest.xml
just change android:minSdkVersion="14" to android:minSdkVersion="15"

Programming Arduino with avrdude within Eclipse- cannot find -l/usr/avr

I am trying to program the Arudino Nano from Eclipse. It has the same processor as the Uno (Atmega328p). I have had this working before with the Uno, but have since gotten a new hard drive and had to reinstall/reconfigure everything. I am running Fedora 19 with Eclipse Kepler. I am getting an error in the build process that I don't even know where to start looking to solve, and Google hasn't been much help...
Here is the error:
make all
Building target: Arduino_Template.elf
Invoking: AVR C Linker
avr-gcc -Wl,-Map,Arduino_Template.map -mmcu=atmega328p -o "Arduino_Template.elf" ./Analog.o -l/usr/avr
/usr/lib/gcc/avr/4.8.2/../../../../avr/bin/ld: cannot find -l/usr/avr
collect2: error: ld returned 1 exit status
make: *** [Arduino_Template.elf] Error 1
17:29:38 Build Finished (took 124ms)
Has anyone encountered this before? Or does anyone have any suggestions?
Thanks.
The problem could be described like this:
First, the library should be specified only by its name and without the "lib" prefix and the ".a" suffix. The linker (this is where you get the error) will look for the library within the specified in the project paths and will add whatever is necessary to the file library name. So if the library you need is named mystuff it will look for a file named libmystuff.a.
In your case this is specified by the -l/usr/avr which I think could be misconfiguration or you did not copy/paste the entire error output. With the '-l' option you specify the name only, not the entire path to the file.
Second, the path should be specified, in the project configuration, where to look for the libraries, otherwise the linker will look for the library files only within your own project only. Often libraries are part of another project - so you need to adjust the project configuration accordingly.
I had similar problem and this is how I solved it ...
Go to menu Project/Properties. On left - choose "C/C++ Build". On right - choose the tab "Tool Settings". On the tree view choose "AVR C Linker" then "Libraries" sub-item. You are where you may need to make changes.
The list of "Libraries" is where you add libraries names, such as mystuff.
The Libraries Path is where you specify the paths to the libraries. This may look like this: "${workspace_loc:/mystuff/Release}"
The result of this is that the linker will look for this file: /mystuff/Release/libmystuff.a under you workspace root folder.