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>
Related
I am using NCache NodeJS client package and writing tests by calling NCache API's. Package has dependency of Java. After I installed and used that package to write simple test. Test execution failed with module not Found error:
Error Message
Messgae:
The specified module could not be found.
\\D:\GitHome\Test\node_modules\java\build\Release\nodejavabridge_bindings.node
at Runtime._loadModule (node_modules/jest-runtime/build/index.js:893:29)
at Object.<anonymous> (node_modules/java/lib/nodeJavaBridge.js:21:16)
File in above mentioned directory exits.
Note: When I used that package in simple index.js file it worked fine as expected but unable to run with jest.
No major configuration done for jest in package.json file.
Java jdk-11.0.6 installed on box and JAVA_HOME is set.
Package.json
test.specs.js
Unable to identify the exact reason of failure therefore stuck on how to resolve it.
Environment:
OS: Windows
node: 14.15.3
jest: 26.6.3
C:\Program Files\OpenJDK\jdk-16.0.1\bin\server needs to be in your path. On windows can Edit the system environment > Environment Variables... > System variables and add C:\Program Files\OpenJDK\jdk-16.0.1\bin\server
Other option is to add it to your test runner. For example in WebStorm edit the Run Configurations and add Environment variables PATH=C:\Program Files\OpenJDK\jdk-16.0.1\bin\server
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.
I'm working on an open-source project called "Cloudnet-v3". I am using a symlink /data on my local machine to the data-point in my IntelliJProjects-Folder.
I got the following startup command:
[java, -XX:+UseG1GC, -XX:MaxGCPauseMillis=50, -XX:-UseAdaptiveSizePolicy, -XX:CompileThreshold=100, -XX:+UnlockExperimentalVMOptions, -XX:+UseCompressedOops, -Dcom.mojang.eula.agree=true, -Djline.terminal=jline.UnsupportedTerminal, -Dfile.encoding=UTF-8, -Dio.netty.noPreferDirect=true, -Dclient.encoding.override=UTF-8, -Dio.netty.maxDirectMemory=0, -Dio.netty.leakDetectionLevel=DISABLED, -Dio.netty.recycler.maxCapacity=0, -Dio.netty.recycler.maxCapacity.default=0, -DIReallyKnowWhatIAmDoingISwear=true, -Dcloudnet.wrapper.receivedMessages.language=english, -Xmx372M, -javaagent: "/data/temp/caches/wrapper.jar", -cp, "/data/launcher/libs/io/kubernetes/client-java/4.0.0/client-java-4.0.0.jar:/data/launcher/libs/io/netty/netty-codec-http/4.1.36.Final/netty-codec-http-4.1.36.Final.jar:/data/launcher/libs/io/netty/netty-handler/4.1.36.Final/netty-handler-4.1.36.Final.jar:/data/launcher/libs/io/netty/netty-transport-native-epoll/4.1.36.Final/netty-transport-native-epoll-4.1.36.Final-linux-x86_64.jar:/data/launcher/libs/io/netty/netty-transport-native-kqueue/4.1.36.Final/netty-transport-native-kqueue-4.1.36.Final-osx-x86_64.jar:/data/launcher/libs/io/kubernetes/client-java-api/4.0.0/client-java-api-4.0.0.jar:/data/launcher/libs/io/kubernetes/client-java-proto/4.0.0/client-java-proto-4.0.0.jar:/data/launcher/libs/org/yaml/snakeyaml/1.19/snakeyaml-1.19.jar:/data/launcher/libs/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/data/launcher/libs/org/apache/commons/commons-compress/1.18/commons-compress-1.18.jar:/data/launcher/libs/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar:/data/launcher/libs/com/squareup/okhttp/okhttp-ws/2.7.5/okhttp-ws-2.7.5.jar:/data/launcher/libs/com/google/guava/guava/25.1-jre/guava-25.1-jre.jar:/data/launcher/libs/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/data/launcher/libs/org/bouncycastle/bcprov-ext-jdk15on/1.59/bcprov-ext-jdk15on-1.59.jar:/data/launcher/libs/org/bouncycastle/bcpkix-jdk15on/1.59/bcpkix-jdk15on-1.59.jar:/data/launcher/libs/com/google/protobuf/protobuf-java/3.4.0/protobuf-java-3.4.0.jar:/data/launcher/libs/com/google/code/gson/gson/2.8.2/gson-2.8.2.jar:/data/launcher/libs/io/netty/netty-codec/4.1.36.Final/netty-codec-4.1.36.Final.jar:/data/launcher/libs/io/netty/netty-transport-native-unix-common/4.1.36.Final/netty-transport-native-unix-common-4.1.36.Final.jar:/data/launcher/libs/io/netty/netty-transport/4.1.36.Final/netty-transport-4.1.36.Final.jar:/data/launcher/libs/io/netty/netty-buffer/4.1.36.Final/netty-buffer-4.1.36.Final.jar:/data/launcher/libs/io/netty/netty-resolver/4.1.36.Final/netty-resolver-4.1.36.Final.jar:/data/launcher/libs/io/netty/netty-common/4.1.36.Final/netty-common-4.1.36.Final.jar:/data/launcher/libs/io/sundr/builder-annotations/0.9.2/builder-annotations-0.9.2.jar:/data/launcher/libs/io/swagger/swagger-annotations/1.5.12/swagger-annotations-1.5.12.jar:/data/launcher/libs/com/squareup/okhttp/logging-interceptor/2.7.5/logging-interceptor-2.7.5.jar:/data/launcher/libs/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5.jar:/data/launcher/libs/joda-time/joda-time/2.9.3/joda-time-2.9.3.jar:/data/launcher/libs/org/joda/joda-convert/1.2/joda-convert-1.2.jar:/data/launcher/libs/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:/data/launcher/libs/org/checkerframework/checker-qual/2.0.0/checker-qual-2.0.0.jar:/data/launcher/libs/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar:/data/launcher/libs/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar:/data/launcher/libs/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar:/data/launcher/libs/org/bouncycastle/bcprov-jdk15on/1.59/bcprov-jdk15on-1.59.jar:/data/launcher/libs/io/sundr/sundr-core/0.9.2/sundr-core-0.9.2.jar:/data/launcher/libs/io/sundr/sundr-codegen/0.9.2/sundr-codegen-0.9.2.jar:/data/launcher/libs/io/sundr/resourcecify-annotations/0.9.2/resourcecify-annotations-0.9.2.jar:/data/launcher/libs/com/squareup/okio/okio/1.6.0/okio-1.6.0.jar:/data/launcher/versions/3.0.0-RELEASE-e48128a/driver.jar:/data/temp/caches/wrapper.jar", de.dytanic.cloudnet.wrapper.Main, nogui]
And my current workdir is: /data/temp/services/Lobby-1#4a517311-09e6-4f77-89a5-64b4bc15399a
So whenever I am in the workdir and execute the given command, it fails with the following error: Error opening zip file or JAR manifest missing :
Error occurred during initialization of VM
agent library failed to init: instrument Full Log
Now I am wondering because it's working in the automatic-environment but there are no changes to the master-Branch Source e.g. a changed Path to /data/launcher instead of launcher (System.getProperty("cloudnet.launcher.dir", "/data/launcher"))[https://github.com/CloudNetService/CloudNet-v3/blob/master/cloudnet-launcher/src/main/java/de/dytanic/cloudnet/launcher/Constants.java].
A short lookup: ls -laR /Users/.../Documents/IdeaProjects/cloudnet-parent/data
javaagent option is misused. Correct syntax is
-javaagent:/data/temp/caches/wrapper.jar
Whenever I try to build my project in Netbeans I get the following errors:
ant -f /Users/user/Documents/NETBEANS/MICO_L jfx-build
init:
Deleting: /Users/user/Documents/NETBEANS/MICO_L/build/built-jar.properties
deps-jar:
Updating property file: /Users/user/Documents/NETBEANS/MICO_L/build/built-jar.properties
compile:
Copied 1 empty directory to 1 empty directory under /Users/user/Documents/NETBEANS/MICO_L/dist/lib
Detected JavaFX Ant API version 1.3
Launching <fx:jar> task from /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/../lib/ant-javafx.jar
Warning: From JDK7u25 the Codebase manifest attribute should be used to restrict JAR repurposing.
Please set manifest.custom.codebase property to override the current default non-secure value '*'.
/Users/user/Documents/NETBEANS/MICO_L/nbproject/jfx-impl.xml:3438: The following error occurred while executing this line:
/Users/user/Documents/NETBEANS/MICO_L/nbproject/jfx-impl.xml:1465: The following error occurred while executing this line:
/Users/user/Documents/NETBEANS/MICO_L/nbproject/jfx-impl.xml:3092: The following error occurred while executing this line:
/Users/user/Documents/NETBEANS/MICO_L/nbproject/jfx-impl.xml:1636: All filesets are empty.
BUILD FAILED (total time: 1 second)
What cuase this and how do I resolve it?
This is old but all I had to do was rebuild the project. Something got messed up in the netbeans build files or something. I hope this helps.
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.