android studio mapview show black - rendering

i have a probleme using mapview for android studio when i update to last version both android and sdk
im using this conf in gradle
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
renderscriptTargetApi 21
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName "1.0
the map cannot be rendered and it shown black in startup . pls can any body help me !!!
# com.esri.arcgisruntime.mapping.view.MapView (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE.
If this is an unexpected error you can also try to build the project, then manually refresh the layout. Exception Details
java.lang.VerifyError: # Expecting a stackmap frame at branch target 19 Exception Details:
Location:
com/esri/arcgisruntime/mapping/view/GeoView. (Landroid/content/Context;Landroid/util/AttributeSet;)V #10: ifeq Reason: Expected stackmap frame at this location. Bytecode: 0x0000000: 2a2b 2cb7 001d 2ab6 0021 9900 092a 01b5 0x0000010: 0023 b1b1 at java.lang.Class.getDeclaredConstructors0(Class.java:-2) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) at java.lang.Class.getConstructor0(Class.java:3075) at java.lang.Class.getConstructor(Class.java:1825) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:834) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:834) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.inflate(LayoutInflater.java:518) at android.view.LayoutInflater.inflate(LayoutInflater.java:397)

Related

React Naitve Android error compileSdkVersion is not specified. Please add it to build.gradle

I am having build error
What went wrong:
A problem occurred configuring project ':app'.
compileSdkVersion is not specified. Please add it to build.gradle
build.gradle
googlePlayServicesVersion = "+"
firebaseMessagingVersion = "21.1.0"
buildToolsVersion = "29.0.3"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
app/build.gradle
compileSdkVersion rootProject.ext.compileSdkVersion
Ia m using React Native version 0.63.4 and gradle version 7
How do I fix this?
I tried online solutions nothing worked

Issue with React Native - Async Storage

I'm trying to run my react-native app but suddenly receiving the following error:
Task :react-native-community_async-storage:compileDebugJavaWithJavac FAILED
* What went wrong:
Execution failed for task ':react-native-community_async-storage:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
My project was fine till Friday (05th November). I am getting this from today morning.
"#react-native-community/async-storage": "^1.7.1",
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip

React Native Execution failed for task ':app:processDebugResources'

This problem has been stated When I add firebase
This problem happen when react-native run-android
I tried to ./grandlew clean and all solitons but still continues.
classpath 'com.android.tools.build:gradle:3.0.1'
buildToolsVersion = "26.0.3"
minSdkVersion = 16
compileSdkVersion = 26
targetSdkVersion = 26
supportLibVersion = "26.1.0"
Full Error;
Execution failed for task ':app:processDebugResources'.
Failed to execute aapt

React Native : Change targeted sdk version for play store upload

In Play Store I am trying to upload my app but I'm getting a warning i.e. mentioned below:
Target API level requirements from August 2018
Warning:
Your app currently targets API level 22 and must target at least API level 26 to ensure it is built on the latest APIs optimized for security and performance.
From August 2018, new apps must target at least Android 8.0 (API level 26).
From November 2018, app updates must target Android 8.0 (API level 26).
Open build.gradle under android/app/
find the android { } block
Change the following version to the below:
compileSdkVersion 27
buildToolsVersion "27.0.3"
minSdkVersion 16
targetSdkVersion 27
In the dependencies block, change the appcompat line to match the target version
compile "com.android.support:appcompat-v7:27.1.1"
In case your current android/app/build.gradle has lines which look like
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
You will have to edit the android/build.gradle to include
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 21
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
}
...
}
Although I do not know where to get the latest versions.
It would be great if someone could edit this to include where to get the latest version numbers
From August 2021, API level should be 30 or above.
I have React Native app and my android/app/build.gradle looks like below
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
Changed the android/build.gradle to have below content which worked
buildscript {
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "20.1.5948944"
}
....
Just change targetVwersion to 26 in ./android/app/build.gradle
for the maven part, mentioned by #Bodhish, I needed to do it this way:
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
url 'https://maven.google.com'
}
maven {
// All of React Native (JS, Obj-C sources, Android binaries)
// is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
with this piece added in addition to #albert's comment resolved for me.

Android Studio 2.2 update cause DefaultManifestParser cannot be resolve

Recently I updated android studio to android studio 2.2 and using gradle 2.14.1. However, com.android.builder.core.DefaultManifestParser cannot be resolve after the update. Below are the codes that I am using. Any recommend workaround to solve this issue? Thanks
defaultConfig {
def manifestParser = new DefaultManifestParser(android.sourceSets.main.manifest.srcFile)
applicationId = manifestParser.getPackage()
versionName = manifestParser.getVersionName()
versionCode manifestParser.getVersionCode()
minSdkVersion manifestParser.getMinSdkVersion()
targetSdkVersion manifestParser.getTargetSdkVersion()
multiDexEnabled true
}
My defaultConfig setting is similar to yours and it's successfully built,
defaultConfig {
def manifestFile = (File) android.sourceSets.main.manifest.srcFile
def manifestParser = new DefaultManifestParser(manifestFile)
//noinspection GroovyAssignabilityCheck
applicationId = manifestParser.getPackage()
minSdkVersion 18
targetSdkVersion 23
//noinspection GroovyAssignabilityCheck
versionName = manifestParser.getVersionName()
//noinspection GroovyAssignabilityCheck
versionCode = manifestParser.getVersionCode()
}
so I guess probably the required *.jar hasn't been successfully downloaded during the IDE update. Could you double check whether the file builder-2.2.0.jar exists under the IDE folder(e.g., C:\Program Files\Android\android-studio_2.2\gradle\m2repository\com\android\tools\build\builder\2.2.0). If it does exist, can do a further checking to make sure the file DefaultManifestParser.class is really inside folder \com\android\builder\core by extracting builder-2.2.0.jar.
If the above mentioned file and class do exist, can also try using import com.android.builder.core.DefaultManifestParser, however, it's a bit weird that we have to use this.
Just think of there is another thing to check is the Gradle plugin class path, it should be like this
classpath 'com.android.tools.build:gradle:2.2.0'
I have same troubleļ¼Œand reback gradle version to 2.1.3 it is working
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
}