New android studio flavor - android

I just updated my android studio and ran into the following error.
Error:java.lang.RuntimeException: Unexpected scopes found in folder 'D:\****\****\****\app\build\intermediates\transforms\dexMerger\dev_demo\debug'. Required: EXTERNAL_LIBRARIES. Found: EXTERNAL_LIBRARIES, PROJECT, SUB_PROJECTS
I tried closing, cleaning and building but it won't work.
Anybody encountered the same problem ?

Deleting the .gradle folder from the project folder fixed this for me.

Try This:
Delete the .gradle folder from the project folder
In Android Studio go to File>Project Structure>Project and change the Gradle Version to the latest version (4.4).

It goes away if you downgrade the gradle plugin from 3.0.+ to 2.3.3. But still not the solution we need.

I found a solution which works in my case.
I deleted the .gradle and .idea folder from the application source directory and then re-run the app.
It works fine for me.
I am not sure about the cause (might be related with studio cache), it works in my case.

Related

I have encountered these errors in android studio?

I've recently started working with android studio and encountered these errors:
Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-6.7.1-bin.zip'
Missing essential plugin: org.jetbrains.android
I have tried different things to resolve these errors, like reinstalling Android studio from scratch. Any way to tackle these errors?
Delete the following file and retry
C:\Users\YOUR_USER\AppData\Roaming\Google\AndroidStudio4.2\disabled_plugins.txt
For MacOS users, the file is located in
~/Library/Application Support/Google/AndroidStudio4.2
Installing Android Studio is a messy thing in windows. Multiple modules are installed in multiple folders in cdrive.
So, removing android studio completely is a messy thing.
For the 1st error, you can download the respective gradle zip file and save it in .gradle folder inside C:/Users/username/. But this will not work with newer android versions.
For the 2nd error, you should delete a file named 'disabled_plugins.txt' which will be found inside C:/Users/username/AppData/Roaming/Google/AndroidStudioxyz.v
The same file is also found in Local/Google/AndroidStudioxyz.v also.
So, deleting these files will solve this error.
But, a better way to resolve both the errors is to remove and reinstall Android studio from scratch.
To remove android studio, make sure to remove any folder having the name Android in the following folders:
C:/Users/username/. Here delete .android & .gradle folders. Do not delete AndroidStudioProjects folder, because your projects will be deleted.
C:/Users/username/AppData/Roaming/Google/.
C:/Users/username/AppData/Local/Google/
C:/Program Files/Android
C:/Microsoft/ not must to delete.
Now install your android studio again.
Thank you!

Why are my files still being 'Analyzed' in Android studio, intellisense and autosuggest doesnt seem to work

For this particular project, Android studio just shows analyzing files, doesn't show any errors and the IntelliSense is also not auto-suggesting. I have tried to invalidate cache/ restart, checked that android studio is not in power mode, and also deleted the project locally and cloned it again, what can be the issue?
It was working fine till 2 days ago but today when I opened the app and tried to build it and make some changes to a few files, it just wont work.
I am on Android Studio 4.2.1 on macOS Big Sur 11.2.1
If I create a new project the studio is working fine but just for this project its not working
Here are the screenshots
Any help is much appreciated! Thanks!!
I have posted the same answer in another post, you can take the reference from the below link.
https://stackoverflow.com/a/67984260/11414681
You just need to Upgrade the latest kotlin version.
Upgrade the dependency in the project's build.gradle file.
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10"
Upgrade the dependency in the app's build.gradle file.
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.10"
Delete .idea , .gradle andr buid folder from your project path.
After delete your project from Android Studio and re-open and its work.
Sometimes android studio has been not working properly so ignore this bugs its nothing.
Just make File -> Invalidate caches and restart
Check my answer here, stackoverflow.com/a/68755611/2281717
In my case, I just update all dependencies on my Android App Project. And it's working

No builders are available to build a model of type 'org.jetbrains.plugins.gradle.model.internal.DummyModel'

After upgrading Android Studio to 4.0 version and in "gradle-wrapper.properties" :
distributionUrl=https://services.gradle.org/distributions/gradle-6.1.1-all.zip
I am getting the following error in Android Studio while syncing:
No builders are available to build a model of type 'org.jetbrains.plugins.gradle.model.internal.DummyModel'.
and unable to create or run the app build.
This can be one solution. I tried Copy and Cut everything in the setting.gradle file located in the project directory then SYNC project after Gradle is complete. Later paste the content back to the file and SYNC again. This not worked for me but for others, it worked.
Another solution is to downgrade the android studio to v 3.6.3 download by clicking here. You can follow these steps to downgrade the android studio. This solution worked for me and now I can build and run the application successfully.
I solved it by navigating to the Project settings in the settings.gradle file and COPY and CUT everything then SYNC the project after gradle is complete PASTE back the content you had copied and SYNC again.
This worked for me
Still not worked
Please use different gradle version.
ie case gradle-wrapper.properties. Instead of your version
distributionUrl=https://services.gradle.org/distributions/gradle-*.*.*-all.zip
update with
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
Thanks
I tried all the solutions above but I didn't succeed so I uninstall android studio and then installed it again and saw all the problems solved and I have no problem . so I recommend you reinstall the program as a last step .
REINSTALL

Android Studio 3.5 Cause: buildOutput.apkData must not be null Clean & Rebuild already tried

After I've updated Android Studio 3.4 to 3.5 and wanted to build a Signed APK, however I get the error :
Cause: buildOutput.apkData must not be null Error
I've already tried to Clean & Make the Project and to Clean & Rebuild the Project, with no success.
I am using Android Gradle 3.5.0 & Gradle Version 5.4.1
This issue happens after update my Android studio v3.4 to v3.5
Now, it is working fine
I fixed this issue by deleting debug/output.json and release/output.json files
otherwise change your apk destination folder path.
Android Studio 3.5
compilesdkVersion 28
apk generating working
option 1 - change the destination folder of the apk generated and generate apk again.
option 2 - delete the output.json file under release folder and generate apk again.
It solved my problem. I hope it will help you too.
Manually delete the build directory and rebuild, That worked for me
I dont know why the issue was occurring but changing the
destination folder of output apk
fixed the issue.
It's working on AS 3.4.2 version. I've tried everything (Clean & Make the Project and to Clean & Rebuild) and downgraded to 3.4.2 at last.
This issue might be fixed in the 3.6 release.
https://androidstudio.googleblog.com/2019/07/android-studio-36-canary-5-available.html
Delete the contents of the build folders (existing *.apk and output.json):-
AndroidProject\app\build\outputs\apk\androidTest\debug\
AndroidProject\app\build\outputs\apk\debug\
AndroidProject\app\release\
And then rebuild the system by:-
File -> Sync Project with Gradle Files

Unknown Android XML attribute

First, I really dont know wth goin on with android studio ver 3.2.1. I got too much bullshit errors after update this version. Funny thing is i do nothing. After update, everything is fine, but when i restart IDE. everything go wrong.
I tried clear caches, re-install Android Studio, Invalidate Caches, Re-sync project with Gradle, clean project, re-build project. But, nothing change. So, i hope someone can help me. Thanks so much!
Try these:
Method 1:
Delete the .idea folder that is in the project location
Build > Clean Project
Then change something in the app level gradle
Then android studio will ask you to sync the project. Go ahead and sync, the problem will be gone
Credits: https://stackoverflow.com/a/47825463/10471480
Method 2:
Try cleaning up of the following folders:
c:\Users\<user>\.gradle\caches\
c:\Users\<user>\.AndroidStudio3.2\system\caches\
100% Working
Do this two steps:
1.Go to folder where you android studio caches are located. I have android studio 3.6.3 For me it's "C:\Users\Lenovo.AndroidStudio3.6\system\caches"
2.Go to the folder where you android studio projects are located. Open the project >then .idea folder and delete the caches. For me its "C:\Users\Lenovo\AndroidStudioProjects\MyDictionary.idea\caches"

Categories

Resources