在将Expo SDK升级到35之前,一切都还好,现在我遇到了这个问题。 layar-bahtera-regular是我的自定义字体,我已经使用过Font.loadAsync。有什么问题吗?
// src/Blogger/BlogBundle/Entity/Blog.php
namespace App\Blogger\BlogBundle\Entity;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\User;
/**
* @ORM\Entity(repositoryClass="App\Blogger\BlogBundle\Entity\Repository\BlogRepository")
* @ORM\Table(name="blog")
* @ORM\HasLifecycleCallbacks
*/
class Blog
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(type="integer")
*/
protected $creator_id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User")
* @ORM\JoinColumn(name="creator_id", referencedColumnName="id")
*/
protected $user;
...
/**
* Set creator_id
* @param integer $creator_id
* @return Blog
*/
public function setCreatorId($creator_id)
{
$this->creator_id = $creator_id;
$this->setUser();
return $this;
}
/**
* Get creator_id
* @return integer
*/
public function getCreatorId()
{
return $this->creator_id;
}
/**
* Set user.
* @param integer $creator_id
* @return Blog
*/
private function setUser()
{
if(empty($this->creator_id)) {
$this->user = new User();
} elseif($this->em && !empty($this->creator_id)) {
$this->user = $this->em->getRepository('User')->find($this->creator_id);
}
return $this;
}
/**
* Get user.
* @return \App\Entity\User|null
*/
public function getUser()
{
return $this->user;
}
/**
* @ORM\PostLoad
* @ORM\PostPersist
*/
public function fetchEntityManager(LifecycleEventArgs $args)
{
if(is_null($this->em)) {
$this->em = $args->getEntityManager();
}
if(is_null($this->user)) {
$this->setUser();
}
}
}
}
答案 0 :(得分:0)
您在升级后尝试这样做吗?
此外,您可以尝试执行此命令@ECHO OFF
cd "C:\BAT TEST 26092019"
dir > "merge.txt"
copy /y nul merge.txt
如果有帮助,请告诉我