Kapilarny YT
08/31/2022, 1:15 PMSlackbot
09/21/2022, 9:14 PMSlackbot
09/27/2022, 6:03 PMSlackbot
11/03/2022, 6:38 AMJendrik Johannes
12/06/2022, 10:59 AMSlackbot
12/09/2022, 9:39 PMSlackbot
07/06/2023, 10:44 AMSlackbot
07/22/2023, 11:41 PMSlackbot
08/25/2023, 10:03 AMSlackbot
09/26/2023, 3:40 PMKanishk Dutt Sharma
10/18/2023, 8:51 AM[2:18 PM] <?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android="<http://schemas.android.com/apk/res/android>"
xmlns:app="<http://schemas.android.com/apk/res-auto>"
xmlns:tools="<http://schemas.android.com/tools>"
>
<data>
<variable
name="Person"
type="com.example.data_binding.Person" />
<variable
name="Clickhandler"
type="com.example.data_binding.myClickhandler" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{Person.name}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView2"
android:layout_width="0dp"
android:layout_height="16dp"
android:text="@{Person.email}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.525"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:layout_constraintVertical_bias="0.278">
</TextView>
<Button
android:onClick="@{Clickhandler::onButton1Clicked}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/click_me"
app:layout_constraintBottom_toTopOf="@+id/textView2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:layout_constraintVertical_bias="0.574">
</Button>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
package com.example.data_binding;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import com.example.data_binding.databinding.ActivityMainBinding;
public class MainActivity extends AppCompatActivity {
private ActivityMainBinding activityMainBinding ;
private myClickhandler myclickhandler;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Person p1 = new Person("Jack" , "<mailto:jack2419@gmail.com|jack2419@gmail.com>");
activityMainBinding = DataBindingUtil.setContentView(
this , R.layout.activity_main
);
activityMainBinding.setPerson(p1);
myclickhandler = new myClickhandler(this);
activityMainBinding.setClickhandler(myclickhandler);
}
}
package com.example.data_binding;
import android.content.Context;
import android.view.View;
import android.widget.Toast;
public class myClickhandler {
Context context;
public myClickhandler(Context context) {
this.context = context;
}
public void onButton1Clicked(View view) {
Toast.makeText(context, "Button Clicked", Toast.LENGTH_SHORT).show();
}
}
Slackbot
11/07/2023, 5:28 AMJoshuA
12/08/2023, 2:27 PMSlackbot
12/08/2023, 2:28 PMANTIQUE
02/08/2024, 6:54 AMCould not resolve all dependencies for configuration 'detachedConfiguration1'.> Unexpected lock protocol found in lock file. Expected 3, found 0. * Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.============================================================================== 2: Task failed with an exception. ----------- * What went wrong: Unexpected lock protocol found in lock file. Expected 3, found 0. * Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.============================================================================== 3: Task failed with an exception. ----------- * What went wrong: Unexpected lock protocol found in lock file. Expected 3, found 0. * Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.============================================================================== BUILD FAILED in 3s how i solve it run npx react-native run-android but this kind of error occurs plz help
daniel
02/08/2024, 2:59 PMSlackbot
02/08/2024, 5:18 PMSlackbot
02/09/2024, 7:06 PMSlackbot
02/09/2024, 7:10 PMRob
02/28/2024, 7:18 PMandroid { externalNativeBuild {} }
.
2. Compile src/main/cpp/libfoo-jni.cpp for windows (jvm) in the same way. Ideally using clang+cmake for consistency with Android. This has been a nightmare.
So far I've tried:
1. Using nokee (jni-library, cpp-language). This gets me to the compilation step (hooray), but it's forcing use of MSVC, which is not compatible with my JNI bindings. I need to use clang or gcc. The docs say this is configurable, but not how to do so. The nokee sample projects are useless, because they're mainly demos of "look at how you don't need to configure anything!".
2. Using (com.cisco.external-build). I'm unable to get this working at all, because (1) all examples are in groovy, use magic, and are unclear how to port to kotlin, and (2) even using groovy, it seems like the plugin no longer works
This whole process is making me feel stupid. I'm definitely a beginner at Gradle, but I've never run into difficulties of this magnitude with any other build system I've used (xcode, cmake, make etc..). Would I be better off trying to avoid using Gradle as much as possible for this and manually writing scripts to exec? I feel like this is the tool pushing back on me.BenoĂŽt
05/21/2024, 6:47 AM--show-sdk-platform-path
for xcrun
which as been removed at some point on some machine I suppose? It's rather difficult to find info about it online.
The fix is to use the flag --show-sdk-path
instead. I'm puzzled as to why I cannot find more of that error online. In any case, the only fix I have now is to run export SDKROOT=$(xcrun -sdk macosx --show-sdk-path)
before running anything relying on MacOSSdkPlatformPathLocator
for it not to break.
I'm hoping this could get addressed within Gradle when possible.SUSHANT SHETTY
05/24/2024, 8:26 AMpavan kumar
06/24/2024, 7:00 AMpavan kumar
06/24/2024, 7:01 AMVinicius Silva
07/10/2024, 12:08 AM* What went wrong:
Cannot locate tasks that match ':react-native-gradle-plugin:assemble' as project 'react-native-gradle-plugin' not found in root project
Harshit CWS
09/03/2024, 3:54 AMCould not create task 'react native google paycompileReleaseJavaWithJavac'.> In order to compile Java 9+ source, please set compileSdkVersion to 30 or above In my android/build.gradle,i have: buildscript { ext { buildToolsVersion = "34.0.0" minSdkVersion = 23 compileSdkVersion = 34 targetSdkVersion = 34 ndkVersion = "26.1.10909125" kotlinVersion = "1.9.22" } repositories { google() mavenCentral() } dependencies { classpath("com.android.tools.buildG8.2.1") // classpath("com.android.tools.build:gradle") classpath("com.facebook.react:react-native-gradle-plugin") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") } } apply plugin: "com.facebook.react.rootproject"
TamĂĄs Varjas
09/13/2024, 10:49 AMcpp-library
plugin. (Note: I'm not talking about cross-compilation. I would like to compile for x86_64 on x86_64 and for arm64 on arm64).
I managed to solve the same using the old cpp
plugin like this (where arch
is determined based on a property passed in with -P
):
plugins {
id 'cpp'
}
model {
toolChains {
gcc(Gcc) {
target("linux_aarch64") {
cppCompiler.executable = '/usr/bin/gcc'
}
}
}
platforms {
x86_64 {
architecture 'x86_64'
}
linux_aarch64 {
architecture 'arm64'
operatingSystem 'linux'
}
}
components {
main(NativeLibrarySpec) {
targetPlatform arch
<...>
}
}
}
However, I've been unable to achieve the same using the cpp-library
plugin or even when "mixing" cpp
and cpp-library
, like below:
plugins {
id 'cpp'
id 'cpp-library'
}
model {
toolChains {
gcc(Gcc) {
target("linux_aarch64") {
cppCompiler.executable = '/usr/bin/gcc'
}
}
}
platforms {
x86_64 {
architecture 'x86_64'
}
linux_aarch64 {
architecture 'arm64'
operatingSystem 'linux'
}
}
}
library {
baseName = <...>
linkage = [Linkage.SHARED]
}
tasks.withType(CppCompile).configureEach {
targetPlatform arch
<...>
}
All attempts involving the cpp-library
plugin so far resulted in some variation of this error:
> Failed to notify project evaluation listener.
> No tool chain has support to build C++ for host operating system 'Linux' architecture 'aarch64':
- Tool chain 'gcc' (GNU GCC):
- Don't know how to build for host operating system 'Linux' architecture 'aarch64'.
Can you point me in the direction for how to solve this? Or should I just forget about cpp-library
as it is simply not doable?TheGoesen
12/19/2024, 6:16 PMDaniele Puccio
03/25/2025, 8:20 PMVin
04/03/2025, 12:45 PMRun with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.