I trying to convert my android Eclipse project to Android Studio project.
I updated the Android SDK Tools to 24.0.2, and export by clicking 'File > Export... > Android > Generate Gradle build files > Next > Next > Select Project(s)+lib(s) > Next > Finish'.
I can export build.gradle, setting.gradle, gradle(folder) ...
but all the exported files are in my 'Documents' folder not in the android project workspace.
Eclipse will auto generate 'Project root' e.g. '/User/usernaem xxxx/Documents' after select the project need to export.
How can I change the 'Project root' generated by Eclipse?
And I tried move those files: build.gradle, setting.gradle, gradle ... to a new folder
- updated "lasspath 'com.android.tools.build:gradle:1.0.0'" in build.gradle
- updated "distributionUrl=https://services.gradle.org/distributions/gradle-2.2.1-all.zip" in gradle-wrapper.properties
then import to Android Studio but fail (without error but project content not showing).
How can put the android studio project in old project workspace or in new folder?
Many thanks.
Related
I am a newbie to Flutter. Just wanna ask how many build.gradle files are in a Flutter project; what is Project-level and App-level build.gradle? Thanks in advance.
I found 2:
> android > app > build.gradle
> android > app > src > build.gradle
In a Flutter project, there are two build.gradle files: one at the project-level and one at the app-level.
The project-level build.gradle file is located in the root directory of your Flutter project and is used to define the properties and settings for the entire project. This file is usually used to configure the repositories and dependencies for your Flutter project as a whole.
The app-level build.gradle file is located in the android directory within your Flutter project and is used to define the properties and settings specific to your Android app. This file is used to configure the app-level dependencies and build settings.
So in summary, there are two build.gradle files in a Flutter project: one at the project-level and one at the app-level.
I'm using Gradle Buildship plugin in order to build my Eclipse projects.
Gradle itselft is well configured. So, I'm able to build anything from shell.
The gradle project has a root folder and other subprojects.
When I click on Gradle -> Refresh Project it tells me:
Synchronize Gradle builds with workspace failed due to an unexpected error.
Cannot nest 'living_webapi/src/main/java/com/living/persistence/entities' inside 'living_webapi/src/main/java'. To enable the nesting exclude 'com/' from 'living_webapi/src/main/java'
Java Model Exception: Java Model Status [Cannot nest 'living_webapi/src/main/java/com/living/persistence/entities' inside 'living_webapi/src/main/java'. To enable the nesting exclude 'com/' from 'living_webapi/src/main/java']
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:786)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3097)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3059)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3112)
at org.eclipse.buildship.core.workspace.internal.SourceFolderUpdater.updateClasspath(SourceFolderUpdater.java:234)
at org.eclipse.buildship.core.workspace.internal.SourceFolderUpdater.updateClasspath(SourceFolderUpdater.java:82)
at org.eclipse.buildship.core.workspace.internal.SourceFolderUpdater.update(SourceFolderUpdater.java:261)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeOpenJavaProject(SynchronizeGradleBuildOperation.java:223)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeOpenWorkspaceProject(SynchronizeGradleBuildOperation.java:213)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeWorkspaceProject(SynchronizeGradleBuildOperation.java:186)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeGradleProjectWithWorkspaceProject(SynchronizeGradleBuildOperation.java:176)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeGradleBuildWithWorkspace(SynchronizeGradleBuildOperation.java:141)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.access$000(SynchronizeGradleBuildOperation.java:106)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation$1.run(SynchronizeGradleBuildOperation.java:123)
at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:724)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:5521)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:5478)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.run(SynchronizeGradleBuildOperation.java:120)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.synchronizeBuild(SynchronizeGradleBuildsJob.java:78)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.runToolingApiJob(SynchronizeGradleBuildsJob.java:69)
at org.eclipse.buildship.core.util.progress.ToolingApiJob$1.run(ToolingApiJob.java:73)
at org.eclipse.buildship.core.util.progress.ToolingApiInvoker.invoke(ToolingApiInvoker.java:62)
at org.eclipse.buildship.core.util.progress.ToolingApiJob.run(ToolingApiJob.java:70)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
The only thing that worked for me was un-checking the "Allow output folders for source folders" option.
Steps:
Right click on project -> Properties
Click on Java Build Path in the left side of Properties popup
Click on Source tab
Un-check the "Allow output folders for source folders" checkbox
Click Apply and Close
Right click on project -> Gradle -> Refresh Gradle Project
I got this problem too.
My solution is setting project properties.
In Java build Path -> Source,set output folder to default.
For more detail,the image below.
Project Properties -> Java build path -> Source
Source folder output location
I exported a project from eclipse and import it to android studio.in that I added on my project the library dependency com.nineoldandroids:library:2.4.0, from the Project Structure dialog of Android Studio, but when I build the project with gradle (with the Sync Gradle button), I get the error "Failed to resolve: com.nineoldandroids:library:2.4.0" .but when i am adding that same lib dependencies to a project which i have created in android studio,there its working fine.can anyone plz help me.what is the problem?
Open your android studio,click File->Settings,in the search box type in "gradle"
On the left side,under "Build Tools",there is "Gradle",click it
Then,on the right side,you will find "Offline work",yours maybe checked,make it unchecked
Click "OK" to finish the operation
Finally Sync Project with Gradle Files again
You can have a try
I had a project that was working fine until I imported the BaseGameUtils library project for use with my project.
Is it possible to continue to use Gradle to build my project? I tried the Google Play Game Services in LibGDX instructions. Even though they are for IntelliJ - I would think the instructions would work for Eclipse but they don't.
The error I get is
A problem occurred configuring project ':android'.
Configuration with name 'default' not found.
This is from adding the line compile project(":BaseGameUtils") in my :android dependencies in build.gradle.
You don't need add this project to Gradle. Just import BaseGameUtils to Eclipse, then set it as a library
Right button on BaseGameUtils > properties > Android > check "Is a library" > click ok
Then go to your Android project (not the core project)
Properties > Android > Add library > select BaseGameUtils
Try to follow LibGDX Google Play Game Services Tutorial.
I want to install following plugin:
http://public.dhe.ibm.com/software/dw/opensource/os-eclipse-plugin-guide/Marker.zip
from:
ibm.com/developerworks/opensource/tutorials/os-eclipse-plugin-guide/
But help > install new software > local results in this:
producing the following error:
No jar file found in marker
How to solve?
Unzip your marker.zip and from eclipse, select File > Import > Existing project into Workspace
Select the unzipped folder which will add a new project in eclipse. Click on that project, click
Export> Deployable plugins and fragments > Install into host
Repository
It will install the plugin in Eclipse.