23 Mart 2021 Salı

Android Telefonlarda Google Arama Hatası - Güncel

Ama diyeyim, hemen telefonunuzdan vazgeçmeyin. 

Yapmanız gereken PlayStore'da menüden Uygulamalarımı seçmek ve tümünü güncelle demek.

Sonra da bi kapatıp açın telefonu, düzelecektir..

9 Mart 2021 Salı

   const db = SQLite.openDatabase("mapappdatabase.db");



function birazBekle(){
  return new Promise((resolvereject=> {
    db.transaction(
      (tx=> {
        tx.executeSql(
          "select * from residmler", [],
          (_tmpSonuc=> { resolve(tmpSonuc.rows._array); },
          (_hata=> { reject(hata); }
        );
      }
    );
  });
}

async function basla(){
  console.log("Başladı");
  try{
    const sonuc = await birazBekle();
    console.log("Başarılı");
  }catch(hata){ //console.error(hata);
  }
}

9 Şubat 2021 Salı

Expo AppLoading and Fonts

In cmd:

expo install expo-font

expo install expo-app-loading

import React, { useState } from "react";
import { StyleSheetTextView } from "react-native";
import * as Font from "expo-font";
import  AppLoading from "expo-app-loading";

const fetchFonts = () => {
  return Font.loadAsync({
    "open-sans": require("./assets/fonts/OpenSans-Regular.ttf"),
    "open-sans-bold": require("./assets/fonts/OpenSans-Bold.ttf")
  });
};

export default function App() {
  const [fontsLoadedsetFontsLoaded] = useState(false);

  if (!fontsLoaded) {
    return (
      <AppLoading
        startAsync={fetchFonts}
        onFinish={() => setFontsLoaded(true)}
        onError={console.log("Hata geçekleşti")}
      />
    );
  }


  return (
    <View style={styles.screen}>
      <Text style={styles.text}>
        Open up App.js to start working on your app!
      </Text>
    </View>
  );
}

const styles = StyleSheet.create({
  screen: {
    flex: 1,
    justifyContent: "center",
    alignItems: "center",
  },
  text: {
    fontFamily: "open-sans-bold",
    fontSize: 18,
  },
});

17 Ocak 2021 Pazar

Could not initialize class org.codehaus.groovy.runtime.InvokerHelper Error

React Native için;

Change the value of "distributionUrl" to the newest gradle version in graddle.wrapper file.

To do that

go to: ..\ProjectDirectory\android\gradle\wrapper

open: gradle-wrapper.properties file for editing

go to: https://services.gradle.org/distributions/ and find out the latest version number. In my case it is 6.8

change the line: 

distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip

like so

distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip