redsolution / xabber-android

Open-source XMPP client for Android
http://xabber.com
Other
1.82k stars 815 forks source link

Error:Configuration with name 'default' not found. #536

Open Drashti-Patel opened 9 years ago

Drashti-Patel commented 9 years ago

Hi, I am new to android,I am getting an issue "Error:Configuration with name 'default' not found" during synchronization. Please help me. Thank you.

grigoryfedorov commented 9 years ago

Hi. Try to follow these steps: https://github.com/redsolution/xabber-android#build-instrustions

Drashti-Patel commented 9 years ago

where i have to use this commands? git submodule init git submodule update

aileronajay commented 9 years ago

Hi Drashti,

The version control for xabber code is done using git. git is a versioning system. The build is done using gradle. A good first step will be to download the android studio (IDE for android) and install github for windows/mac. You can use Github for Win/Mac to download the source code to your local system and make changes to it using Android Studio

On Tue, Sep 1, 2015 at 11:28 AM, Drashti-Patel notifications@github.com wrote:

where i have to use this commands? git submodule init git submodule update

— Reply to this email directly or view it on GitHub https://github.com/redsolution/xabber-android/issues/536#issuecomment-136593979 .

Drashti-Patel commented 9 years ago

yes, i Done it, but i am getting one more error "Error:Execution failed for task ':app:preDexBetaDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe'' finished with non-zero exit value 1"

Sanket0911 commented 9 years ago

Even I am getting the same error as @Drashti-Patel "Error:Execution failed for task ':xabber:preDexBetaDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_25\bin\java.exe'' finished with non-zero exit value 1". Any help to resolve this?

Gaffen commented 9 years ago

+1 same here

mizanmyself commented 8 years ago

After doing all steps i'm now stuck with error - "Error:Execution failed for task ':xabber:preDexBetaDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\Java\jdk1.8.0_40\bin\java.exe'' finished with non-zero exit value 1"

Sanket0911 commented 8 years ago

Guys! I solved the issue, all I needed was installing java 1.7 and set compile and project properties with jdk 1.7.

sagarnayak commented 8 years ago

git submodule init git submodule update

How do i use this ? and where ?

grigoryfedorov commented 8 years ago

After you git clone the sources

sagarnayak commented 8 years ago

ok sir. but what i have done till now is downloaded the project and then imported to android studio . then i get the error "Gradle sync failed: Configuration with name 'default' not found." thats it. can you please tell me what to do next .

grigoryfedorov commented 8 years ago

Unfortunately Xabber does not contain full sources in downloaded zip package. You should install git and execute from command line

git clone https://github.com/redsolution/xabber-android.git
cd xabber-android
git submodule init
git submodule update

After that you can import project to Android Studio. Android Studio can import project from gitHub (VCS menu), but I'm not sure about submodules.

mizanmyself commented 8 years ago

Steps in GITHUB

step 1. Create local git repository using GITHUB GUI to "../xabber"

step 2. In GITCMD run following commends –

i) "git submodule add https://github.com/otr4j/otr4j" ii) "git submodule add https://github.com/redsolution/MemorizingTrustManager" iii) "git submodule init" iv) "git submodule update"

Steps in Android Studio

step 1. Import project to Android studio using “New -> Import Project”

step 2. Make necessary change to Android sdk version to resolve errors

step 3. Clean and build project

N.B- Use JDK 7 build 79 or 80. Do not use JDK 8 as it have internal class error for "xabber".

sagarnayak commented 8 years ago

what about steps told by grigoryfedorov ? should i do steps of mizanmyself or grigoryfedorov ?

sagarnayak commented 8 years ago

my jdk is 1.8.0 but then also i am getting error .

mizanmyself commented 8 years ago

You need to down grad jdk to 1.7 that is, setup jdk 7 ... (jdk 1.8 refer to jdk 8 and jdk 1.7 refer to jdk 7) ... Well you need to set up submodule (as discuses in my previous post) also for this xabber ... All necessary steps are given in my post. you have to follow all steps to build xabber project.

sagarnayak commented 8 years ago

is there a way that i only run xabber with 1.7 jdk and keeping the 1.8 in my system ?

mizanmyself commented 8 years ago

I don't know any Nobel way to do that. Sorry. But hope following can work. Setup jdk 7 in different folder path. Then Update your environment variable JAVA_HOME and Path with new jdk 1.7 folder. Hope it will work.

mizanmyself commented 8 years ago

Following link might be helpful for you -http://stackoverflow.com/questions/17637179/how-to-set-source-1-7-in-android-studio-and-gradle

sagarnayak commented 8 years ago

So lets get this thing clarified once again. case 1- I download the file from the zip for xabber from GitHub to my system and on importing i get a error about which i have posted in Stack Overflow . The error code i got is Gradle sync failed: Configuration with name 'default' not found. case 2- Then i do this on my git as suggested by @grigoryfedorov -

git clone https://github.com/redsolution/xabber-android.git then
cd xabber-android
git submodule init
git submodule update

Then i get a new file xabber-android in my directory . i tried to import this into android studio and then i get this error-

Error:Execution failed for task ':xabber:transformClassesWithDexForBetaDebug'.
 com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

What am i doing wrong. isn't there a way to just put dependencies into gradle and then use the classes for Xabber . can you please suggest some implementations with code or any tutorials. its just took me a day and still i am out of any result. please help me.

aileronajay commented 8 years ago

Hi Sagar,

Android Studio should allow you to choose to point to the JDK version of your choice. Are you pointing it to JDK 1.7 and running gradle? Other members on the forum have asked you to use JDK 7 (1.7) as JDK 8 (1.8) gives error with this codebase. Can you positively confirm that android studio is pointing to JDK 1.7. If not, please read the android studio documentation/ stackoverflow before posting more questions here

Thanks, Ajay

On Tue, Apr 19, 2016 at 5:08 PM, sagarnayak notifications@github.com wrote:

so lets get this thing clarified once again. case 1- i download the file from the zip for xabber from here ( https://github.com/redsolution/xabber-android) to my system and on importing i get a error about which i have posted here ( http://stackoverflow.com/questions/36709260/getting-gradle-sync-failed-on-xabber-import) . case 2- then i do this on my git - git clone https://github.com/redsolution/xabber-android.git then cd xabber-android git submodule init git submodule update then i get a new file xabber-android in my directory . i tried to import this into android studio and then i get this error- Error:Execution failed for task ':xabber:transformClassesWithDexForBetaDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

What am i doing wrong. is int there a way to just put dependencies into gradle and then use the classes for xabber . its just took me a day and still i am out of any result. please help me.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/redsolution/xabber-android/issues/536#issuecomment-211870858

williamjie commented 8 years ago

my env mac air JDK1.8 make apk will encount 3 error then change to JDK1.7,make apk is ok

these steps is must git clone https://github.com/redsolution/xabber-android.git then cd xabber-android git submodule init git submodule update