gluon plugin netbean android version - netbeans-8

Where to change the android version to run? Is it in file or in some interface?
My version is 28.
What went wrong:
Configured compileSdkVersion is invalid: 27 (C:/android/platforms/android-27).

The jfxmobile plugin by default will check for 27, and if it is not found on your system, it will throw an exception with some explanation:
throw new GradleException("Configured compileSdkVersion is invalid: ${compileSdkVersion} (${androidSdk}/platforms/android-${compileSdkVersion}).\n
To fix this, you can do one of the following:\n
1. change compileSdkVersion to an installed platform that is available in ${androidSdk}/platforms/\n
2. install the android platform version that matches the configured compileSdkVersion:\n
- from command line run: ${androidSdk}/tools/bin/sdkmanager \"platforms;android-${compileSdkVersion}\"\n
- from Android Studio: see https://developer.android.com/studio/intro/update.html")
Following option 1 you can change compileSdkVersion, and if you have installed version 28, you can do something like:
jfxmobile {
javafxportsVersion = '8.60.11'
downConfig {
version = '3.8.6'
plugins 'display', '...
}
android {
manifest = 'src/android/AndroidManifest.xml'
compileSdkVersion = 28
buildToolsVersion = '28.0.3'
...
}
}
To find out about the different properties that you can set, see the documentation.

Related

Execution failed for task ':realm:stripDebugDebugSymbols'

After installing realm in react native and setting up all necessary things console give me this error after starting project (npm run android);
Execution failed for task ':realm:stripDebugDebugSymbols'. NDK at C:\Users\123\AppData\Local\Android\Sdk\ndk\21.4.7075529 did not have a source.properties file.
I check ndk in android studio (after opening project in it) in Android SDK --> SDK tools sections, the ndk already installed. I also change the ndk version (one by one) in android/build.gradle according to some other stackoverflow solutions but didn't work. Below is android/build.gradle code;
buildscript {
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "21.4.7075529"//"25.1.8937393"//"21.1.6528147"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.2")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
This is a android studio screen shot of sdk tools SDK tools

Execution failed for task ':react-native-agora:compileDebugJavaWithJavac'

i have tried npx react-native start run android
i got this Execution failed for task.and i remove node module and lock file than reinstall(npm) same error.and also i removed agora file after i add npm i react-native-agora. that time same compileDebugJavaWithJavac with different dependencies(example react-native-image-crop-picker:compileDebugJavaWithJavac ) than i try same way to remove and add npm i got another error(react-native-agora:compileDebugJavaWithJavac)
error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-agora:compileDebugJavaWithJavac'.
> Failed to query the value of task ':react-native-agora:compileDebugJavaWithJavac' property 'options.generatedSourceOutputDirectory'.
> Querying the mapped value of map(java.io.File property(org.gradle.api.file.Directory, property(org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory, /home/ubuntu/Desktop/quaquiz/node_modules/react-native-agora/android/build/generated/ap_generated_sources/debug/out))) org.gradle.api.internal.file.DefaultFilePropertyFactory$ToFileTransformer#49f0db11) before task ':react-native-agora:compileDebugJavaWithJavac' has completed is not supported
build gradle:
uildscript {
ext {
buildToolsVersion = "30.0.3"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
supportLibVersion = "28.0.0"
googlePlayServicesAuthVersion = "17.0.0"
}
repositories {
mavenCentral()
google()
jcenter()
}
dependencies {
classpath('com.android.tools.build:gradle:3.6.1')
classpath 'com.google.gms:google-services:4.3.10'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
here i increased sdk version 30 after i got all this error.
before i using build gradle
buildToolsVersion = "29.0.2"
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
See if this help
cd android && ./gradlew clean && cd ..
Probability, it's gradle incompatible. set gradle in dependencies to
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2')
classpath 'com.google.gms:google-services:4.3.10'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}

RNGoogleSignin tried to override RNGoogleSigninModule ERROR

I am trying to build authentication with Google in my React-Native app. Whenever I run the app it displays this error saying that there is a duplicate but in fact, there is no duplicate.
Environment:
- react-native 0.60.4
- react-native-google-signin 2.0.0
-----------------------------------------------
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
googlePlayServicesAuthVersion = "17.0.0"
classpath('com.android.tools.build:gradle:3.5.0')
classpath 'com.google.gms:google-services:4.2.0'
I believe you're using react-native > 0.6.
And in versions > 0.6, packages are automatically linked.
So remove the package that you manually added for MainApplication.java, and then try to build and run it again. This should solve your problem.
// MainApplication.java
#Override
protected List<ReactPackage> getPackages() {
#SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// your package might be added here. Remove (only) that package.
return packages;
}
It looks like youre using the old package, react-native-google-signin, you should use #react-native-community/google-signin since you're using RN>=0.6. Many repo's were moved into the react-native-community organisation on Github.
Try npm rm react-native-google-signin, then npm i #react-native-community/google-signin.

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'
}