So I'm working on an android app that implements the Caldroid library. At first when I tried to build the app I got a DexException. I fixed that by deleting the android-support-v4.jar file from Syncc/app/build/exploded-aar/Syncc/caldroid/unspecified/libs
'Syncc' is the name of the app and 'app' is the module. I'm not quite sure what that means (If someone could clarify that I'd be very grateful) but it's the way AndroidStudio makes it.
So after removing that file when I try to build the app it works but installing it to my device doesn't. The terminal says the following:
Waiting for device.
Target device: samsung-gt_n7100-4d005d114bf9604f
Uploading file
local path: C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\apk\app-debug-unaligned.apk
remote path: /data/local/tmp/com.nttkjwmp.syncc.app
Installing com.nttkjwmp.syncc.app
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.nttkjwmp.syncc.app"
pkg: /data/local/tmp/com.nttkjwmp.syncc.app
Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]
Here is the terminal output when I put the file back in:
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Users\Nicolas\AppData\Local\Android\android-studio\sdk\build-tools\android-4.4.2\dx.bat --dex --output C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\dex\debug C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\classes\debug C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\dependency-cache\debug C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\pre-dexed\debug\android-support-v4-dcbacb5a563a38baf2818d3992287104d67e74f2.jar C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\pre-dexed\debug\classes-1d8979f21bebf58bb6900d1b0d10af9c29510f44.jar C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\pre-dexed\debug\classes-848439748d02ee11d97f22ad9f7789545209e0f1.jar C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\pre-dexed\debug\date4j-b11e34e16255b8734f64de0013eac10517e12be4.jar C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\pre-dexed\debug\support-v4-19.1.0-a9f29dd44ea69fc9776ae436c7b280cb22ffdec4.jar
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
at com.android.dx.command.dexer.Main.run(Main.java:230)
at com.android.dx.command.dexer.Main.main(Main.java:199)
at com.android.dx.command.Main.main(Main.java:103)
So can anyone point out what I'm missing here? Do I have to delete another file or maybe add something to a gradle file? Thanks in advance!
It looks like some library required by your app via <uses-library> in AndroidManifest.xml is missing on device.
If this is com.google.android.maps try replacing it by Google Play Services.
Related
I'm trying to build java-cef on ubuntu following instructions from https://bitbucket.org/chromiumembedded/java-cef/wiki/BranchesAndBuilding.
At cmake step
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
i get
-- Downloading clang-format from Google Storage...
Failed to fetch file gs://chromium-clang-format/942fc8b1789144b8071d3fc03ff0fcbe1cf81ac8 for tools/buildtools/linux64/clang-format. [Err: /home/x/Desktop/jcef/src/tools/buildtools/external_bin/gsutil/gsutil_4.15/gsutil/third_party/boto/boto/pyami/config.py:71: UserWarning: Unable to load AWS_CREDENTIAL_FILE ()
warnings.warn('Unable to load AWS_CREDENTIAL_FILE (%s)' % full_path)
Failure: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727).
]
Terminal indicates that I'm using Python 2.7.15+.
How can i make it work? Many thanks.
In the folder where it has created the build jcef/src/tools/buildtools/download_from_google_storage.py change the version parameter of gsutil to a recent version, like 4.39. If you don't find specified file use a tool like find.
Hello I am attempting to export some R files that were edited in R to excel. I am trying to install the package xlsx and rjava as they both are needed.
I have already tried to download Java into the file pathway but it will not let me since the folder already has files in it. So I did the next best thing and created a folder in hopes this would work but I keep getting the same error. I also have Rtools installed.
> install.packages("rJava")
Installing package into ‘C:/Users/Austin/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/rJava_0.9-11.zip'
Content type 'application/zip' length 832080 bytes (812 KB)
downloaded 812 KB
package ‘rJava’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Austin\AppData\Local\Temp\RtmpcHsZaF\downloaded_packages
> library("rJava")
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/Austin/Documents/R/win-library/3.6/rJava/libs/x64/rJava.dll':
LoadLibrary failure: The specified module could not be found.
Being able to export R files to excel
When i run as java application, i got this error. i included build.xml to build and generating apk file from java application.
[taskdef] Could not load definitions from resource anttasks.properties. It could not be found.
[taskdef] Could not load definitions from resource emma_ant.properties. It could not be found.
-check-env:
BUILD FAILED
C:\Android_workspace\apktest\build.xml:246: Problem: failed to create task or type checkenv
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any / declarations have taken place.
Total time: 0 seconds
Check my answer here {How to generate apk file programmatically through java code}
i think your problem here that you need to update the build.xml file by running this command:
android update project --name <project_name> --target <target_ID> --path <path_to_your_project>
I have a problem with setting up the work environment for Cordova on Windows 7 for Android. I use NetBeans 8 and followed this guide: Link Here
New project -> Cordova -> Hello World Template.
Whenever I try to build a Cordova project (in NetBeans) I get this message:
BUILD FAILED
C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\build.xml:90: Cannot find C:\Users\Administrator\SkyDrive\Skolegang\Dataingeniør\Android\adt-bundle-windows-x86_64-20130729\sdk\tools\ant\build.xml imported from C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\build.xml
Total time: 0 seconds
C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\cordova\node_modules\q\q.js:126
throw e;
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\cordova\run.bat: Command failed with exit code 8
at ChildProcess.whenDone (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
Command finished with error code 8: C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\cordova\run.bat --emulator
C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\nbproject\build.xml:272: exec returned: 1
BUILD FAILED (total time: 47 seconds)
I have googled it for hours but can't seem to find a solution. Some people get some of the same errors(not exact, but similar), but the solutions did not work for me. One issue was regarding Java 8 and ant versions beneath 1.9.0 (I use Node 0.10.26, java 1.7.0_25, cordova 3.5.0-0.2.4 and ant 1.9.4). I also tried to create a new project with the console (CMD), but it gives the exact same error when I build. It's no problem to create the project, nor adding Android as a platform, the problem is building the project. I think the environment variables are set correctly since the java, node, ant and cordova commands work fine in cmd/powershell, and the check_reqs.bat said that the environment was fine.
It's this line that creates the error: <import file="${sdk.dir}/tools/ant/build.xml" />. This is the rest of the message: Cannot find C:\Users\Administrator\SkyDrive\Skolegang\Dataingeniør\Android\adt-bundle-windows-x86_64-20130729\sdk\tools\ant\build.xml imported from C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\build.xml.
Here is the error I get in the command window (not using NetBeans):
PS C:\Users\Administrator\Desktop\test\fakeApp> cordova build android
Running command: C:\Users\Administrator\Desktop\test\fakeApp\platforms\android\cordova\build.bat
Buildfile: C:\Users\Administrator\Desktop\test\fakeApp\platforms\android\build.xml
BUILD FAILED
C:\Users\Administrator\Desktop\test\fakeApp\platforms\android\build.xml:90: Cannot find C:\Users\Administrator\SkyDrive\
Skolegang\Dataingeni├©r\Android\adt-bundle-windows-x86_64-20130729\sdk\tools\ant\build.xml imported from C:\Users\Admini
strator\Desktop\test\fakeApp\platforms\android\build.xml
Total time: 0 seconds
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,C:\Users\Administrator\Desktop\test\fakeApp\platforms\androi
d\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: C:\Users\Administrator\Desktop\test\fakeApp\platforms\android\cordova\build.bat: Command failed with exit code 2
at ChildProcess.whenDone (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\s
rc\cordova\superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
I thought maybe it was a path issue since I have a special letter in the path were the NetBeansProjects are stored (and it's pretty long too), but creating a test directory at C:\ and creating the project with the command window gave the same error. I'm new at Cordova so I'm sure there's an easy solution, thanks in advance.
I solved it, though I tried to create a cordova project outside the OneDrive folder I did not think of the SDK path (which also were stored in OneDrive). By moving the SDK files to C: (the path could probably not contain the special letter 'ø') and changing the path of the environment variables (and the SDK path in NetBeans) it now runs perfectly.
Every time I try to run an Android project from Eclipse with the Android plugin (Run -> Run), the emulator starts up just fine, but the upload fails, and the Console puts out this error message:
[2010-06-17 08:17:55 - HelloAndroid] Failed to upload HelloAndroid.apk on device 'emulator-5554'
[2010-06-17 08:17:55 - HelloAndroid] java.io.IOException: Unable to upload file: Local file doesn't exist.
[2010-06-17 08:17:55 - HelloAndroid] Launch canceled!
It seems as though the apk compilation is failing, but there are no other errors in the Console at all except for a lone warning about the project not specifying an API Level requirement:
[2010-06-17 08:17:55 - HelloAndroid] WARNING: Application does not specify an API level requirement!
[2010-06-17 08:17:55 - HelloAndroid] Device API version is 8 (Android 2.2)
Make sure your manifest file specifies the sdk:
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/>
In fact, the APK file has not been generated. Try to see if there are compiling errors. If not, try to compile the project by yourself. You can read these interesting articles:
How to build Android application package (.apk) from the command line using the SDK tools + continuously integrated using CruiseControl
Developing Android without Eclipse or Ant