I am working on a ktor multiplatform application.
While the application is running continuously, I come across an error message that says
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':jvmJar'.
archive's size exceeds the limit of 4GByte.
To build this archive, please enable the zip64 extension.
See: https://docs.gradle.org/7.3.3/dsl/org.gradle.api.tasks.bundling.Zip.html#org.gradle.api.tasks.bundling.Zip:
How and where to enable the zip64 extension?The version of gradle that I am using is 7.3.3
Do you have a Jar task?
Say you use ShadowJar, then the configuration would look like:
tasks.shadowJar {
setProperty("zip64", true)
// other shadow jar config
}
Related
While maven installation, Errors running builder 'Maven Project Builder' on project 'com.oracle.oats'.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
I find the solution in many ways.
This is proxy error. you check access in proxy URL (host) in IE. (Open IE ->TOOL ->INTERNET OPTIONS -> CONNECTIONS -> LAN CONNECTION.)
If it is ok this is working fine.
Otherwise you remove maven-resources-plugin:jar:2.6. Re-execute.
You change eclipse-version.
If any other alternate solution. kindly update
I am trying to run calabash-android to test my app, but I get the following error, the same app without any modification was working before I tried to do some modifications, but then I reverted all the modifications to the app :
Exception occurred while dumping:
java.lang.IllegalArgumentException: Unknown package: com.bitbar.testdroid
at com.android.server.pm.Settings.isOrphaned(Settings.java:4134)
at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:18091)
at com.android.server.pm.PackageManagerService.deletePackage(PackageManagerService.java:15508)
at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:888)
at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:792)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:118)
at android.os.ShellCommand.exec(ShellCommand.java:94)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:18349)
at android.os.Binder.shellCommand(Binder.java:468)
at android.os.Binder.onTransact(Binder.java:367)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2387)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3031)
at android.os.Binder.execTransact(Binder.java:565)
And then
Success
Success
Scenario: I can choose a file from the Gallery # features/my_first.feature:3
HTTPClient::KeepAliveDisconnected: Connection reset by peer # io_fillbuf - fd:8 (HTTPClient::KeepAliveDisconnected)
./features/support/app_life_cycle_hooks.rb:5:in `Before'
When I take a screenshot # calabash-android-0.9.0/lib/calabash-android/steps/screenshot_steps.rb:9
Then I take a screenshot # calabash-android-0.9.0/lib/calabash-android/steps/screenshot_steps.rb:9
Failing Scenarios:
cucumber features/my_first.feature:3 # Scenario: I can choose a file from the Gallery
1 scenario (1 failed)
2 steps (2 skipped)
0m6.240s
Exception ScreenShot
I solved the problem by running the build using the gradle task :app:assembleDebug
in the exception above, calabash can't find the package name, because it is on another dex class.
I think in calabash, they may be having problem with multidex projects, and Android Studio will always enable multidex to your app, even if it doesn't need it.
I am not an expert, any suggestion are welcome, and I hope some people can benefit from this answer.
I'm still getting started with gradle, but I found jitpack to allow for including dependencies across my github repos.
I'm having issues getting dependencies to resolve, though. Some releases work, but other times I get "could not resolve."
I have managed to reproduce this with a couple of github repos:
I set up a repo to be depended on: https://github.com/bdleitner/dummy-dependency
and one to depend on it: https://github.com/bdleitner/dummy-client
From jitpack, I can see the build log for the 0.1.3 release of dummy-dependency:
https://jitpack.io/com/github/bdleitner/dummy-dependency/0.1.3/build.log
where it seems that everything is successful.
when logged in to jitpack, it can see this release and provides the compile statement:
compile 'com.github.bdleitner:dummy-dependency:0.1.3'
but even when I include that in the gradle.build file for dummy-client,
I get:
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':compileClasspath'.
> Could not resolve com.github.bdleitner:dummy-dependency:0.1.3.
Required by:
com.bdl:dummy-client:1.0-SNAPSHOT
> No cached version of com.github.bdleitner:dummy-dependency:0.1.3 available for offline mode.
> No cached version of com.github.bdleitner:dummy-dependency:0.1.3 available for offline mode.
> No cached version of com.github.bdleitner:dummy-dependency:0.1.3 available for offline mode.
I figure I'm probably missing something small and dumb, but I haven't been able to find it.
Apparently, I somehow managed to switch my gradle settings to offline mode (not sure how)... but unchecking that option appears to have fixed the issue.
Sorry to bother everyone.
The Sync failed when tried to add the dependency for google play service. The problem seem to its looking for the jar in C:/Program/Files/Android/Android Studio however my SDK is placed in C:\Android\sdk. However I also have Android Studio in Program Files where there are no jar for Google play services.
Information:Gradle tasks [clean, :app:generateDebugSources, :app:compileDebugSources]
Error:A problem occurred configuring root project 'XXXXXX'.
Could not resolve all dependencies for configuration ':classpath'.
Could not find com.google.gms:google-services:9.0.0.
Searched in the following locations:
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/google/gms/google-services/9.0.0/google-services-9.0.0.pom
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/google/gms/google-services/9.0.0/google-services-9.0.0.jar
https://jcenter.bintray.com/com/google/gms/google-services/9.0.0/google-services-9.0.0.pom
https://jcenter.bintray.com/com/google/gms/google-services/9.0.0/google-services-9.0.0.jar
Required by:
:XXXXX:unspecified
Information:BUILD FAILED
Information:Total time: 6.148 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
Also my ANDROID_HOME is set to C:\Android\sdk.
Please advise.
By checking other SO question. You can find that Google Play Service updating to version 9.0.0 has a bug issue.
Some solution is by checking if you have enabled offline work for gradle, deselect Offline Work if it's checked. Then, confirm if you have latest version of Google services mentioned as dependencies in project level build.gradle: classpath 'com.google.gms:google-services:3.0.0'. Clean and build the project after the gradle sync completes.
Also, some people fixed it by just deleting the debug.keystore file found in the android folder.
Check this SO question for more information.
Hello I've a problem with the configuration of jenkins in order to use the plugin of Sonar.
I've set the properties into the file sonar-project.properties, that looks like the following code:
pom.groupId=groupID
pom.artifactId=artifactID
sonar.sourceEncoding=iso-8859-15
sonar.java.target=1.5
sonar.java.source=1.5
sonar.projectKey=projectkey
sonar.projectName= projectname
sonar.projectVersion=1.0.0
While I'm trying to do the building I got the following error in the console of Jenkins:
Exception in thread "main" org.sonar.runner.RunnerException: You must define mandatory properties: sources
at org.sonar.runner.Runner.checkMandatoryProperties(Runner.java:92)
at org.sonar.runner.Runner.execute(Runner.java:75)
at org.sonar.runner.Main.main(Main.java:61)
Build step '**** custom Sonar analysis' marked build as failure
Finished: FAILURE
Do you have any suggestion? Where do I set this properties?
Thanks in advance.
"sonar.sources" property is mandatory: it tells SonarQube where your source files are located.
Everything is explained in the online documentation:
Analysis Parameters
How to run an analysis with SonarQube Runner