Android Studio 4.1.1 has built- in compilation failures - Android Studio

I have installed the latest Android Studio onto a new machine, and have installed Flutter plugin into the new installation. I then created a Flutter project, taking all the default settings.
After creating the project, I set up an emulator and tried to compile and run the flutter app. Unfortunately I get the following error:
Code:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\rbrown3\AndroidStudioProjects\flutter_app\android\build.gradle' line: 26
* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> Uninitialized object exists on backward branch 142
Exception Details:
Location:
com/android/build/gradle/internal/pipeline/VariantInfoImpl.<init>(Lcom/android/build/gradle/internal/scope/VariantScope;)V @200: goto
Reason:
Error exists in the bytecode
Bytecode:
...bytecode listing omitted for brevity...
Note that I also took a look at the build.gradle file that contained the offending line . Line 26 just contains:
Code:
project.evaluationDependsOn(':app')
I did not edit that line at all. In fact, I did not change anything, not even in the main.dart file.
Have I found a bug in the Flutter plugin? Or is it an Android Studio bug? Why does a pristine installation of Android Studio fail to compile default code due to a flaw in a gradle build file??? More importantly, what is the flaw causig these compilation failures and how do I fix it?

Related

[UTILITY] qcndiff: analyze differences between Qualcomm QPST files

[size=+1]QCNDIFF[/size]
This is a utility that parses and displays differences between two text format .qcn files produced by Qualcomm's QPST (Qualcomm Product Support Tools). It's intended use is to display the differences between two files from two different phones in order to help determine which of the nvitems are involved in enabling the different radio frequency bands. This application is meant to be run on Linux or on Windows. Examples for Linux usage and compilation are given for a RHEL / Centos / Fedora distribution. Adapt as necessary to your own distribution.
[size=+1]HOW TO USE[/size]
There are pre-built binaries for 64 and 32 bit Windows as well as pre-built binaries for 64 and 32 bit Linux. The Linux binaries were built on Fedora 20 and the Windows binaries were built with MinGW and statically linked. For Linux you will need to install the boost shared libraries.
Code:
yum install boost
Program usage is as follows
Code:
Usage: qcndiff64 [options] file file
-h [ --help ] show help message
-t [ --type ] arg (=p) show differences
p for items present in both files
m for items missing in either file
b for both present and missing items
-f [ --format ] arg (=i) output format
i for interleaved output
s for sequential output
c to suppress item data and print only
count
-l [ --lookup ] arg (=nv.txt) nv item descriptions
Interleaved output shows the nvitem that is different for both files before displaying the next one. Sequential output displays all the differing items in the first file before proceeding to display the second file.
If the file nv.txt exists (use -l to override the name) it will be used to look up text descriptions of the codes in order to render the output more friendly.
[size=+1]HOW TO COMPILE[/size]
Linux
Code:
yum install boost boost-devel
make
If you wish to compile for a different architecture, for example you run x86_64 and you wish to compile a 32 bit variant, then first make sure you have the 32 bit libraries and then override the target with the ARCH commandline option
Code:
yum install boost.i686 boost-devel.i686
make ARCH=32
Windows
You will need to install MinGW. You need separate toolchains for the 64 bit versions and the 32 bit versions. You will also need to compile the boost libraries.
Once Boost is compiled, edit the Makefile to change the paths to the libraries and include files to conform to where you have them installed. Take note that if the default --layout==versioning option is used to compile Boost then you may also need to change the suffix option in the Makefile
[size=+1]CHANGELOG[/size]
0.2 - add dictionary facility to allow the lookup of text descriptions
0.1 - initial release
[size=+1]DOWNLOAD LINKS[/size]
Binaries and source are available on github
[size=+1]CREDITS[/size]
autoprime for the complete list of nv items used in the dictionary implementation
XDA:DevDB Information
qcndiff, Tool/Utility for the Samsung Galaxy S 5
Contributors
dl12345, autoprime
Source Code: https://github.com/dl12345/qcn
Version Information
Status: Beta
Current Beta Version: 0.2
Beta Release Date: 2014-11-14
Created 2014-11-09
Last Updated 2014-11-13
Version 0.2
Version 0.2 released. This implements a dictionary lookup facility to print textual descriptions of the non-matching nv items so as to make the resulting analysis easier to complete. The included dictionary is not complete but has a substantial number of items defined.
Thanks to autoprime for the list used in the implementation.
Hello
I have tried qcndiff for windows and despite you saed that are statically linked I have an error:
C:\Users\Ovidiu\Desktop\New folder>qcndiff64 80CB5BDE_1.qcn 80CB5BDE_0.qcn
Assertion failed!
Program: C:\Users\Ovidiu\Desktop\New folder\qcndiff64.exe
File: D:\boost_1_57_0/boost/spirit/home/support/char_encoding/ascii.hpp, Line 25
6
Expression: isascii_(ch)
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
C:\Users\Ovidiu\Desktop\New folder>
Thank you

[Q] Gradle 'Login' project refresh failed

I'm having problem with the following issue. I am new in Android platform. thus I have no idea how to solve this issue.
Please allow me to know As soon as possible:
ISSUE:
___________________________________________________________________
Error:Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
________________________________________________________

[Q] installing of app on device failed

I've recently returned to work on an app I developed while ago (targeted then to 4.4). at the time I had a galaxy s2 for debugging and now I have s4 (i9500).
I tried to run the app while my phone connected and got installation failed. So I installed Android studio and imported (converted) and changed target to 5.0.1 (my phone's version).
When I hit run (or debug) I get this message:
HTML:
nstalling myapp.leff.app
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/myapp.leff.app"
Aborted
Launching application: myapp.leff.app/myapp.leff.app.myappAppActivity.
DEVICE SHELL COMMAND: am start -n "myapp.leff.app/myapp.leff.app.myappAppActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Aborted
filltering the log-cat (Android) i've noticed this lines:
HTML:
06-24 02:20:34.641 3269-3685/? D/SettingsProvider﹕ name = verifier_verify_adb_installs
06-24 02:21:30.331 3576-3576/? W/Settings﹕ Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
06-24 02:21:30.426 3576-3576/? W/Settings﹕ Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
06-24 02:21:46.231 9094-9094/? I/MultiDex﹕ install
06-24 02:21:46.261 9094-9094/? I/ProviderInstaller﹕ Insert disabled by gate 'gms:security:enable_conscrypt_in_gms_application'
06-24 02:21:49.656 3576-3576/? W/Settings﹕ Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
06-24 02:21:49.716 3576-3576/? W/Settings﹕ Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
06-24 02:22:00.016 3269-3269/? I/ActivityManager﹕ Killing 4849:com.samsung.android.app.filterinstaller/1000 (adj 15): empty for 1806s
I've re-installed new version of my custom rom - result is the same
I took another phone (samsung s5) and install was success. connected my s4 again. same error.
And ideas on how to resolve this?
note: usb-debugging is active
Hello,
Your project before conversion was built with Eclipse, if I understood it correctly? If so,
in Android Studio, the API targeting is not being read from the Android Manifest, but from the Gradle files.
In Android Studio, open (on your Project tree on the left), under the Gradle Scripts the build.gradle (Module: app) and check if inside the defaultConfig the targetSdkVersion has the correct API level. Then, press Build->Clean project from the menu bar on the top
If your application works with this String: INSTALL_NON_MARKET_APPS from the Settings.Global class , it is deprecated in API level 21, so use INSTALL_NON_MARKET_APPS from the Settings.Secure class instead. Check here.
I think it has to do with this class, the getString method with the above String that has been deprecated. I could help you further if I knew how is your app accessing this class or any code related to that
The S5 you tested has custom rom? Can you post the full logcat with the S4?
If you still need help, let me know

Error:(45, 33) Gradle: error: package com.google.android.gms.ads does not exist

I am working on android studio and have installed Google Repository alongside the Play Services. I have already tried many solutions but none of them seem to work for me. I have this line in my build.gradle file under dependencies of Android:
compile "com.google.android.gms: play-services-ads:10.2.6"
I am trying to import MobileAds in my Main class:
import com.google.android.gms.ads.MobileAds;
But it gives me the error: error: package com.google.android.gms.ads does not exist. Where am I going wrong?
My build.gradle file: pastebin.com/DmnjCrwK
try using "compile 'com.google.firebase:firebase-ads:10.2.6'" in your gradle file

A problem occurred configuring project

I am trying to compile some C++ source files into a native library using Android studio, NDK and Cmake, but upon building, I get the error:
Code:
A problem occurred configuring project ':mobile'.
> C:\Users\User\Documents\B3d\mobile\.externalNativeBuild\cmake\debug\armeabi-v7a\compile_commands.json
I went to the folder mentioned in the error and 'compile_commands.json' does not exist there. What could be the problem?
After upgrading gradle plugin, I get the error:
Code:
C:\Users\User\Documents\B3d\mobile\CMakeLists.txt : C/C++ debug|armeabi-v7a : Could not get version from cmake.dir path '"C:\Android\android-sdk\cmake\3.19.0"'.
I removed the quotes from cmake.dir path in local.properties and this error was gone, next I got another error:
Code:
exception while building Json $C:\Users\User\Documents\B3d\tv\.cxx\cmake\debug\armeabi-v7a\compile_commands.json (The system cannot find the file specified)

Categories

Resources