I have cloned an android project from gitlab. After building the project it shows the below error with build failed.
java.io.IOException: Internal error: Symbol file with package cannot be empty.
The project is okay on the other android studio from where it pushed to gitlab. what should I do to prevent this error. thanks in advance.
the solution that worked for me was to change the Gradle version from project structure.
in my case, I changed the version to match the local Gradle distribution I downloaded before and then going into Gradle setting in the project settings to check the use local Gradle distribution option of the same version.
Related
I know this question has been asked before but I haven't been able to fix the issue. I am running Android Studio version 3.1.4. I am trying to run an app that I cloned from a Github repository. But even before I try to run it, I get this error:
my-app: sync failed
Cause: https://downloads.gradle.org/distributions-snapshots/gradle-4.4-20171031235950+0000-all.zip
How do I fix this error? Thanks in advance.
You can check and change the distribution url in the properties file $rootDir/gradle/wrapper/gradle-wrapper.properties. See property distributionUrl.
Value should be something as follows (update the gradle version depending on your Android Studio version)
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
I've encountered a similar error when I tried importing the Sunshine project from the Udacity Android development course. I fixed the issue by downloading the mentioned zip file and extracted it to the C:\Users\<username>\.gradle\native folder.
Then in Gradle settings, use local Gradle distribution and set the Gradle home path to the downloaded gradle folder.
Check this video for more information
You can fix it by the following steps: (currently using Android 3.6.3)
This worked for me.
Exit android studio then make the below changes.
Go to C:\Users\UserName.android and rename the build-cache folder to build-cache.bak.
Go to C:\Users\UserName.AndroidStudio3.6\system and rename these folders:
caches to caches.bak
compiler to compiler.bak
compile-server to compile-server.bak
conversion to conversion.bak
external_build_system to external_build_system.bak
frameworks to frameworks.bak
gradle to gradle.bak
resource_folder_cache to resource_folder_cache.bak
Open the Android Studio and open your project again.
If the folder is not in the Android3.6 folder, move to the next step.
Find the Gradle version from the gradle-wrapper.properties file
Download the Gradle bin file from internet, then extract it.
File menu-->Settings-->Build & Tools-->Gradle-->Use Gradle from: From
drop down select a specified location and browse to the location
where you have saved the Gradle bin zip file. (Default settings is use from ;gradle-wrapper.properties' file)
4.File menu-->Invalidate caches and re-run
[Gradle properties file]
[Gradle settings]
This issue appears after update to Unity 2018.1. On 2017.3.1 version everything worked fine.
Gradle version: 3.3
Android Plugin version: 2.3.3
Does anyone have an idea how to fix following error?
CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_131\bin\java.exe -classpath "C:\Program Files\Unity2018\Editor
\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.0.1.jar"
org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ': processReleaseResources'.
> Error: A library uses the same package as this project: com.unity3d.player
The problem was caused by Simple Android Notifications Free asset (https://assetstore.unity.com/packages/tools/integration/simple-android-notifications-free-68626).
AndroidManifest file in simple-android-notifications.aar contains package="com.unity3d.player"
After renaming it to "com.hippogames.simpleandroidnotifications" I now able to build APK.
The strange thing is that the same library was successfully used with Unity 2017.3.1 and plugin worked as expected.
I tried million things, but only this solved my problem:
When adding facebook sdk package to assets, it creates Facebook SDK folder, and plugins are in it. So :
1. I moved everything from inside Facebook SDK folder to Assets folder.
2. Then I go to Assets/PlayServicesResolver/AndroidResolver/Force Resolve (Don't know if this is necessary).
It appears that unity couldn't find the path to plugins for android. I lost 5 days in searching the solution.
follow these steps and rebuild the project
Goto File from unity top Menu
Select Build Settings
From Build Setting click on Player Settings
In Player Setting Inspector Menu Select Other Settings
See for Identification->Package Name
change Package Name to something unique like com.yourname.appname
and save the project and build again
I've installed Android Studio on my laptop and also run the updates from 0.52 to 0.61
After creating a new project or opening a sample project that I've downloaded it displays this error:
Gradle '{ProjectName}' project refresh failed
Error:Cause: error in opening zip file
I couldn't find anything related to this specific error on Google or anywhere else on Stackoverflow.
Please help?
download manually
http://downloads.gradle.org/distributions/gradle-1.12-all.zip
and paste: (not unzipping)
C:\Users\ (USER NAME) \ .gradle\wrapper\dists\gradle-1.12-all[hash code]/
C:\Users\ (USER NAME) \ .gradle\wrapper\dists\gradle-1.12-all[hash code]/gradle-1.12-all.zip
update
For Mac OS X and Other Unix based OS, the path is
~/.gradle/wrapper/dists/gradle-1.x/[hash code]/
I had the same problem after updating Android Studio from 2.2.3 to 2.3; Here is the solution that worked for me:
1) In your project open 'gradle-wrapper.properties', change the 'distributionUrl' value
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
2) In you project open the project's 'build.gradle' file, and change the classpath
classpath 'com.android.tools.build:gradle:2.3.0'
This is the latest gradle setting.
Hope this work.
NOTE: The version of the gradle depends on your android studio version. So change the version(as in he code) according to that.
I fixed this issue by...
Going to Settings... > Gradle
Selecting "Use local Gradle distribution."
Pointed it to my Gradle zip file: home/kersting/.gradle/wrapper/dists/gradle-1.12-all/6vpvhqu0efs1fqmqr2decq1v12/gradle-1.12
It should be something similar for you if you downloaded Gradle which you should have when you downloaded Android Studio. Be careful, the .gradle file may be hidden. I found it through the terminal, but "ls" didn't reveal it.
After I updated form 0.2.2 to 0.2.3, I create new project failed.
Error message is below:
下午 08:51:58 Gradle 'NotifyViaGoogleMapsProject' project refresh failed:
The SDK directory 'C:\Program Files (x86)\Android\android-studio\bin\Program Files (x86)Androidandroid-studiosdk' does not exist.
Build file 'F:\AndroidStudioDevelop\NotifyViaGoogleMapsProject\NotifyViaGoogleMaps\build.gradle' line: 9
NotifyViaGoogleMapsProject is my project name,and my android studio is install in default path(C:\Program Files (x86)\Android\android-studio), there has no same error in 0.2.2.
I've figured out the problem.
Open 'local.properties' in your project using a text editor.
sdk.dir=..\\sdk
Save and Close
Now Import your project into Android Studio.
Make sure that the SDK folder you mention exists - I'm not sure if it is a typo or not but the path you specified is a bit weird - it should be
C:\Program Files (x86)\Android\android-studio\sdk
On the menu go to File -> Project Structure, then choose SDKs under Platform Settings. Check that the path for the Android Platform you use is correct, and if not, change it to the correct path. Also make sure that the Project is set to use the correct Android Platform.
I have the same problem.
http://i.stack.imgur.com/pPOOi.png
The SDK is correct in Platform Settings, I have no idea what's causing this problem.
http://puu.sh/3TAFi.png
I installed this:
https://github.com/mwbrooks/cordova-plugin-menu
and have cordova 1.8.1 installed.
I copied "libs/phonegap-1.0.0.jar" to ANDROID_PROJECT/libs.
When i try and run the app in the simulator, i get :
"Conversion to Dalvik format failed with error 1"
I believe this is to do with conflicts with libraries, but I don't know what to do to remove the error?
please help.
I have found myself in the same situation after upgrading from 2.0.0 to 2.1.0
First of all make sure you have reconfigured the build path by removing the JAR from the old PhoneGap version and adding the new one.
At this point I started getting the Dalvik error. Cleaning the build environment didn't help.
So I remove the old jar from the libs directory and voilá, it worked.
Project -> Turn off Build Automatically. Then Build project manually and clean. Then export signed project. Problem has been gone.