I tried creating a module in Android Studio. The module appears in my project structure but not the sidebar. Its dependencies aren't showing up under gradle scripts and I'm getting an error message saying that gradle sync failed.
I tried creating a module named MeepMeepTesting in Android Studio using New --> Module --> Java or Kotlin Library. I gave the library and class the same name. The module shows up in my Project Structure, but not in the sidebar, and I also cannot find its build.gradle under Gradle Scripts. This is the error I get when I tried creating the module: Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly. In my build window, I'm getting the message "null"
I updated my gradle and made sure I'm not in offline mode.
I'm unsure why this is happening, as I have already completed this process twice successfully.
Related
I've just updated Android Studio to 2.2 and now my Kotlin project won't build. The gradle synch works fine, but when attempting to build I'm immediately presented with an error that reads:
Error:Execution failed for task ':app:compileDebugKotlin'.
> Could not initialize class com.intellij.ide.highlighter.JavaFileType
I've checked that my Kotlin plugin is up to date. This error sounds like something to do with the IDE and highlighting Java code? Any help would be appreciated.
Open Tools | Kotlin | Configure Kotlin Plugin Updates in the main menu,
then choose Check for Updates. Be sure that yo're using Stable channel.
Close Android Studio, go to your project's directory, and delete build and app/build folders. Run Android Studio. Deleted folders would be recreated.
Hope it will help
In my case the kotlin plugin was not updated as #piotrek1543 said in other answer.
In addition to that the build.gradle had an old Kotlin version number 1.0.1-2 and the IntelliJ said in a warning on top of to switch to the current bundled version 1.0.4.
Now with the kotlin version like this the error is gone:
ext.kotlin_version = '1.0.4'
I can't import the source code to my project, getting the following error when gradle runs:
'Error:Cannot get property 'pom' on extra properties extension as it does not exist'
I'm using Android Studio and already run the gradle clean build command before import it. As a Project, the gradle compile OSM and runs just fine.
What am I doing wrong?
I updated to AS 1.2 and I just tried importing/opening one my previous projects that worked on the previous version of AS. However, when I try building the project, I get an error saying
Error:Android Source Generator: [app] AndroidManifest.xml file not found
but this doesnt make sense since my manifest is src/main folder. How can I fix this and avoid this problem for all of my other projects?
This also bothered me recently, and I'm guessing that Gradle wasn't building it right.
In my circumstance, I just hit the Sync Project with Gradle Files button at left of AVD Manager button. If possible, you can goes with Gradle command lines as well.
then it popped out some errors said that I failed to find Build Tools revision 21.0.2(also this had been installed again and again, assuming I didn't set it right).
After installed some SDKs, clicked finish, studio will automatically rebuild your project.
There it works, can run the project now.
My project is dependency on Module A & B
And Module A is dependent on Module B
After I setup the dependencies, Multiple dex exception is encountered.
FYI
My project is doing native + Cordova WebView
and I try to accelerate by Ludei WebView+ for the low end model
https://github.com/ludei/webview-plus
My project dependent on Cordova module & Ludei WebView+ module
Cordova module dependent on Ludei WebView+ module
After these setting I can successfully build by grade with no warning, but I do not pass dexDebug when I want to build application.
I got this error
com.android.dex.DexException: Multiple dex files define Lcom/ludei/chromium/BuildConfig;
I know it is officially recommended to build on ANT, I have did some trick I change the webview+ package name I can build the "debug" application but not in "release".
How can I set it properly in android studio to build it by gradle without having multiple dex exception?
---------UPDATE -------------
#Scott Barta Yes, here is whole cordova project under [project]/platforms/android.
The Whole project files. module: CordovaLib,webviewplus
https://github.com/gaplo917/cordova-cocoonjs-gradle
I can build a debug with cocoonjs by changing the package name to another name,i.e. package="com.ludei.android.chromium" but with no luck on building a release version.
https://github.com/gaplo917/cordova-cocoonjs-gradle/blob/master/webviewplus/src/main/AndroidManifest.xml
if cocoonjs is not run properly, the application can still be built but when you request a cordova web view , it will crash!
I am trying Android Studio. Installed on Windows XP and got the following error
while trying to build a new project. One of the error messages: the SDK directory is not found.
I have tried to change the path to the SDK but cannot find the option in the configuration menu. Any help is welcome
RESOLVE ERROR:
Failed to import new Gradle project: Could not fetch model of type 'IdeaProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.
Build file 'L:\Documents and Settings\Administrador\AndroidStudioProjects\Prueba3Project\Prueba3\build.gradle' line: 9
A problem occurred evaluating project ':Prueba3'.
A problem occurred evaluating project ':Prueba3'.
The SDK directory 'L:\Documents and Settings\Administrador\Configuración local\Datos de programa\Android\android-studio\sdk' does not exist.
You need to modify the local.properties file in your project.
I had manually point it to the path of my SDK, which for me, on Mac, looked like this:
sdk.dir=/Applications/Android Studio.app/sdk