Android studio build output error For input string: "{{VersionCode}}" - android-studio

I was converting a build box project to apk. After syncing gradle I clicked build apk then this error shows up. I dont know what to do. Two days before i tried to convert and it worked.

Related

Android Studio: Analyze APK nothing happens

Hi i'm trying to run apk analyzer from android studio.
However after selecting the bundle or the apk, nothing happens.no errors nothing whatsoever.
The APK is built from unity. Any idea of how i can troubleshoot??
*edit i am trying to run apkanalyzer but gets this weird error on cmd
xception in thread "main" java.lang.IllegalStateException: Cannot locate latest build tools
at com.android.tools.apk.analyzer.AaptInvoker.getPathToAapt(AaptInvoker.java:99)

Why "enableBuildCache=true" doesn't work for my Android Studio?

I notice it's a little different between I with my colleague to compile a same project -- the build time. I build a project by 1m30s, but he just need 20s. Our computer and vm.options both are same.
I notice 'gradle build cache' maybe is a point for this problem. So, I add android.enableBuildCache=true to gradle.properties, it's doesn't work(I know it's default true). Then, I change it to android.enableBuildCache=false. Some interesting things happen, the build speed doesn't change! I'm already allow Android Studio to 'Access Full Disk', I notice in ./gradlew --profile, it's compile my code again after I change only one line code.
What can I do to make my 'gradle build cache' work normally?
Android Studio Version: 3.6.1, my computer info as below:

Flutter in Android Studio: Build Bundle/APK greyed out

I installed Flutter and Android Studio following this link here:
https://flutter.dev/docs/get-started/editor
I've been coding in flutter for two months now and can run my app in simulator or on a connected device no problem.
But when I try to actually build an apk via "Build" --> "Build Bundle(s) / APK", this option is greyed out.
Android Studio: 3.3.2
You can't build apk using Build option in Android Studio if you are running your Flutter project.
There are 2 solutions to build it.
In terminal, write flutter build apk (this will build apk for release version not the debug version)
Open your module in Android Studio and you can use Build option of the Android studio to build the debug apk.
For option 2, you can go to build.gradle file and you should see an option in Android Studio asking you to open the module separately (see the screenshot) Tap on this option and you can then build your apk in both debug and release mode.
I realize this might have already been answered, but I have another solution to this issue. I was having the same problem after modifying my pubspec.yaml file, so after trying to build within terminal nothing would happen. Apparently, you have to open the .yaml file within Android Studio from your project directory in order to for AS to realize that there's been a change to the file. After I opened the file from the project folder, the option for Build > flutter > Build Bundle(s) /APK > Build App Bundle finally reappeared again. Just sharing my experience and hope it can help someone else who may come across this rather strange issue.
Reopen the project from your projects directory, not from recent projects option. This solved for me
Please follow these steps:-
Go To Project Structure>Project>NOSDK
Change NOSDK to the latest
ANDROID API PLATFORM
Then go to MODULE and DO THE SAME

Android Studio: Can not calculate Diff

My compare files utility from Android Studio 2.3.3 is not working anymore, it shows the message "Can not calculate diff" and generate the following error on Event Log:
NullPointerException: update failed for ActionGroup: null (null)[null]
Here is the log captured by the Report to Google dialog
I'm using Mac, I already uninstalled Android Studio, Android-sdk, cloned the project again from git and deleted the Android folder under ~/User/MyUser/Library/Android, but the problem continues.
It does not happen with the other computers from my team.
Anyone knows how to fix this? It wasn't happening last week.
Delete Android Studio.app
Delete the following folders:
~/Library/Application Support/AndroidStudio
~/Library/Caches/AndroidStudio
~/Library/Logs/AndroidStudio
~/Library/Preferences/AndroidStudio
Reinstall Android Studio.

Android Studio 1.2: Error:Android Source Generator: [app] AndroidManifest.xml file not found

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.

Resources